**We just downloaded last version from Console Labs site. The other modes we use seem to work fine except --mode sql-runtime, which gives the output below.
It always generate 0s as sql_runtime in perfdata.
The former old version 1.5.19.3 gives a different output, see below. But the runtime seems to be correct.**
What is wrong ?
Thx
./check_mssql_health --server INSTANCE --username User --password Password --mode sql-runtime -t 90 -v -v -v
Thu May 11 17:15:14 2017: SQL:
SELECT @@Version
ARGS:
$VAR1 = [];
Thu May 11 17:15:14 2017: RESULT:
$VAR1 = [
'Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)
Jun 28 2012 08:36:30
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (Hypervisor)
'
];
Thu May 11 17:15:14 2017: AUTOLOAD Classes::MSSQL::DBI::override_opt
Thu May 11 17:15:14 2017: AUTOLOAD Classes::MSSQL::DBI::check_messages
Thu May 11 17:15:14 2017: SQL:
SELECT SYSTEM_USER
ARGS:
$VAR1 = [];
Thu May 11 17:15:14 2017: RESULT:
$VAR1 = [
'GOPSAMonitoring'
];
Thu May 11 17:15:14 2017: SQL:
SELECT @@SERVICENAME
ARGS:
$VAR1 = [];
Thu May 11 17:15:14 2017: RESULT:
$VAR1 = [
'RIMSES_PROD'
];
Thu May 11 17:15:14 2017: SQL:
SELECT CAST(COALESCE(SERVERPROPERTY('IsHadrEnabled'), 0) as int)
ARGS:
$VAR1 = [];
Thu May 11 17:15:14 2017: RESULT:
$VAR1 = [
0
];
Thu May 11 17:15:14 2017: SQL:
ARGS:
$VAR1 = [];
Thu May 11 17:15:14 2017: RESULT:
$VAR1 = [];
Thu May 11 17:15:14 2017: stderr Use of uninitialized value $sql in sprintf at ./check_mssql_health line 6382.
Use of uninitialized value in subroutine entry at /usr/local/lib64/perl5/DBD/Sybase.pm line 138.
Use of uninitialized value $sql in pattern match (m//) at ./check_mssql_health line 6390.
Use of uninitialized value $sql in pattern match (m//) at ./check_mssql_health line 6390.
Thu May 11 17:15:14 2017: AUTOLOAD Monitoring::GLPlugin::DB::check_messages
Thu May 11 17:15:14 2017: AUTOLOAD Monitoring::GLPlugin::DB::SUPER::set_thresholds
Thu May 11 17:15:14 2017: AUTOLOAD Monitoring::GLPlugin::DB::check_thresholds
Use of uninitialized value in sprintf at ./check_mssql_health line 2804.
Thu May 11 17:15:14 2017: AUTOLOAD Monitoring::GLPlugin::DB::add_perfdata
Thu May 11 17:15:14 2017: AUTOLOAD Monitoring::GLPlugin::DB::check_messages
Thu May 11 17:15:14 2017: AUTOLOAD Monitoring::GLPlugin::DB::check_messages
Thu May 11 17:15:14 2017: AUTOLOAD Monitoring::GLPlugin::DB::nagios_exit
WARNING - Use of uninitialized value $sql in sprintf at ./check_mssql_health line 6382.
Use of uninitialized value in subroutine entry at /usr/local/lib64/perl5/DBD/Sybase.pm line 138.
Use of uninitialized value $sql in pattern match (m//) at ./check_mssql_health line 6390.
Use of uninitialized value $sql in pattern match (m//) at ./check_mssql_health line 6390.
, 0.00 seconds to execute
| 'sql_runtime'=0.00s;1;5;;
Thu May 11 17:15:14 2017: try to clean up command and result files_
./check_mssql_health-1.5.19.3 --server DBSRV-000045 --username GOPSAMonitoring --password 'InspiretheNext2015!' --mode sql-runtime -t 90 -v -v -v
Thu May 11 17:21:42 2017: SQL:
SELECT @@Version
ARGS:
$VAR1 = [];
Thu May 11 17:21:42 2017: RESULT:
$VAR1 = [
'Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)
Jun 28 2012 08:36:30
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (Hypervisor)
'
];
Thu May 11 17:21:42 2017: SQL:
SELECT SYSTEM_USER
ARGS:
$VAR1 = [];
Thu May 11 17:21:42 2017: RESULT:
$VAR1 = [
'GOPSAMonitoring'
];
Thu May 11 17:21:42 2017: SQL:
SELECT @@SERVICENAME
ARGS:
$VAR1 = [];
Thu May 11 17:21:42 2017: RESULT:
$VAR1 = [
'RIMSES_PROD'
];
Thu May 11 17:21:42 2017: SQL:
ARGS:
$VAR1 = [];
Thu May 11 17:21:42 2017: RESULT:
$VAR1 = [];
Thu May 11 17:21:42 2017: stderr Use of uninitialized value $sql in sprintf at ./check_mssql_health-1.5.19.3 line 3098.
Use of uninitialized value in subroutine entry at /usr/local/lib64/perl5/DBD/Sybase.pm line 138.
Use of uninitialized value $sql in pattern match (m//) at ./check_mssql_health-1.5.19.3 line 3106.
Use of uninitialized value $sql in pattern match (m//) at ./check_mssql_health-1.5.19.3 line 3106.
Use of uninitialized value $params{"selectname"} in sprintf at ./check_mssql_health-1.5.19.3 line 2206.
OK - 0.00 seconds to execute | sql_runtime=0.0003;1;5