You are here

Monitor 2 services using and OR function

3 posts / 0 new
Last post
LiamHammersley
LiamHammersley's picture
Monitor 2 services using and OR function

Hi All,

Is it possible to montor 2 services using a single service check. I am wanting to Monitor if Symantec Endpoint Protection is started on my servers but Symantec have changed the Service that runs from version 11 to version 12.So I was hoping that I could look for both services and if one was there then it returns an OK status instead of critical.

I have tried doing this: 

./check_nrpe -H 7395-web04.brauer-sc.wan -c nsc_checkservicestate -a 'ShowAll "Symantec AntiVirus=started" SepMasterService=started'   But it returns this:   CRITICAL: Symantec AntiVirus: not found (critical), SepMasterService: started   So I get a Critical failure when I apply it to a host, but I want it to read as a success as the SepMasterService is started.   Is this possible?

 

awijntje
awijntje's picture
Re: Monitor 2 services using and OR function

he there,

as far as I know it is not possible within nsclient to perform an OR check (or atleast I can't find an example of how this should work on the nsclient++ site).

I would personally suggest using host-attributes for instance SYMANTEC and use that (so you can set on a per host basis which service it should check.

Your check would look like this then: 

./check_nrpe -H 7395-web04.brauer-sc.wan -c nsc_checkservicestate -a 'ShowAll "%SYMANTEC%=started"'

then on a host you can set the attribute to "Symantec AntiVirus" or "SepMasterService" (and set the default to the most common value then you only need to set the host with the new version.

hope this helps,

Alan

LiamHammersley
LiamHammersley's picture
Re: Monitor 2 services using and OR function

Thanks for that Alan, 

Looks like that will be the cleanest way of doing what I am after.