-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with check_snmp_process.pl #24
Comments
👍 |
Hm, the sytax for negative values is somewhat broken ... problem is when adding a white space, that the leading dash gets interpreted as argment by the getops parser. |
Can you add an argument to ignore if no process are founds ? ( -p for positive number of process, -i for ignore <1 process, .... ) Thanks |
Hm, seems to be a more common getopt problem and should be treated as such. A good read: https://docstore.mik.ua/orelly/perl/prog/ch07_035.htm |
I'm on my ipad now, but I think https://github.com/dnsmichi/manubulon-snmp/blob/master/plugins/check_snmp_process.pl#L259 Might also be worthwhile to rewrite getopt like in the mysql_health code. |
Hi dnsmichi, confirming that changing the getopt style from :s to =s (for the two options I needed, warn and crit) allows for negative low threshold to be passed in: I'm happy to submit a patch for this, but it's really just trivial changes to lines 249 and 250: $ diff /usr/lib/nagios/plugins/check_snmp_process.pl /usr/lib/nagios/plugins/check_snmp_process.pl-orig
|
… options with spaces between option and value This allows check_snmp_process.pl -w -1,40 -c -1,50 to work as expected. This should address bug SteScho#24 SteScho#24
Hi,
I have an error with check_snmp_process.pl define in icinga2 manubulon plugin, I can't specify warning or critical with negative values like -1,20
ie :
I want to check the number of process for smtp, and this number can be 0
so I run this check :
But icinga run it like :
The problem is the space betwen -c or -w and value, must be -c-1,100 not -c(space)-1,100
Do you know how can I remove this useless space for this two args ?
I'm using the latest version of plugins
Thanks
The text was updated successfully, but these errors were encountered: