[SOLVED] Nagios: PROBLEM Host Alert: localhost is DOWN
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just trying to see if it is complaining about having the additional argument at the end of the command or if it doesn't know where to find localhost. Do you have an entry in your /etc/hosts for localhost like the following?
Code:
127.0.0.1 localhost localhost.localdomain
HTH. Let us know.
Last edited by ShadowCat8; 07-10-2017 at 07:51 PM.
Reason: Added host file entry.
Well, I am a bit confused how this could happen since it would seem one of the most basic plugins, but I think there are a couple more steps to run down what exactly is going on...
Let's try this... If you "su - nagios", do you get the same output from the exact ping command that's being passed to the nagios plugin as I do below?
Code:
nagios@bakhost ~ $ ping -n -U -c 5 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.012 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.013 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.012 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.018 ms
--- 127.0.0.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3997ms
rtt min/avg/max/mdev = 0.012/0.014/0.018/0.005 ms
nagios@bakhost ~ $
From that we can confirm that the output it should be expecting is what we are getting. Also, just for making sure on that end, what do you get when you run
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.