Dear people,
I want to check services on a Server 2008 R2. This is working fine but I get an warning because more services are found. I have two services which starts with the same string but at the second is test added.
How can I use exactly the service name?
BR
more services matching string
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: more services matching string
What are you currently using to check the services running? Are you trying to find a way to verify a certain group of services are running, and if a new service is added you should get a warning or critical?
Re: more services matching string
I'm using
check_xi_serivce_snmp_win_service! -C public --v2c -n 'MSSQLSER'
I get a warning that 2 services are found.
One is the "MSSQLSERVER" and the second one is "MSSQLSERVERADHelper100". But I just want the "MSSQLSERVER".
BR
check_xi_serivce_snmp_win_service! -C public --v2c -n 'MSSQLSER'
I get a warning that 2 services are found.
One is the "MSSQLSERVER" and the second one is "MSSQLSERVERADHelper100". But I just want the "MSSQLSERVER".
BR
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: more services matching string
Can you share the full command definition with us? You should be able to place an exclusion rule in the command.
Open CCM > Commands > Find the command's name and share the string with us. Thanks!
Open CCM > Commands > Find the command's name and share the string with us. Thanks!
Re: more services matching string
Sorry for being so late.
Here is the string:
$USER1$/check_snmp_win.pl -H $HOSTADDRESS$ $ARG1$
BR
Here is the string:
$USER1$/check_snmp_win.pl -H $HOSTADDRESS$ $ARG1$
BR
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: more services matching string
It looks like it will try to match any service with the defined text, so it will include the additional one as well. Have you considered using NSClient++ to check the true service name via the Windows Server monitoring wizard?
Re: more services matching string
I solved it now. I use the -r switch so I can match the exact name of the service.
In my case:
check_xi_service_snmp_win_service! -C public --v2c -n 'SQL Server (MSSQLSERVER)' -r
BR
In my case:
check_xi_service_snmp_win_service! -C public --v2c -n 'SQL Server (MSSQLSERVER)' -r
BR