Ping a device every 5 seconds and report loss immediately
-
tmattingly
- Posts: 115
- Joined: Thu Oct 23, 2014 12:53 pm
Ping a device every 5 seconds and report loss immediately
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
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
No, the minimum is 1 minute.tmattingly wrote:Do you have a wizard or a plug-in that could a ping every 5 seconds *and* how do I configure it?
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
-
tmattingly
- Posts: 115
- Joined: Thu Oct 23, 2014 12:53 pm
Re: Ping a device every 5 seconds and report loss immediatel
Great answer!
One question does this change all devices to scan more often or just the one?
Tom
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
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!
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
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.
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
this just changes the single service.tmattingly wrote:Great answer!
One question does this change all devices to scan more often or just the one?
Tom
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.
-
tmattingly
- Posts: 115
- Joined: Thu Oct 23, 2014 12:53 pm
Re: Ping a device every 5 seconds and report loss immediatel
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?
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
edit your /usr/local/nagios/etc/nagios.cfg changing this
to this
then restart nagios
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.
Code: Select all
service_freshness_check_interval=60Code: Select all
service_freshness_check_interval=5Code: Select all
service nagios restartMy 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.
-
tmattingly
- Posts: 115
- Joined: Thu Oct 23, 2014 12:53 pm
Re: Ping a device every 5 seconds and report loss immediatel
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
That will set the freshness check to 5 seconds. It will only change the services which have check freshness set to on.