Page 1 of 1

Passive results for Hosts e.g. UP/OK

Posted: Mon Mar 24, 2014 8:19 am
by Kitson88
Hi All,

This is probably going to be really easy one so i apologise in advance if the word "Noob" springs to mind but i have extensively searched online for some form of guide for some time now and enough is enough.

I'm currently using Nagios 3.4.4 (with NagiosQL) using Passive mode on remote clients using NSClient++ using NSCA. This is working brilliant for passive service checks but im struggling to understand how i would grab a passive result for hosts. The way I've configured NSClient++ to send results is registered to the service description and host name hence my confusion for host checks. Have set this up incorrectly or am i painfully missing something so blatantly obvious?

Any help would be much appreciated and thank you in advance.

Many Thanks,

J

Re: Passive results for Hosts e.g. UP/OK

Posted: Mon Mar 24, 2014 11:16 am
by slansing
So typically what is done with most hosts, if not all, is they are set up with a simple ping check, or a 'host-alive' check, to see if the host is actually reachable from the nagios server. There really are no passive host checks but this could be done, though I'm not sure why. :)

If you need help setting your hosts up to use check_ping, or icmp, something along those lines we can certainly assist.

Re: Passive results for Hosts e.g. UP/OK

Posted: Mon Mar 24, 2014 11:54 am
by Kitson88
Hi Slansing,

Many thanks for your reply :-)

Basically, the reason why i would like a passive "OK/UP" request is because my NSClient's are located over WAN making Active checks unreachable. VPN & NAT would be a pain to configure due to how many locations and sadly its not going to be possible to install a remote nagios server to act as a proxy. I think i may of taken my own route of configuration (as per usual) but everything I've done so far is working amazingly well to my needs and 95% near to completion. If i could just crack this host issue then i would be well happy with my set-up :-)

I hope this helps?

Re: Passive results for Hosts e.g. UP/OK

Posted: Mon Mar 24, 2014 4:24 pm
by abrist
Actually, you may be able to submit a passive host check:
http://nagios.sourceforge.net/docs/3_0/ ... hecks.html
My suggestion would be to ping the nagios server from your remote host, and ten return the ping information as a passive host check for the respective host.

Re: Passive results for Hosts e.g. UP/OK

Posted: Tue Mar 25, 2014 7:53 am
by Kitson88
Thank You Abrist!!

I've checked through the docs and completely missed Submitting Passive Host Check Results(I may of been reading previous versions). Investigating further today but this is exactly what i need so feel stupid for missing this!

Thanks Again!!!

Re: Passive results for Hosts e.g. UP/OK

Posted: Tue Mar 25, 2014 9:45 am
by tmcdonald
Not a problem. Documentation isn't always the most fun thing to read ;)

We'll keep this open for a bit so you can test.

Re: Passive results for Hosts e.g. UP/OK

Posted: Tue Mar 25, 2014 10:12 am
by Kitson88
Nailed it!!!

I'll just add this for anybody else who's had the same issue as me:

My Nagios host config needed to be obviously set to passive.

Added the following in my NSClient .ini making sure the check name began with Host so NSCA can differentiate between a Host and Service. So basically, anything which has Host at the beginning will be passed as a Host check.

Code: Select all

 
[/settings/scheduler/schedules]
;#Host Check
host_check=check_ok ;#Dummy Check           
Checked my Nagios.log and could see it's worked correctly along with updating Web UI.

Code: Select all

[1395760037] PASSIVE HOST CHECK: SERVER2008;0;OK: Lets pretend everything is going to be ok.
[1395760037] HOST ALERT: SERVER2008;UP;HARD;2;OK: Lets pretend everything is going to be ok.
Thank You Support!! :D