Ping a device every 5 seconds and report loss immediately

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tmattingly
Posts: 115
Joined: Thu Oct 23, 2014 12:53 pm

Ping a device every 5 seconds and report loss immediately

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
tmattingly
Posts: 115
Joined: Thu Oct 23, 2014 12:53 pm

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

Post by tmattingly »

Great answer!

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

Tom
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
tmattingly
Posts: 115
Joined: Thu Oct 23, 2014 12:53 pm

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

Post 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.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
tmattingly
Posts: 115
Joined: Thu Oct 23, 2014 12:53 pm

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

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
tmattingly
Posts: 115
Joined: Thu Oct 23, 2014 12:53 pm

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

Post by tmattingly »

Do those changes allow the refresh to go lower? I hope they don't turn everything to 5 second scanning?! -:)
jforcier

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

Post by jforcier »

That will set the freshness check to 5 seconds. It will only change the services which have check freshness set to on.
Locked