Page 1 of 1
How to reduce SNMP service check interval?
Posted: Wed Mar 21, 2012 5:14 am
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
Re: How to reduce SNMP service check interval?
Posted: Wed Mar 21, 2012 8:53 am
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.
Re: How to reduce SNMP service check interval?
Posted: Wed Mar 21, 2012 8:34 pm
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
Re: How to reduce SNMP service check interval?
Posted: Thu Mar 22, 2012 7:33 am
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
Re: How to reduce SNMP service check interval?
Posted: Fri Mar 23, 2012 4:51 am
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
Re: How to reduce SNMP service check interval?
Posted: Fri Mar 23, 2012 9:48 am
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