[SOLVED] How do i Exclude multiple services check_wmi_plus

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
litsupport.box
Posts: 80
Joined: Wed Apr 02, 2014 7:24 am

[SOLVED] How do i Exclude multiple services check_wmi_plus

Post by litsupport.box »

How do i exclude multiple services from the check_wmi_plus check?

I have the following: this works for 1 service

Code: Select all

[root@ libexec]#  /[b]usr/local/nagios/libexec/check_wmi_plus.pl -H SQLSERVER -u 'username' -p 'password'  -m checkservice -a Auto -a MSSQLSERVER -c 1 -o 'MSSQLServerOLAPService' -t 600[/b]
OK - Found 4 Services(s), 3 OK and 1 with problems (1 excluded). 'SQL Full-text Filter Daemon Launcher (MSSQLSERVER)' (MSSQLFDLauncher) is Running, 'SQL Server (MSSQLSERVER)' (MSSQLSERVER) is Running, 'SQL Server Reporting Services (MSSQLSERVER)' (ReportServer) is Running, 'SQL Server Agent (MSSQLSERVER)' (SQLSERVERAGENT) is Stopped.|'Total Service Count'=4; 'Service Count OK State'=3; 'Service Count Problem State'=1;1; 'Excluded Service Count'=1;
I still want to exclude: SQL Full-text Filter Daemon Launcher and SQL Server Reporting Services and SQL Server Agent so only SQL Server is to be checked.

What am i missing here? Is there a way to check 1 specific service when there is a match in (service description)?
Last edited by litsupport.box on Mon May 18, 2015 4:04 am, edited 1 time in total.
Nagios XI Version : 2014R2.6
fqdn 2.6.32-431.17.1.el6.x86_64 x86_64
CentOS release 6.5 (Final)
Gnome is not installed
Proxy appears to be in use
VMware Image
Mod Gearman
litsupport.box
Posts: 80
Joined: Wed Apr 02, 2014 7:24 am

Re: How do i Exclude multiple services check_wmi_plus

Post by litsupport.box »

Nevermind Found it:

using pipes:

Code: Select all

 -o "MSSQLServerOLAPService|SQLSERVERAGENT" 
command:

Code: Select all

[root@ libexec]#  /usr/local/nagios/libexec/check_wmi_plus.pl -H server -u 'username' -p 'password'  -m checkservice -a Auto -a MSSQLSERVER -c 1 -o "MSSQLServerOLAPService|SQLSERVERAGENT" -t 600
OK - Found 3 Services(s), 3 OK and 0 with problems (2 excluded). 'SQL Full-text Filter Daemon Launcher (MSSQLSERVER)' (MSSQLFDLauncher) is Running, 'SQL Server (MSSQLSERVER)' (MSSQLSERVER) is Running, 'SQL Server Reporting Services (MSSQLSERVER)' (ReportServer) is Running.|'Total Service Count'=3; 'Service Count OK State'=3; 'Service Count Problem State'=0;1; 'Excluded Service Count'=2;
note: i used double quotes: " "

All happy now:

Code: Select all

OK - Found 1 Services(s), 1 OK and 0 with problems (7 excluded). 'SQL Server (MSSQLSERVER)' (MSSQLSERVER) is Running.
my colleague found this in the changelog of check_wmi_plus version 1.58
Nagios XI Version : 2014R2.6
fqdn 2.6.32-431.17.1.el6.x86_64 x86_64
CentOS release 6.5 (Final)
Gnome is not installed
Proxy appears to be in use
VMware Image
Mod Gearman
Locked