Error Could Not Stat Command File Nagios
Contents |
• All times are UTC - 6 hours [ DST ] Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Nagios installations!): Error: Could not stat() command file ‘/var/lib/nagios3/rw/nagios.cmd'! The external command file may be missing, Nagios /usr/local/nagios/var/rw/nagios.cmd missing may not be running, and/or Nagios may not be checking selinux nagios external commands. An error occurred while attempting to commit your command for processing. The correct
Nagios External Command
way to fix this in Ubuntu is: service nagios3 stop dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3 service https://support.nagios.com/forum/viewtopic.php?f=7&t=27662 nagios3 start 1234 service nagios3 stopdpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rwdpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3service nagios3 start Share this:Click to share on Facebook (Opens in new window)Click to share on Twitter (Opens in new window)Click to email this to a friend (Opens in new window)Click to share on http://www.barryodonovan.com/2013/06/20/enabling-external-commands-in-nagios-ubuntu LinkedIn (Opens in new window)Click to print (Opens in new window)Click to share on Google+ (Opens in new window) Author Barry O'DonovanPosted on June 20, 2013Categories Linux, Recipes, WorkTags linux, nagios Post navigation Previous Previous post: Translating SNMP OIDs Using MIB FilesNext Next post: Atheist Ireland Losing the Plot Thoughts, ramblings and rants of a husband, father, network engineer, sysadmin, coder, company owner, employer, closet geek, sci fi fan, political anorak, impatient grump... I live in Dublin, Ireland with my wife and daughter. Co-founder of Island Bridge Networks - a company specialising in internet infrastructure providing NetDevOps services. Founder of Open Solutions which provides an out-sourced CTO service to start-ups. I also help ensure the internet keeps working in Ireland with INEX. Search Search for: Search Subscribe to My Blog Enter your email address to subscribe to this blog and receive notifications of new posts by email. Email Address Archives Archives
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about http://stackoverflow.com/questions/26142420/nagios-could-not-open-command-file-usr-local-nagios-var-rw-nagios-cmd-for-up Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow https://www.linux.com/blog/error-could-not-stat-command-file-varlibnagios3rwnagioscmd is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Nagios - Could not open command file /usr/local/nagios/var/rw/nagios.cmd’ for update up vote 2 could not down vote favorite 1 I'm trying to disable active check for a service through Nagios web interface, but I cant make it. The Nagios instance is running on a Centos 5 distribution Each time I try to stop the service I get this message : Could not open command file ‘/usr/local/nagios/var/rw/nagios.cmd’ for update! Although I tried several proposals found on the web : usermod -a -G nagios apache chmod 666 could not stat /usr/local/nagios/var/rw/nagios.cmd chown nagios.nagcmd /usr/local/nagios/var/rw chmod u+rwx /usr/local/nagios/var/rw chmod g+rwx /usr/local/nagios/var/rw chmod g+s /usr/local/nagios/var/rw Each time rebooting nagios service afterwards of course. Thanks for your help ! Cheers monitoring nagios share|improve this question edited Oct 4 '14 at 16:00 Matt 23k71836 asked Oct 1 '14 at 13:21 renard 5861025 What are the nagios_user and nagios_group config values set to? What are the latest permissions on nagios.cmd and each of the directories on the way down to it? –Alain Collins Oct 9 '14 at 6:13 nagios_user and nagios_group are both set to nagios. Permissions on nagios.cmd are prw-rw---- nagios nagcmd. thx –renard Oct 14 '14 at 10:23 add a comment| 3 Answers 3 active oldest votes up vote 5 down vote accepted This command is wrong: usermod -a -G nagios apache The group permissions on your rw directory and nagios.cmd file are nagcmd, not nagios. You need this, instead: usermod -a -G nagcmd apache This is what worked for me - or more specifically, on Ubuntu, it's: usermod -a -G nagios www-data share|improve this answer answered Nov 25 '14 at 18:29 jlemley 4051312 add a comment| up vote 2 down vote This is how you have to follow service httpd stop service nagios stop user
Computing Tutorials Open Source Pro LearnWhat is Linux? Training Certification Events Webinars CommunityParticipate Q&A Forums Blogs ResourcesNewsletter Distributions Publications Infographics Photos Videos Jobs Marc Deop September 13, 2010 Error: Could not stat() command file '/var/lib/nagios3/rw/nagios.cmd'! Here's a viable solution on my debian server:dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3And... et voilà!The proper permissions have been set and everything should work as expectedRegards Print This Like (0 likes) Click Here! Advertisement Training See all LFD301 Introduction to Linux, Open Source Development, and GIT October 17, 2016 Learn more LFS301 Linux System Administration October 17, 2016 Learn more LFS462 Linux KVM Virtualization October 24, 2016 Learn more Newsletter NewsEnterprise Desktop Mobile & Embedded Open Source Linux Kernel DevOps Networking Cloud Computing Tutorials Open Source Pro LearnWhat is Linux? Training Certification Events Webinars CommunityParticipate Q&A Forums Blogs ResourcesNewsletter Distributions Publications Infographics Photos Videos Jobs About Linux.comAdvertise Terms of Use Privacy Policy Editorial Policy Contact The Linux Foundation is a non-profit consortium enabling collaboration and innovation through an open source development model. Learn More © 2016 The Linux Foundation