NCPA can't check the windows service startup type

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gaguilard
Posts: 35
Joined: Tue Sep 03, 2019 2:39 am

NCPA can't check the windows service startup type

Post by gaguilard »

HI:

After reading the NCPA documentation, I detected that NCPA doesn´t has the possibility to detect the startup type ( automatic, manual, disabled) of a windows process as NSClient. NCPA only can check the status of a Windows Service(Running, Stopped)

We migrate from NSClient to NCPA ( because NSClient will be deprecated, and NCPA is ligther than NSClient, and use only one TCP/IP port instead three needed by NSClient, and, is part of Nagios and bla, bla ,bla) our 180 windows servers and we will install in the rest of the servers in the next two years, at the end, arround 1300 servers. ( and we will continue with workstations and other equipment that run Windows)
The problem with it is, that we are checking some core business procces that has two statuses understanded as correct, running , and stopped, last one with startup type manual. Now we are checking the statuses running and stopped as correct statuses, but, we need to know if the proccess it was stopped by a user or stoped because service crash, looking for this end the service startup type.
Do you know if is in plans improve the current Nagios Cross Platform Agent to run in 64 bits OS and have at least the same capabilities that NSCLient has?
Really is very ligth and easy to implemetn and the way that commands are implemented are correct, but, some things must be improved.

Thank you.

Gastón.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: NCPA can't check the windows service startup type

Post by pbroste »

Hello @gaguilard

Thanks for reaching out, sounds like you want to know if a specific service is running, stopped, or set to manual or delay start.

We realize that ncpa has the ability out of the box to monitor services, for example: check_xi_ncpa!-t 'welcome' -P 5693 -M 'services' -q 'service=wuauserv,status=running' or check_ncpa!-t 'API KEY' -P 5693 -M 'services' -q 'service=wuauserv,status=running'

The other option is to monitor the Windows Event logs for specific Events like; Event ID 7036. For example: check_ncpa.py -H IPaddress -t 'token' -P 5693 -M 'logs' -q 'name=SYSTEM,eventid=7036' <with args>. And there are several plugins that will do the same thing from the Nagios Exchange.

I did not ascertain any other way to pull a particular service details from the Windows o/s other than what I mentioned.

Thanks,
Perry
gaguilard
Posts: 35
Joined: Tue Sep 03, 2019 2:39 am

Re: NCPA can't check the windows service startup type

Post by gaguilard »

Hi:

Sorry if I was not be clear enough to clarify my need.

I need to know if NCPA, as NSClient ( deprecated), include or will include the possibility to check not only the service status, also, service startup type, because, we need to monitor a service and it service startup type, to know if the service is working well, or it crashed.( Possible with NSCLient but not wit NCPA)

NSClient have this capability, but NCPA not. Maybe we are not performing a will use of the command. We doesn´t know if it possible with NCPA check a servive status and it service startup type as well at the same time, and based on it, know if service is OK or not.

If not, please let me know the place to request to give to NCPA this capability.

Thank you.

Gastón.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA can't check the windows service startup type

Post by lmiltchev »

Currently, it is not possible to determine the startup type of a Windows service via NCPA. You are welcome to post a feature request for adding this functionality here:

https://github.com/NagiosEnterprises/ncpa/issues

If this is doable, our developers may be adding this functionality in one of the future releases of NCPA.

Having said that, it should be possible to achieve this goal (indirectly) by calling a custom powershell script via NCPA. If you had a PS script that could determine the startup type of a Windows service, you could call it via check_ncpa.py. Here's a few links that can help you get started.

https://stackoverflow.com/questions/430 ... powershell

https://www.tutorialspoint.com/how-to-g ... powershell

https://www.nagios.org/ncpa/help.php#ap ... es-plugins

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
gaguilard
Posts: 35
Joined: Tue Sep 03, 2019 2:39 am

Re: NCPA can't check the windows service startup type

Post by gaguilard »

Hi lmiltchev :

Thanks for your answer.

I will submit a request to have something similar to NSClient to avoid create more things which at the end makes the change management something dificult to drive.

In another hand, Nagios deprecated NSClient and suggest switch to NCPA, but for now, NCPA runs as a 32 bits applicaton and if it requiere implemen this kind of mechanism to do something that previously was available through a simple command, this is another step back.

Thank you for your reply.

Kind Regards.

Gastón
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA can't check the windows service startup type

Post by lmiltchev »

In another hand, Nagios deprecated NSClient and suggest switch to NCPA, but for now, NCPA runs as a 32 bits applicaton and if it requiere implemen this kind of mechanism to do something that previously was available through a simple command, this is another step back.
Gastón, I understand your frustration. Please do submit your request on GitGub. Our developers keep improving NCPA. I hope the functionality that you requested would be added in one of the future releases of NCPA. We really appreciate your feedback!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked