NSClient agent status

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

NSClient agent status

Post by bsivavani »

Hi,

We would like to monitor status of NSClient++.

Can you let us know if any plugin available to monitor whether NSClient running or stopped ?

Thanks.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: NSClient agent status

Post by npolovenko »

Hello, @bsivavani. Just to clarify, are you trying to monitor a status of the NSCLient using NSClient itself? You could monitor NSClient++ process, sure, but if NSClient goes down then all related checks will go critical. What I would suggest is to use a simple ping check for a host. So if the NSClient stops working you'll have an OK ping status for a host(that's how you'll know that the host is actually ok), but all the services for that host will be in critical(because the NSClient stopped). Does this answer your question?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: NSClient agent status

Post by bsivavani »

Hi,

Yes. We would like to monitor nsclient status whether it is stopped or running.

Can you explain on simple ping check for host and how it works when nsclient stop?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: NSClient agent status

Post by npolovenko »

@bsivavani, Basically If you run a Windows Server or a Windows Desktop wizard Nagios will create NSClient service checks, right?
Untitled.png
That's what it looks like. Now, imagine that the NSClient agent crashed(I manually stopped it in this case), here's what it'll look like:
Untitled3.png
You see that all services are Red because the NSCLient is not working obviously, but yet the host is still green = OK. That's because Nagios is using a separate Ping check for the host, it is not using the NSClient for this check. So as long as Nagios can ping the server the host will stay green. This is configured by default, so all you need to do is run either a Windows Server wizard or a Windows Desktop wizard.

Otherwise, when you go through a Windows Server wizard or a Windows Desktop wizard, you can add the nsclient to a list of services to monitor. This will create a new service check for the NSClient. But that is unnecessary in my opinion because of the reason above.
Untitled1.png
Hope that explains it.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: NSClient agent status

Post by bsivavani »

We need to restart the nsclient service when it finds it is in stopped state. We have developed powershell script (passive check) to send alert whenever it get restart.
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: NSClient agent status

Post by tacolover101 »

bsivavani wrote:We need to restart the nsclient service when it finds it is in stopped state. We have developed powershell script (passive check) to send alert whenever it get restart.
look at using winrmi, wmi, or any other hook you can to get into the windows system. since you're counting on NSClient++ being disabled, you won't be able to use this to restart.
npolovenko wrote:@bsivavani, Basically If you run a Windows Server or a Windows Desktop wizard Nagios will create NSClient service checks, right?
Untitled.png
That's what it looks like. Now, imagine that the NSClient agent crashed(I manually stopped it in this case), here's what it'll look like:
Untitled3.png
You see that all services are Red because the NSCLient is not working obviously, but yet the host is still green = OK. That's because Nagios is using a separate Ping check for the host, it is not using the NSClient for this check. So as long as Nagios can ping the server the host will stay green. This is configured by default, so all you need to do is run either a Windows Server wizard or a Windows Desktop wizard.

Otherwise, when you go through a Windows Server wizard or a Windows Desktop wizard, you can add the nsclient to a list of services to monitor. This will create a new service check for the NSClient. But that is unnecessary in my opinion because of the reason above.
Untitled1.png
Hope that explains it.
as mentioned above, monitoring the 'nscp' service with NSclient++ is quite silly. you will not get the expected result.

if you can use a passive check, or SNMP - those should work, but again - you'll need another hook in to restart it. i have not seen NSCP crash often, so if you're seeing issues like this i would begin to troubleshoot it instead of throwing a bandaid on.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: NSClient agent status

Post by npolovenko »

I agree with @tacolover101.
@bsivavani, Have you experienced some NSClient instabilities recently? What version of the NSClient agent are you using?
Also, there's a Recovery option in windows services menu. So you could have windows automatically restart NSclient whenever it stops.
Untitled.png
Hope this helps.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: NSClient agent status

Post by bsivavani »

Thanks for your help. We were able to do this using powershell script.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NSClient agent status

Post by tmcdonald »

Glad to hear it! Are we alright to close this up then?
Former Nagios employee
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: NSClient agent status

Post by bsivavani »

Yes. Please close.
Locked