Change frequncy Nagios runs some plugins.
Change frequncy Nagios runs some plugins.
Can somebody help me how to change the frequency Nagios runs some plugins. For example: I would like Nagios to run only the check_snmp plugin every one second.
Re: Change frequncy Nagios runs some plugins.
You will need to change interval_length from 60 to 1 in nagios.cfg. This will necessitate changing ALL check_interval values to be measured in seconds rather than minutes. You can then set the check_interval to 1 for your check_snmp service to check every second. Please note that this is probably a bad idea though, and you probably don't really need to be accurate to 1 second.
Re: Change frequncy Nagios runs some plugins.
Thank you for your fast reply. You made my day1 
Re: Change frequncy Nagios runs some plugins.
Glad I could help!
Re: Change frequncy Nagios runs some plugins.
Hi,
Do you now if I can convert the result that check_snmp returns??
For example: My check_snmp returns a string "82000000.8" and I would like to convert it into a double because I would like to monitor the change of the result with nagiosgraph.
Thank you in advance,
Stefan
Do you now if I can convert the result that check_snmp returns??
For example: My check_snmp returns a string "82000000.8" and I would like to convert it into a double because I would like to monitor the change of the result with nagiosgraph.
Thank you in advance,
Stefan
Re: Change frequncy Nagios runs some plugins.
You could filter it with another program. For example:
Code: Select all
$USER1$/check_snmp opts | sed 's/.*/& | label=&/'Re: Change frequncy Nagios runs some plugins.
Please, could you be a little bit more specific ?
for example my command is:
define command{
command_name check_atr
command_line $USER1$/check_snmp -H $HOSTADDRESS -C public iso.3.6.1.4.1.xxxxx
}
and it returns a string like 82048243.7
The other command is:
define command{
command_name check_owd
command_line $USER1$/check_snmp -H $HOSTADDRESS -C public iso.3.6.1.4.1.xxxxx
}
and it returns a string like 0.000123.
And I would like the to return an integer or a double value so I can use nagiosgraph.
Please help me as soon as possible,
Stefan
for example my command is:
define command{
command_name check_atr
command_line $USER1$/check_snmp -H $HOSTADDRESS -C public iso.3.6.1.4.1.xxxxx
}
and it returns a string like 82048243.7
The other command is:
define command{
command_name check_owd
command_line $USER1$/check_snmp -H $HOSTADDRESS -C public iso.3.6.1.4.1.xxxxx
}
and it returns a string like 0.000123.
And I would like the to return an integer or a double value so I can use nagiosgraph.
Please help me as soon as possible,
Stefan
Re: Change frequncy Nagios runs some plugins.
Actually the result is:
SNMP OK - "82015315.6" |
SNMP OK - "0.000217" |
SNMP OK - "82015315.6" |
SNMP OK - "0.000217" |
Re: Change frequncy Nagios runs some plugins.
I am sorry for bothering you but I forgot to say that if you can I would like a full example because I am a little newbie with Nagios.
This is a part of my bachelor degree project and I have no idea what to do further and in 4 day I have to finish everything.
IF you want you can reply to my email: [email protected]
Thank you in advance,
Stefan
This is a part of my bachelor degree project and I have no idea what to do further and in 4 day I have to finish everything.
IF you want you can reply to my email: [email protected]
Thank you in advance,
Stefan
Re: Change frequncy Nagios runs some plugins.
As far as I know, you can't "convert" an SNMP string to a double. Instead, I'm suggesting you post-process the check result to add performance data for Nagios to read.
The sed command transforms the check results into something like this:
SNMP OK - "82015315.6" | atr=82015315.6
SNMP OK - "0.000217" | owd=0.000217
Code: Select all
define command{
command_name check_atr
command_line $USER1$/check_snmp -H $HOSTADDRESS -C public iso.3.6.1.4.1.xxxxx | sed 's/.*"\([0-9.-]*\)" |/& | atr=\1/'
}
define command{
command_name check_owd
command_line $USER1$/check_snmp -H $HOSTADDRESS -C public iso.3.6.1.4.1.xxxxx | sed 's/.*"\([0-9.-]*\)" |/& | owd=\1/'
}SNMP OK - "82015315.6" | atr=82015315.6
SNMP OK - "0.000217" | owd=0.000217