Passive results for Hosts e.g. UP/OK

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Kitson88
Posts: 5
Joined: Mon Mar 24, 2014 8:04 am

Passive results for Hosts e.g. UP/OK

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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.
Kitson88
Posts: 5
Joined: Mon Mar 24, 2014 8:04 am

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

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Kitson88
Posts: 5
Joined: Mon Mar 24, 2014 8:04 am

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

Post 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!!!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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.
Former Nagios employee
Kitson88
Posts: 5
Joined: Mon Mar 24, 2014 8:04 am

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

Post 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
Locked