How to reduce SNMP service check interval?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tftu
Posts: 6
Joined: Mon Mar 12, 2012 10:21 am

How to reduce SNMP service check interval?

Post by tftu »

Dear All,

I'm learning to monitor the SNMP devices by configuring SNMP walk. Although it works and I can see the data stored in MySQL, I cannot reduce the service check interval to less than 1min. For the device (a PDU) I'm monitoring, we expect to read the updated info. of every "second". Any suggestion/instruction is more than welcome. Thanks in advance!

Best Regards,

-tftu
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to reduce SNMP service check interval?

Post by scottwilkerson »

For active checks the interval is whole minutes. So if you enter 0.5 it will round up to 1.

You could however write a custom script that polls the machine and sends the results passively to nagios every second.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
tftu
Posts: 6
Joined: Mon Mar 12, 2012 10:21 am

Re: How to reduce SNMP service check interval?

Post by tftu »

Hi! Scott,

Thanks! And sorry for I were not aware of the same question has been raised by my colleague.

Regarding the custom script you advised, is there any tutorial/sample for our reference? Thanks again!

BR,

-tftu
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to reduce SNMP service check interval?

Post by scottwilkerson »

I don't have an tutorial, this was an off the cuff theory, however something like this

Code: Select all

#!/bin/bash
while true
do 
    COMMAND
    sleep 1 
done
Instructions on sending with NRDP can be found here (it's at the bottom of the guide)
http://library.nagios.com/library/produ ... p-overview
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
tftu
Posts: 6
Joined: Mon Mar 12, 2012 10:21 am

Re: How to reduce SNMP service check interval?

Post by tftu »

Hi! Scott,

Thanks again! problem solved by implementing the shell script as you advised.

May I have a side question? I'm using below command to check the data in background:

bash > sh myCommand.sh &

Is it equivalent to a Linux service? How can I wrap myCommand.sh as a service? (yes, I'm new to Linux too...)

Have a nice weekend!

-tftu
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to reduce SNMP service check interval?

Post by scottwilkerson »

Writing and setting up Linux services is certainly beyond the scope of the Nagios XI forum.

If you just want it to start at boot you could add the command to
/etc/rc.d/rc.local
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked