more services matching string

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
blackpuma
Posts: 5
Joined: Thu Jun 27, 2013 2:47 am

more services matching string

Post by blackpuma »

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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: more services matching string

Post by slansing »

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?
blackpuma
Posts: 5
Joined: Thu Jun 27, 2013 2:47 am

Re: more services matching string

Post by blackpuma »

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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: more services matching string

Post by slansing »

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!
blackpuma
Posts: 5
Joined: Thu Jun 27, 2013 2:47 am

Re: more services matching string

Post by blackpuma »

Sorry for being so late.

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

Post by slansing »

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?
blackpuma
Posts: 5
Joined: Thu Jun 27, 2013 2:47 am

Re: more services matching string

Post by blackpuma »

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
Locked