Page 1 of 1

NCPA passive checks

Posted: Wed Nov 20, 2019 3:13 pm
by peskyvarmit
Hi folks. I'm configuring an environment where the chosen method of implementation is strictly NCPA passive checks -> XI

The intent is to separate each passive service such that the notification for each passive service could be sent to different e-mail addresses, but the passive services are the same across a number of different servers. The ability to separate out these e-mails via the .cfg entries doesn't seem to exist.

I'm trying to grasp a method of achieving this without having to hand-edit each host after it's added to XI. Our NCPA package contains a bunch of passive entries that work just fine when XI is set to configure auto-import of services, but then I'd have to edit each one to make the destination e-mail address different. They also won't auto-associate with a service template. I'm really trying to avoid additional manual work after adding our NCPA service and .cfg entries.

Any suggestions are appreciated! Thank you!

Re: NCPA passive checks

Posted: Wed Nov 20, 2019 5:15 pm
by mbellerue
Rather than manually adding, or allowing auto-import to create your NCPA services, could you write a script to use the API to create those services? In the API you can specify contacts and contact groups. Or you could let auto-import do its thing, and use the API to alter them after the fact. Would either of those work?

Edit:
Also, welcome to the forum!

Re: NCPA passive checks

Posted: Wed Nov 20, 2019 5:55 pm
by peskyvarmit
Hi there mbellerue, thank you for replying :)

I am trying to leverage the use of service templates as the point of delineation for a particular service. Here's what I did:
1. Create a 'service' in CCM for cpu_usage
2. Create a service template for cpu_usage, associate with the same service
3. Create a cpu_usage NCPA passive check on a server such as:
%HOSTNAME%|cpu_usage|1620 = cpu/percent --warning 95 --critical 98 --aggregate avg

The problem I'm encountering now is that I was forced to enter a check_dummy cmd in the Service in (1.) above, and it's running periodically and wiping out the results being received from the NCPA passive check reap.

Am I approaching this all wrong? lol

Re: NCPA passive checks

Posted: Thu Nov 21, 2019 10:44 am
by scottwilkerson
In the service definition turn Active checks off
also, if you turned on "Check freshness" make sure the "Freshness threshold" is set to longer than the frequency of passive results from the remote host.

Re: NCPA passive checks

Posted: Thu Nov 21, 2019 5:01 pm
by peskyvarmit
Perfect answer! Thank you sir! I'm curious why the default is 'skip' and not 'off' .. hmm..

Please go ahead and lock thread :)

Re: NCPA passive checks

Posted: Thu Nov 21, 2019 5:05 pm
by scottwilkerson
peskyvarmit wrote:Perfect answer! Thank you sir! I'm curious why the default is 'skip' and not 'off' .. hmm..

Please go ahead and lock thread :)
Skip means to inherit results from template if they exist and is the default.

Locking thread