I am running Nagios 4 in Debian Jessie. It shows the localhost down but all the services it check are OK.
The Nagios plugins are installed.
I followed this tutorial for the installation: http://nagios.sourceforge.net/docs/nagioscore/4/en/quickstart-ubuntu.html
Asked
Active
Viewed 2,089 times
2 Answers
1
Connect as a regular user, not root.
If the command ping localhost says something along the lines of ping: icmp open socket: Operation not permitted then check out Ping: icmp open socket: Operation not permitted (Linux)
It basically states that you need to add the "s" flag on the ping binary, usually located on /bin/ping on Debian systems: sudo chmod u+s /bin/ping
Greenonline
- 2,235
- 11
- 24
- 30
right
- 111
- 2
-
Certainly a useful tip, but does it address the OP's issue..? – Greenonline Nov 13 '15 at 06:26
-
@Greenonline It should. AFAIK, Nagios uses the ping command to check a server's up or down status. – right Nov 28 '15 at 16:24
0
That check will just try to ping localhost. Does that work? If not, it could be due to many things: your firewall may block it, or you may have disabled your configuration for localhost.
Wouter Verhelst
- 366
- 2
- 8
-
It shows `PING OK 06-25-2015 10:59:54 0d 0h 34m 29s 1/4 PING OK - Packet loss = 0%, RTA = 0.08 ms` in the status detail, but in the hosts lists, in the status informatios for the localhost it shows `check_ping:
(%s) must be a non-negative number ` – verovan Jun 25 '15 at 14:01 -
That means you've neglected to add a parameter to a check_ping invocation. Look for a "check_ping" line in your configuration, and make it say "check_ping!1" or some such. Alternatively, just remove the "is localhost up" line. That's a pretty useless test anyway. – Wouter Verhelst Jun 25 '15 at 14:16
-
In the localhost.cfg the line is `check_command check_ping!100.0,20%!500.0,60%` – verovan Jun 25 '15 at 14:26
-
It most likely means that the `check_ping` plugin definition (in an other nagios config file) calls the `check_ping` binary (external program) in an incorrect way. On my Debian box, the `check_ping` plugin definition is found in `/etc/nagios-plugins/config/ping.cfg`. Check that file, run the `check_ping` binary that it references to get an idea for its options, and verify that the arguments it's given are not screwed up. – Wouter Verhelst Jun 25 '15 at 15:20