Page 1 of 1

Pattern Matching Windows Service Checks

Posted: Sun Feb 01, 2015 10:23 am
by zovy
I would like to implement a single check for multiple similarly named services.
Service Package Customer 123 SYS
Service Package Customer 456 SYS
Service Package Customer 789 SYS
I found something on the NSClient++ page but not sure how to implement it or if there is an easier more efficient way. In each case the customer number has a static 6 digit code. I'd like to group a pattern for different service packages for each customer rather than define an explicit check or every service.

http://www.nsclient.org/nscp/ticket/398

Re: Pattern Matching Windows Service Checks

Posted: Sun Feb 01, 2015 7:11 pm
by Box293
OK so what you are tying to do is possible, but only in the very latest version 0.4.3.127

Here's a test I did. I have a couple of different services I have created on a test machine that allows me to test different versions of NSClient++. They are normally set to manual startup but I set two of them to Automatic. I then executed the following check:

Code: Select all

Command:
check_nrpe -H win2008r2-01 -c check_service -a "filter=name like 'NSC'" show-all

Output:
CRITICAL: NSClientpp 0.4.2.114=stopped (auto), NSClientpp 0.4.2.93=stopped (auto), delayed ()|
Be careful ... 0.4.3 is still buggy.

Re: Pattern Matching Windows Service Checks

Posted: Mon Feb 02, 2015 10:44 am
by lmiltchev
zovy, let us know if Box293 answered your question.

Re: Pattern Matching Windows Service Checks

Posted: Mon Feb 02, 2015 11:09 am
by zovy
Thanks guys I will advise shortly. When I see that this specific version is buggy, could you provide a little more insight as to what has been observed as buggy? If it's a matter of holding out a few weeks for a stable release I'm all for that. What I don't want to do is introduce a new client that isn't reliable as that would defeat the purpose.

Re: Pattern Matching Windows Service Checks

Posted: Mon Feb 02, 2015 11:47 am
by lmiltchev
Be careful ... 0.4.3 is still buggy.
I am not sure if Troy had something in particular in mind, but you can probably browse the issues that were reported with the 0.4.3 version here:
https://github.com/mickem/nscp/issues

Re: Pattern Matching Windows Service Checks

Posted: Mon Feb 02, 2015 1:28 pm
by zovy
Ah yes thanks for that direct link. These should not be of any particular issue for the hosts I wanted to monitor in this capacity. I'll be applying in my test lab and then roll out an update to one of my prod servers and see how she goes. I'll need a few days so can we leave this unlocked for at least the rest of this week? I imagine to be complete with testing prior to then but we all know how Monday goes ...

Re: Pattern Matching Windows Service Checks

Posted: Mon Feb 02, 2015 3:55 pm
by lmiltchev
I'll need a few days so can we leave this unlocked for at least the rest of this week? I imagine to be complete with testing prior to then but we all know how Monday goes ...
No problem, zovy. We will leave this thread open for the time being. Keep us posted.