[Nagiosplug-devel] [ nagiosplug-Bugs-3275946 ] Timeout not recognized in check_mssql.pl

SourceForge.net noreply at sourceforge.net
Tue Apr 5 12:52:37 CEST 2011


Bugs item #3275946, was opened at 2011-04-05 12:52
Message generated for change (Tracker Item Submitted) made by wopfel
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3275946&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Argument proccessing
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Bernd A. (wopfel)
Assigned to: Nobody/Anonymous (nobody)
Summary: Timeout not recognized in check_mssql.pl

Initial Comment:
Hi,
I've just had a look at the source code in the Git repository. It seems that --timeout (-t) command line argument isn't taken into account.

Sub syntax shows that the uppercase TIMEOUT is the default value:
printf("  --timeout -t          Plugin timeout (default:$TIMEOUT)\n");

In sub process_arguments, the value is stored in $timeout:
$timeout = $TIMEOUT unless (defined($timeout));

But the alarm is always called with the uppercase TIMEOUT:
alarm($TIMEOUT);

So I think it would be sufficient to change
alarm($TIMEOUT); --> alarm($timeout);

Since I'm developing something else at the moment, I can't dig deeper and check other files.

Regards
Bernd Arnold


Line 52 as of now, 2011-04-05 12:48 CEST:
http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=blob;f=plugins-scripts/check_mssql.pl;h=9a8fc5117195457ffca41e5534e8b9e02a96f9c5;hb=HEAD#l52


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3275946&group_id=29880




More information about the Devel mailing list