Page 4 of 6
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Tue Jul 21, 2015 8:03 pm
by eloyd
Be aware that if you make this change, then it applies to ALL checks. Which means that ones that should be terminated because they are taking too long will now take longer before they are terminated.
The other thing you could do is just run the service check every minute, save the value from the previous run in a /tmp/file, and use that value to compare it to the current one. <--- I would do this approach.
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Wed Jul 22, 2015 9:39 am
by BanditBBS
I disagree with Eric on this one. Increasing that variable to 90 seconds to give this time shouldn't cause you any harm and I personally would rather that then using the tmp file method. My services actually have over 10 minutes to complete in my current setup.
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Wed Jul 22, 2015 9:57 am
by eloyd
My note was in the interests of making sure that the ramifications of changing that parameter were understood. echo number > /tmp/lastrun.tmp is trivial in terms of resources and mitigates overall risk.
But the beauty of Nagios is that the poor cat can be skinned a thousand different ways.
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Wed Jul 22, 2015 10:10 am
by BanditBBS
eloyd wrote:But the beauty of Nagios is that the poor cat can be skinned a thousand different ways.
Sometimes, too darn many ways! lol
Its all good, was just giving him my opinion, we all have them

Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Wed Jul 22, 2015 11:13 am
by eloyd
I feel like responding with some pithy but humorous comment, but I can't think of anything.

@perric, are you all set with this or do you still need some help?
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Wed Jul 22, 2015 4:30 pm
by tmcdonald
It's fun watching from this side of the fence :)
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Wed Jul 22, 2015 4:34 pm
by eloyd
The grass is always greener....
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Wed Jul 22, 2015 4:58 pm
by BanditBBS
By the way, we may be reinventing the wheel here anyway. Have you tried the
https://labs.consol.de/nagios/check_nwc ... index.html plugin? Its my favorite network plugin, I couldn't live without it at my old job. Not monitoring network here yet, so kind of forgot about it.
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Thu Jul 23, 2015 11:16 am
by tmcdonald
Let's leave this open for a bit so @perric can test and get back to us.
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Fri Jul 24, 2015 9:00 am
by perric
Hi All,
Sorry about the delay. I really appreciate all comments. It has been very helpful.
I set the service_check_timeout to 70 and it appears to be working. If I have a thousand of these "checks" happening at one time and "sleeping" for 60 seconds, will it present any performance issues vs changing the script to store the value in a file for retrieval after 60 seconds?
Bandit - I will check out that plugin also. Thanks. Don't like to reinvent the wheel either. May have to brush up on some German, though

.
David