check_snmp_win.pl doesn't honor timeout parameter

Bug #1003291 reported by Jochen Bartl
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Nagios
Invalid
Undecided
Unassigned
nagios-snmp-plugins (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The plugin check_snmp_win.pl doesn't honor the timeout (-t) parameter. If you enter a number right after -t it is saved in $o_timeout, however this variable is not used later on in the script.

Here is an example:

root@icinga:/usr/lib/nagios/plugins# ./check_snmp_win.pl -v -H 10.99.99.6 -C public -n "foobar" -t 5
Alarm at 15
5000
^C
root@icinga:/usr/lib/nagios/plugins# ./check_snmp_win.pl -v -H 10.99.99.6 -C public -n "foobar" -t 20
Alarm at 15
5000
^C

A patch to fix the issue is attached to this bug report.

The solution to this problem was found here: http://www.nagios-portal.org/wbb/index.php?page=Thread&postID=162987#post162987 (Text is in German)

Just let me know if you want me to do more tests or if you need more infos.

Tags: patch
Revision history for this message
Jochen Bartl (l.o.b.o) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "check_snmp_win-timeout.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Robert Sander (gurubert) wrote :

I would propose a patch like the one attached, where $TIMEOUT is used as the default value for $o_timeout, but not to set the alarm.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nagios-snmp-plugins (Ubuntu):
status: New → Confirmed
Jan Wagner (waja)
Changed in nagios:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.