Nagios commands via web-interface on Debian


Ups, I did it again – when I upgraded to Debian GNU/Linux 5 (lenny) and Nagios3 I stumbled about this nagios error when I try to send directs commands via the web-interface:

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

In “/etc/nagios3/nagios.cfg” the “check_external_commands=1″ was already set. So there was something more required to make it run on Debian…

Deep in my memory I know that there was a debian way to solve this user right related problem. This time I’ll write it down here – perhaps I’ll find it more easily when I upgrade to Debian GNU/Linux 6.0 (codenamed squeeze) and/or Nagios4.

/etc/init.d/nagios3 stop
dpkg-statoverride –update –add nagios www-data 2710 /var/lib/nagios3/rw
dpkg-statoverride –update –add nagios nagios 751 /var/lib/nagios3
/etc/init.d/nagios3 start

Bookmark and Share

, ,

  1. #1 by Jared - September 23rd, 2009 at 17:33

    Good note.. I found this page as I was having the same feeling about how to fix this. Just one correction though.. the two command switches require 2 dashes not one. ie –update –add

  2. #2 by Tijn Lambrechtsen - Februar 13th, 2010 at 01:42

    Heya Lars, thnx a million 4 sharin’ this. Got it goin’ ;c)

    Metta Mudita

  3. #3 by Fatman - Februar 22nd, 2010 at 13:08

    Thanks Lars, this is a really great tip.

(will not be published)
  1. No trackbacks yet.