summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Apfel <wopfel@gmail.com>2015-10-15 09:20:20 (GMT)
committerOliver Skibbe <oliskibbe@gmail.com>2015-10-15 09:20:20 (GMT)
commit223c59466140d9837233efe79545792e859cb9fa (patch)
tree5c97b944876ad22ec966e7ba695515a60bb79319
parent3f17f18416521ee90b8823bab3324188976ac265 (diff)
downloadmonitoring-plugins-223c594.tar.gz
check_mssql.pl: switched alarm timeoutrefs/pull/1376/head
- alarm() now uses -t option contributed by Bernd Arnold (wopfel@gmail.com) closes #991
-rwxr-xr-xplugins-scripts/check_mssql.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins-scripts/check_mssql.pl b/plugins-scripts/check_mssql.pl
index fb3952d..bf3a651 100755
--- a/plugins-scripts/check_mssql.pl
+++ b/plugins-scripts/check_mssql.pl
@@ -54,7 +54,7 @@ $SIG{'ALRM'} = sub {
54 print ("SQL UNKNOWN: ERROR connection $server (alarm timeout)\n"); 54 print ("SQL UNKNOWN: ERROR connection $server (alarm timeout)\n");
55 exit $ERRORS{"UNKNOWN"}; 55 exit $ERRORS{"UNKNOWN"};
56}; 56};
57alarm($TIMEOUT); 57alarm($timeout);
58 58
59unless ($dbh = DBI->connect("dbi:Sybase:server=".uc($server), "$username", "$password")) { 59unless ($dbh = DBI->connect("dbi:Sybase:server=".uc($server), "$username", "$password")) {
60 printf "SQL CRITICAL: Can't connect to mssql server $DBI::errstr\n"; 60 printf "SQL CRITICAL: Can't connect to mssql server $DBI::errstr\n";