I just upgraded from 1.7.1 to 1.9.3 and now some of my check_wmi_plus.pl checks
that use RegEx don't work. Not sure if it matters, but I'm on Debian 6.0.7 and
1.7.1 was installed from the Debian repositories, the 1.9.3 was upgraded from
the Debmon.org repositories.
I found this bug patch that appears to be related, but it talks about
servicegroup definitions and hostnames only. My RegEx are being used in the
service check_command lines. It's probably the right patch, but I want to
verify that this should fix my issue. I also am ignorant on how to apply the
patch. It looks like a shell script, I'd like to verify that if I add it, make
it executable, and run it, the patch would be applied correctly.
https://dev.icinga.org/issues/3881
Command definition:
define command{
command_name check_win_service
command_line $USER6$/check_wmi_plus.pl -H $HOSTADDRESS$ -m checkservice
-u '$USER8$' -p $USER9$ -a '$ARG1$' -o '$ARG2$' $ARG3$ $ARG4$ $ARG5$
}
Service definition:
define service{
use windows_service
host_name servernamehere
service_description SQLExpress
check_command check_win_service!^MSSQL\\$SQLEXPRESS$$!!-c
_NumGood=1:1
event_handler event_restart_win_service!^MSSQL\\$SQLEXPRESS$
}
The expanded check_command is:
$USER6$/check_wmi_plus.pl -H $HOSTADDRESS$ -m checkservice -u '$USER8$' -p
$USER9$ -a '^MSSQL\$SQLEXPRESS$$' -o '(empty)' -c _NumGood=1:1 (undefined)
(undefined)
And the raw commandline is:
/usr/lib/nagios/plugins/check_wmi_plus/check_wmi_plus.pl -H 1.2.3.4 -m
checkservice -u 'domain\user' -p password -a '^MSSQL\$SQLEXPRESS$$' -o '' -c
_NumGood=1:1
The result used to be:
OK - Found 1 Services(s), 1 OK and 0 with problems (0 excluded). 'SQL Server
(SQLEXPRESS)' (MSSQL$SQLEXPRESS) is Running.
The result now is:
CRITICAL - [Triggered by _NumGood>1] - Found 2 Services(s), 2 OK and 0 with
problems (0 excluded). 'Windows Internal Database (MICROSOFT##SSEE)'
(MSSQL$MICROSOFT##SSEE) is Running, 'SQL Server (SQLEXPRESS)'
(MSSQL$SQLEXPRESS) is Running.
When run from the command line the result is:
OK - Found 1 Services(s), 1 OK and 0 with problems (0 excluded). 'SQL Server
(SQLEXPRESS)' (MSSQL$SQLEXPRESS) is Running.|'Total Service Count'=1; 'Service
Count OK State'=1;1; 'Service Count Problem State'=0; 'Excluded Service
Count'=0;
On another server that I'm using the same check:
The expanded check_command is:
$USER6$/check_wmi_plus.pl -H $HOSTADDRESS$ -m checkservice -u '$USER8$' -p
$USER9$ -a '^MSSQL\$INSTANCENAME$' -o '(empty)' -c _NumGood=1:1 (undefined)
(undefined)
And the raw commandline is:
/usr/lib/nagios/plugins/check_wmi_plus/check_wmi_plus.pl -H 5.6.7.8 -m
checkservice -u '' -p -a '^MSSQL\$INSTANCENAME$' -o '' -c _NumGood=1:1
The result used to be:
OK - Found 1 Services(s), 1 OK and 0 with problems (0 excluded). 'SQL Server
(INSTANCENAME)' (MSSQL$INSTANCENAME) is Running.
The result now is:
No Hostname specified
When run from the command line the result is:
OK - Found 1 Services(s), 1 OK and 0 with problems (0 excluded). 'SQL Server
(INSTANCENAME)' (MSSQL$INSTANCENAME) is Running.|'Total Service count'=1;
'Service Count OK State'=1;1; 'Service Count Problem State'=0; 'Excluded
Service Count'=0;
Thanks in advance for any advice!
Darhl
------------------------------------------------------------------------
"#1 Rated Pizza Chain" - ZAGAT 2010, 2011, & 2012 National Restaurant Chains
Survey
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users