Solved

Nagios External commands problem: Could not stat command file

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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Quality of Service (QoS) options are nearly endless when it comes to networks today. This article is merely one example of how it can be handled in a hub-n-spoke design using a 3-tier configuration.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

688 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