Solved

Nagios External commands problem: Could not stat command file

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

815 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

8 Experts available now in Live!

Get 1:1 Help Now