Windows Service Monitoring
-
HBRMonitoring
- Posts: 27
- Joined: Mon Oct 05, 2020 10:19 am
Windows Service Monitoring
Hi All,
I want to monitor a few Windows services from services.msc. Kindly let me know what is the procedure. I searched a lot of materials, but I am not able to get the needed results.
I want to monitor a few Windows services from services.msc. Kindly let me know what is the procedure. I searched a lot of materials, but I am not able to get the needed results.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Windows Service Monitoring
Hi,
You can use the NCPA Agent to monitor Windows services. First install the NCPA agent on the window system, and then run the NCPA Windows to help get service checks setup.
NCPA Agent Installation Instructions
How To Monitor Devices Using The NCPA Agent and Wizard
Let us know if you're able to get it setup or if you have any questions.
--Benjamin
The NCPA API Reference
https://www.nagios.org/ncpa/help.php
A sample check command for checking a Windows service using NCPA.
You can use the NCPA Agent to monitor Windows services. First install the NCPA agent on the window system, and then run the NCPA Windows to help get service checks setup.
NCPA Agent Installation Instructions
How To Monitor Devices Using The NCPA Agent and Wizard
Let us know if you're able to get it setup or if you have any questions.
--Benjamin
The NCPA API Reference
https://www.nagios.org/ncpa/help.php
A sample check command for checking a Windows service using NCPA.
Code: Select all
./check_ncpa.py -H 10.25.14.91 -t Str0ngT0k3n -M services -q service=Spooler,status=running
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
HBRMonitoring
- Posts: 27
- Joined: Mon Oct 05, 2020 10:19 am
Re: Windows Service Monitoring
Thanks Benjamin for the response.
We have installed NSClient++ for the windows servers and are monitoring few infra components of Windows OS. Can we also install NPCA agent too? being fairly new to Nagios, I am trying to understand things. Kindly help me.
We have installed NSClient++ for the windows servers and are monitoring few infra components of Windows OS. Can we also install NPCA agent too? being fairly new to Nagios, I am trying to understand things. Kindly help me.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Windows Service Monitoring
Hi,
Let us know if you have more questions.
Benjamin
Yes. You can have both of them running on the same system without issue. I highly recommend using NCPA. It's our agent and it's fully supported by Nagios Enterprises.Can we also install NPCA agent too? being fairly new to Nagios, I am trying to understand things. Kindly help me.
Let us know if you have more questions.
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
HBRMonitoring
- Posts: 27
- Joined: Mon Oct 05, 2020 10:19 am
Re: Windows Service Monitoring
I got the NCPA agent installed and tried to monitor the W32Time service on a windows box, but its not working. I am getting the below error:
COMMAND: /usr/local/nagios/libexec/check_ncpa.py -H <my host FQDN is here> -t '<My token password>' -P 5693 -M 'service/W32Time/running' -v
OUTPUT: Connecting to: https://<my host FQDN is here>:5693/api/service/W32Time/running/?token=<My token password>&check=1
File returned contained:
{
"returncode": 3,
"stdout": "UNKNOWN: The node (service) requested does not exist. You may be trying to access the 'services' node."
}
An error occurred:'value'
Kindly help
COMMAND: /usr/local/nagios/libexec/check_ncpa.py -H <my host FQDN is here> -t '<My token password>' -P 5693 -M 'service/W32Time/running' -v
OUTPUT: Connecting to: https://<my host FQDN is here>:5693/api/service/W32Time/running/?token=<My token password>&check=1
File returned contained:
{
"returncode": 3,
"stdout": "UNKNOWN: The node (service) requested does not exist. You may be trying to access the 'services' node."
}
An error occurred:'value'
Kindly help
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Windows Service Monitoring
Hi,
Please try the following command and let me know if that works on your system. If not, post the output error to the thread. Thanks, Benjamin
Reference
https://support.nagios.com/kb/article/s ... s-775.html
Please try the following command and let me know if that works on your system. If not, post the output error to the thread. Thanks, Benjamin
Code: Select all
./check_ncpa.py -H <ip address> -t 'token' -M services -q service=W32Time,status=running
Reference
https://support.nagios.com/kb/article/s ... s-775.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
HBRMonitoring
- Posts: 27
- Joined: Mon Oct 05, 2020 10:19 am
Re: Windows Service Monitoring
I ran on the Nagios server as belwo
/usr/local/nagios/libexec/check_ncpa.py -H <IP_of_end_Server> -t 'token' -M services -q service=W32Time,status=running
UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details.
SHould I run this on end server too and check?
/usr/local/nagios/libexec/check_ncpa.py -H <IP_of_end_Server> -t 'token' -M services -q service=W32Time,status=running
UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details.
SHould I run this on end server too and check?
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Windows Service Monitoring
HI,
Is NCPA running on the remote hosts, it looks like it's not connecting. Try running the command with the verbose option (-v):
Can you run a simple version check against the host?
If that's not working try running curl command to test the connectivity.
Is NCPA running on the remote hosts, it looks like it's not connecting. Try running the command with the verbose option (-v):
Code: Select all
./check_ncpa.py -H <ip address> -t 'token' -M services -q service=W32Time,status=running -v
Code: Select all
./check_ncpa.py -H 192.168.254.119 -t 'token' -V
Code: Select all
curl -k -L -v https://<ip address>:5693
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
HBRMonitoring
- Posts: 27
- Joined: Mon Oct 05, 2020 10:19 am
Re: Windows Service Monitoring
This is a windows server and I cant see the script check_ncpa.py.
Is this an issue? or is there any other command/script?
Is this an issue? or is there any other command/script?
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Windows Service Monitoring
HI,
Open a terminal in Nagios XI and try running the plugin once more. If it fails, please post the output to the thread. Also, make sure you have the correct token to pass to NCPA.
So, check_ncpa.py would actually be the script called on the Nagios XI side. This plugin will communicate directly with NCPA and get the results of the service check.This is a windows server and I cant see the script check_ncpa.py.
Open a terminal in Nagios XI and try running the plugin once more. If it fails, please post the output to the thread. Also, make sure you have the correct token to pass to NCPA.
Code: Select all
cd /usr/local/nagios/libexec/
./check_ncpa.py -H <ip address of Windows server> -t 'token' -M services -q service=W32Time,status=running -v
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!