Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Nagios External commands problem: Could not stat command file

Posted on 2010-11-25
4
Medium Priority
?
1,528 Views
Last Modified: 2012-05-10
Hi,
I have just installed nagios3 on ubuntu. I  have setup my  windows machine with nsclient++. I can see my machine's up on nagios (ping) but when i try to  schedule a check, i get the followinfg error:

Error: Could not stat() command file '/var/lib/nagios3/rw/nagios.cmd'!

I have  this file does not exist!

Any help is apreciated!
Cheers
0
Comment
Question by:maxalarie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 18

Expert Comment

by:Sanga Collins
ID: 34214153
did you complete this step of the setup? it is supposed to configure nagios to allow running of external commands on other systems.

make install-commandmode
0
 
LVL 2

Author Comment

by:maxalarie
ID: 34214156
I  have used  ubuntu, i got nagios3 by goin: apt-get isntall nagios3 nagios3-plugins
i have also enabled the external_command in nagios.cfg file.
0
 
LVL 2

Accepted Solution

by:
koffu earned 2000 total points
ID: 34238227
# grep -R 'nagios.cmd' /etc/nagios*
/etc/nagios3/nagios.cfg:command_file=/var/lib/nagios3/rw/nagios.cmd
# ls -l /var/lib/nagios3/
total 1220
-rw-r--r-- 1 nagios nagios     15733 2009-03-11 12:31 nagios.debug
-rw-r--r-- 1 root   root         366 2010-08-19 12:37 nagios.log
-rw------- 1 nagios www-data 1213812 2010-11-30 14:36 retention.dat
drwx--s--- 2 nagios www-data    4096 2010-09-24 11:47 rw
drwxr-x--- 3 nagios nagios      4096 2009-03-10 12:05 spool

# ls -l /var/lib/nagios3/rw/
total 0
prw-rw---- 1 nagios www-data 0 2010-11-30 14:25 nagios.cmd

Open in new window


be sure directory /var/lib/nagios3/rw exist and have valid permissions. If pipe does not exist, simple create it: mkpipe /var/lib/nagios3/rw/nagios.cmd ; chown nagios:www-data /var/lib/nagios3/rw/nagios.cmd ; chmod 660 /var/lib/nagios3/rw/nagios.cmd
0
 
LVL 2

Author Closing Comment

by:maxalarie
ID: 34269086
Thanks.
0

Featured Post

2017 Webroot Threat Report

MSPs: Get the facts you need to protect your clients.
The 2017 Webroot Threat Report provides a uniquely insightful global view into the analysis and discoveries made by the Webroot® Threat Intelligence Platform to provide insights on key trends and risks as seen by our users.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question