Combine 2 SNMP Service Checks into a graph & calculation

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Combine 2 SNMP Service Checks into a graph & calculation

Post 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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Combine 2 SNMP Service Checks into a graph & calculation

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Combine 2 SNMP Service Checks into a graph & calculation

Post 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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Combine 2 SNMP Service Checks into a graph & calculation

Post 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 :)
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Combine 2 SNMP Service Checks into a graph & calculation

Post 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?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Combine 2 SNMP Service Checks into a graph & calculation

Post by tmcdonald »

It's fun watching from this side of the fence :)
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Combine 2 SNMP Service Checks into a graph & calculation

Post by eloyd »

The grass is always greener....
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Combine 2 SNMP Service Checks into a graph & calculation

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Combine 2 SNMP Service Checks into a graph & calculation

Post by tmcdonald »

Let's leave this open for a bit so @perric can test and get back to us.
Former Nagios employee
perric
Posts: 161
Joined: Fri Mar 28, 2014 10:37 am

Re: Combine 2 SNMP Service Checks into a graph & calculation

Post 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
Locked