Thanks!
I will try that if my script doesn't work. I'm testing it now.
check_snmp plugin timeout error
Re: check_snmp plugin timeout error
Np. You should be able to cut the text out of that spot from the parsing I did in the past. Take a look at https://github.com/rcknag/nagios-plugin ... rocurve.sh as a reference point if needed. Just parsing OID -> data to text with warning / critical thresholds added.
Former Nagios Employee
Re: check_snmp plugin timeout error
Hello,
One last question,it would seem to me that -l "text" wouldn't dynamically change for the various exit codes.
examples: Message queue OK: Message Count
Message Queue Warning: Message Count
Message Queue Critical: Message count
I think I would have to write a shell script or perl script nagios command for that.
One last question,it would seem to me that -l "text" wouldn't dynamically change for the various exit codes.
examples: Message queue OK: Message Count
Message Queue Warning: Message Count
Message Queue Critical: Message count
I think I would have to write a shell script or perl script nagios command for that.
Re: check_snmp plugin timeout error
It would not. What exactly are you looking to do at this point? Can you explain your use case?
We might be able to help further.
On a second thought here - if you're just trying to define warning / critical thresholds with SNMP, you can do so using -w/-c -
We might be able to help further.
On a second thought here - if you're just trying to define warning / critical thresholds with SNMP, you can do so using -w/-c -
Code: Select all
[root@xi libexec]# ./check_snmp
check_snmp: Could not parse arguments
Usage:
check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout] [-e retries]
[-l label] [-u units] [-p port-number] [-d delimiter] [-D output-delimiter]
[-m miblist] [-P snmp version] [-L seclevel] [-U secname] [-a authproto]
[-A authpasswd] [-x privproto] [-X privpasswd]
Former Nagios Employee
Re: check_snmp plugin timeout error
Hello,
I am needing to write a script, (I wrote it in bourne shell but need to re-write it in perl) to check to use mailq to see the message count and if it is over the warning or critcal thresh hold, then print a custom error or warning message depending on if it is a warning or critical or unknown.
everything is working, but have to re-write my script in perl and make it modular to be used against any server.
I just was curious if using the -l on check_snmp could have dynamic messages -l "text" based on the exit code, but I would guess not.
I am needing to write a script, (I wrote it in bourne shell but need to re-write it in perl) to check to use mailq to see the message count and if it is over the warning or critcal thresh hold, then print a custom error or warning message depending on if it is a warning or critical or unknown.
everything is working, but have to re-write my script in perl and make it modular to be used against any server.
I just was curious if using the -l on check_snmp could have dynamic messages -l "text" based on the exit code, but I would guess not.
Re: check_snmp plugin timeout error
Got it.
Ah - no dynamic text like that with -l. You are correct here - this could change with a wrapper script if you added further logic on top of it, though.
Ah - no dynamic text like that with -l. You are correct here - this could change with a wrapper script if you added further logic on top of it, though.
Former Nagios Employee
Re: check_snmp plugin timeout error
Thank you rkennedy.
I appreciate all your help. I consider this thread closed and will open another one if I need any additional help.
I appreciate all your help. I consider this thread closed and will open another one if I need any additional help.
Re: check_snmp plugin timeout error
No problem! Sounds good - closing this one out!
Former Nagios Employee