[monitoring-plugins] check_mssql.pl: switched alarm timeout

Oliver Skibbe <[email protected]> Sat, 19 Nov 2016 16:40:11 +0100 (CET)
Newsgroups gmane.network.nagios.cvs
Message-ID <20161119154011.8EACE20083CF__38316.7593194686$1479570017$gmane$org@orwell.monitoring-plugins.org>
    Module: monitoring-plugins
    Branch: master
    Commit: 223c59466140d9837233efe79545792e859cb9fa
    Author: Bernd Apfel <[email protected]>
 Committer: Oliver Skibbe <[email protected]>
      Date: Thu Oct 15 11:20:20 2015 +0200
       URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=223c594

check_mssql.pl: switched alarm timeout

  - alarm() now uses -t option
    contributed by Bernd Arnold ([email protected])

    closes #991

---

 plugins-scripts/check_mssql.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 {
      print ("SQL UNKNOWN: ERROR connection $server (alarm timeout)\n");
      exit $ERRORS{"UNKNOWN"};
 };
-alarm($TIMEOUT);
+alarm($timeout);
 
 unless ($dbh = DBI->connect("dbi:Sybase:server=".uc($server), "$username", "$password")) {
 	printf "SQL CRITICAL: Can't connect to mssql server $DBI::errstr\n";