Solved

Nagios External commands problem: Could not stat command file

Posted on 2010-11-25
4
1,367 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
  • 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 500 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Is your computer hacked? learn how to detect and delete malware in your PC
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now