Page 1 of 1
NSClient agent status
Posted: Thu Jan 25, 2018 11:28 am
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.
Re: NSClient agent status
Posted: Thu Jan 25, 2018 3:45 pm
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?
Re: NSClient agent status
Posted: Fri Jan 26, 2018 1:01 am
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?
Re: NSClient agent status
Posted: Fri Jan 26, 2018 12:05 pm
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.
Re: NSClient agent status
Posted: Sun Jan 28, 2018 8:40 am
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.
Re: NSClient agent status
Posted: Mon Jan 29, 2018 2:26 am
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.
Re: NSClient agent status
Posted: Mon Jan 29, 2018 11:06 am
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.
Re: NSClient agent status
Posted: Mon Feb 05, 2018 5:01 am
by bsivavani
Thanks for your help. We were able to do this using powershell script.
Re: NSClient agent status
Posted: Mon Feb 05, 2018 10:58 am
by tmcdonald
Glad to hear it! Are we alright to close this up then?
Re: NSClient agent status
Posted: Wed Feb 07, 2018 9:17 am
by bsivavani
Yes. Please close.