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
How to reduce SNMP service check interval?
-
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?
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.
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?
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
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?
I don't have an tutorial, this was an off the cuff theory, however something like this
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
Code: Select all
#!/bin/bash
while true
do
COMMAND
sleep 1
done
http://library.nagios.com/library/produ ... p-overview
Re: How to reduce SNMP service check interval?
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
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?
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
If you just want it to start at boot you could add the command to
/etc/rc.d/rc.local