Page 1 of 1
windows WMI service check does not like parenthesis
Posted: Thu Nov 04, 2021 7:44 am
by btayl
Trying to do a windows WMI service check and the service looks like this RL.(Prod).Email.Service and it does not like the parenthesis and if I put and * in the center RL.*.Email.Service it finds two services RL.(Prod).Email.Service and RL.(Corporate_Risk_Prod).Email.Service. not sure how to fix this ?
Re: windows WMI service check does not like parenthesis
Posted: Fri Nov 05, 2021 9:33 am
by ssax
These are working for me:
Code: Select all
/usr/local/nagios/libexec/check_wmi_plus.pl -H X.X.X.X -u 'DOMAIN/username' -p 'password' -m checkservice -a "RL.\(Prod\).Email.Service" -c _Total=1: -c 0
/usr/local/nagios/libexec/check_wmi_plus.pl -H X.X.X.X -u 'DOMAIN/username' -p 'password' -m checkservice -a "RL.\(Corporate_Risk_Prod\).Email.Service" -c _Total=1: -c 0
These do too:
Code: Select all
/usr/local/nagios/libexec/check_wmi_plus.pl -H X.X.X.X -u 'DOMAIN/username' -p 'password' -m checkservice -a 'RL.\(Prod\).Email.Service' -c _Total=1: -c 0
/usr/local/nagios/libexec/check_wmi_plus.pl -H X.X.X.X -u 'DOMAIN/username' -p 'password' -m checkservice -a 'RL.\(Corporate_Risk_Prod\).Email.Service' -c _Total=1: -c 0
Re: windows WMI service check does not like parenthesis
Posted: Fri Nov 05, 2021 10:39 am
by btayl
using "\" the worked thanks for showing me how to escape the parenthesis.
RL.\(Prod\).Email.Service
Re: windows WMI service check does not like parenthesis
Posted: Mon Nov 08, 2021 3:33 pm
by ssax
No problem, glad to help, let us know when we're okay to lock this up and mark it as resolved.
Thank you!