Page 1 of 2

Ping a device every 5 seconds and report loss immediately

Posted: Fri Oct 05, 2018 1:12 pm
by tmattingly
I have looked around but am still unsure if Nagios can ping a device every 5 seconds. And if the packets start coming in as unresponsve then an error will be generated.

Do you have a wizard or a plug-in that could a ping every 5 seconds *and* how do I configure it?

Thank, Tom

Re: Ping a device every 5 seconds and report loss immediatel

Posted: Fri Oct 05, 2018 1:22 pm
by scottwilkerson
tmattingly wrote:Do you have a wizard or a plug-in that could a ping every 5 seconds *and* how do I configure it?
No, the minimum is 1 minute.

You can get this down to about 5-15 seconds if you then edit the service in the CCM -> Services
Check Settings Tab
set Freshness threshold = 5
set Check freshness=On
Save
Apply Configuration

Re: Ping a device every 5 seconds and report loss immediatel

Posted: Fri Oct 05, 2018 1:25 pm
by tmattingly
Great answer!

One question does this change all devices to scan more often or just the one?

Tom

Re: Ping a device every 5 seconds and report loss immediatel

Posted: Fri Oct 05, 2018 1:47 pm
by benjaminsmith
You can modify either a single service ( from CCM > Services) or multiple services using the Bulk Modification Tool. The Bulk Modification Tool is found under the Tools directory on the left.

Re: Ping a device every 5 seconds and report loss immediatel

Posted: Fri Oct 05, 2018 2:20 pm
by tmattingly
Here is a picture of the Service management screen. Are all the settings appearing correct? I am still only getting an update once a minute.
Note: I did do SAVE and Apply Configuration and then applied it in Nagios.

Re: Ping a device every 5 seconds and report loss immediatel

Posted: Fri Oct 05, 2018 2:53 pm
by scottwilkerson
tmattingly wrote:Great answer!

One question does this change all devices to scan more often or just the one?

Tom
this just changes the single service.

I need to warn you about changing this on many services, it is going to multiply the stress on your monitoring server a lot. If you end up monitoring every 5 seconds vs the standard 5 minutes you will be performing 60x as many checks on your monitoring server.

If the server was able to handle monitoring 10,000 items at 5min intervals, this would drop to only able to monitor 166 at 5 second intervals.

Re: Ping a device every 5 seconds and report loss immediatel

Posted: Fri Oct 05, 2018 4:03 pm
by tmattingly
Its 3 devices that we are short-term (next 1-2 weeks) where we had reports of systems droppping off for a few seconds or even rebooting. However the system may be down for only 10 seconds and so scanning ever 5 seconds is necessary to catch it. If you have any suggestions, I am certainly open to listening.

But as I previously said it certainly doesn't look like its scanning every 5 seconds. When I go to to the search in the upper right hand corner of the main screen and enter the IP address then I click on view service status it doesn't look like last check time is being refreshed except at one minute intervals.

Have I missed something or am I doing this wrong?

Re: Ping a device every 5 seconds and report loss immediatel

Posted: Fri Oct 05, 2018 4:18 pm
by scottwilkerson
edit your /usr/local/nagios/etc/nagios.cfg changing this

Code: Select all

service_freshness_check_interval=60
to this

Code: Select all

service_freshness_check_interval=5
then restart nagios

Code: Select all

service nagios restart
I will also point out that the page will not even refresh this fast, to make it refresh faster go to Admin -> Performance Settings -> Dashlet tab and update the "Service Status Table" item.

My previous post was just a warning to those who may come by and see this thread and think it's a good idea to modify all of their items to monitor every 5 seconds.

Re: Ping a device every 5 seconds and report loss immediatel

Posted: Fri Oct 05, 2018 5:28 pm
by tmattingly
Do those changes allow the refresh to go lower? I hope they don't turn everything to 5 second scanning?! -:)

Re: Ping a device every 5 seconds and report loss immediatel

Posted: Mon Oct 08, 2018 9:39 am
by jforcier
That will set the freshness check to 5 seconds. It will only change the services which have check freshness set to on.