passive host check from client

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
bmh
Posts: 14
Joined: Tue Feb 23, 2016 2:23 am

passive host check from client

Post by bmh »

Hi Guy's.

I have a problem that are driving me insane....almost :)

I've have a passive check that are deployed on clients, that sends a OK to server every 20 min.
I can also see that the check is logged af the server "EXTERNAL COMMAND: PROCESS_HOST_CHECK_RESULT;bmhtest;0;OK, PASSIVE HOST CHECK: bmhtest;0;OK" so fare so good.
Now im trying to get the server to check freshness of the passive host check, so that if the check from the client is older then 30 min, then give me some form of alarm, but i can't get that part in place.
If i close down the clinet, so that the check will not be sent, nothing is happening on the server, i don't see it in that log, and i would expect a "Host is unreachable" or something.

I have enabled the following in nagios.cfg
accept_passive_host_checks=1
translate_passive_host_checks=1
check_host_freshness=1
host_freshness_check_interval=1500

Do i miss something or ?
I would love for someone to say..."you're a noob, you have to do this ans this in order to get it to work :D "
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: passive host check from client

Post by rkennedy »

Can you post your related host / service definition for us to look at?
Former Nagios Employee
bmh
Posts: 14
Joined: Tue Feb 23, 2016 2:23 am

Re: passive host check from client

Post by bmh »

Sure rkennedy.

The answer have been i front of me the whole time
I managed to get it working, here a copy.

hosts.cfg
define host {
name linux-host
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1

check_period 24x7
check_interval 15
check_command host-report-down
retry_interval 1
max_check_attempts 1

active_checks_enabled 0
passive_checks_enabled 1
check_freshness 1
freshness_threshold 1500

And then in my commands

define command{
command_name host-report-down
command_line /usr/lib/nagios/plugins/check_dummy 2 "CRITICAL: Host down"
}


Now i just have to adjust the timing right, so that the freshness is working properly.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: passive host check from client

Post by jolson »

The answer have been i front of me the whole time
I managed to get it working, here a copy.
Thanks for providing us with a point of reference - appreciated. Is there anything else that we could help you with, or is this thread good to close?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
bmh
Posts: 14
Joined: Tue Feb 23, 2016 2:23 am

Re: passive host check from client

Post by bmh »

Hi Jolson.

I'm good for now thanks, you can close it :)
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: passive host check from client

Post by rkennedy »

Will do! Closing this one out - feel free to open a new thread if you need any assistance in the future!
Former Nagios Employee
Locked