Fix to Nagios is currently not checking for external commands

While I was deploying a new Nagios install to Monitor some Windows hosts I’ve came across the following error in Nagios’s web interface:

Sorry, but Nagios is currently not checking for external commands, so your command will not be committed!
Read the documentation for information on how to enable external commands...

This error is caused by an option configuration for /etc/nagios/nrpe.cfg (part of the nrpe-nagios-server Debian package.

The config variable in nrpe.cfg causing the error is check_external_command=0 , the fix comes to changing the variable to:

check_external_command=1

As well as restart the /etc/init.d/nagios-nrpe-server and /etc/init.d/nagios3 services:

debian:~# /etc/init.d/nagios3 restart
...
debian:~# /etc/init.d/nagios-nrpe-server
...

This changes has work out the error Sorry, but Nagios is currently not checking for external commands, so your command will not be committed! , however immediately after another kind of error appared in Nagios web interface when I tried to use the send Nagios commands button. The error was:

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

This error is due to a deb package, which seems to be affecting the current deb versions of Nagios shipped with Debian 6 Squeeze stable, as well as the Latest Ubuntu release 11.04.

Thanksfully there is a work around to the problem I found online, to fix it up I had to execute the commands:

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

And hooray Thanks God the error is gone 😉

Share this on:

More helpful Articles

Download PDFDownload PDF

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

8 Responses to “Fix to Nagios is currently not checking for external commands”

  1. Evil_Kitten says:
    Firefox 10.0.2 Firefox 10.0.2 Windows XP Windows XP
    Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2

    Thanks a lot, man, saved me an hour. But your post was not 100% correct – check_external_command=0 directive is located in /etc/nagios/nagios.cfg or /etc/nagios3/nagios.cfg, not nrpe.cfg.

    View CommentView Comment
    • admin says:
      Epiphany 2.30.6 Epiphany 2.30.6 Debian GNU/Linux x64 Debian GNU/Linux x64
      Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6

      thx for feedback.

      best
      Georgi

      View CommentView Comment
  2. Loulights says:
    Firefox 11.0 Firefox 11.0 Mac OS X  10.7 Mac OS X 10.7
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20100101 Firefox/11.0

    Dude – this was a life saver. I was pulling my hair out trying to figure out why a new install on a fresh server was not functioning. Thanks.

    View CommentView Comment
  3. Esteban Benker says:
    Internet Explorer 8.0 Internet Explorer 8.0 Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8)

    There are actually a whole lot of particulars like that to take into consideration. That is a great level to bring up. I offer the thoughts above as basic inspiration however clearly there are questions just like the one you bring up where crucial factor might be working in trustworthy good faith. I don?t know if greatest practices have emerged around issues like that, however I’m positive that your job is clearly recognized as a fair game. Each girls and boys really feel the impression of only a moment’s pleasure, for the remainder of their lives.

    View CommentView Comment
  4. Terry says:
    Firefox 8.0.1 Firefox 8.0.1 GNU/Linux x64 GNU/Linux x64
    Mozilla/5.0 (X11; Linux x86_64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1

    check_external_command=1
    and
    debian:~# /etc/init.d/nagios3 stop debian:~# dpkg-statoverride –update –add nagios www-data 2710 /var/lib/nagios3/rw
    debian:~# dpkg-statoverride –update –add nagios nagios 751 /var/lib/nagios3
    debian:~# /etc/init.d/nagios3 start

    All were required before I could acknowledge and comment alerts.
    Thanks for the tips folks 🙂

    Debian 5

    Cheers
    Terry

    View CommentView Comment
  5. james says:
    Google Chrome 44.0.2403.130 Google Chrome 44.0.2403.130 Windows 8.1 x64 Edition Windows 8.1 x64 Edition
    Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36

    thanks.

    View CommentView Comment

Leave a Reply

CommentLuv badge