Services State of Windows servers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Gonela
Posts: 135
Joined: Wed Jan 10, 2018 5:23 am

Services State of Windows servers

Post by Gonela »

Hi Team,

Is there any way to monitor check one services state .

Ex : Startup status of services configured like :

1. Automatic
2. Manual
3. Stopped

We need what is the status of particular service state of above through monitoring.
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Services State of Windows servers

Post by jomann »

Taking a quick look through the exchange I didn't see anything directly monitoring the actual startup type. If you know of a way to get the startup status in Powershell you can definitely install an agent like NCPA and run the script to check for these values. It would require a bit of custom development on your part. The agent itself only shows the current status of the service, such as running or stopped.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Services State of Windows servers

Post by tgriep »

I found this Forum post with instructions and a link to an external plugin that may work for your needs.
https://support.nagios.com/forum/viewto ... 08&start=0

The external plugin is called check_winservice and the website for where you can get it is here.
https://www.itefix.net/check_winservice
Try it out and see if it will work for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
lpereira
Posts: 143
Joined: Thu Jul 27, 2017 4:23 pm

Re: Services State of Windows servers

Post by lpereira »

i have found that very interesting as well. However the plugin seems to be part of a package that needs to be purchased. Is that correct?
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Services State of Windows servers

Post by jomann »

It may not have been when the forum post was created, but it does seem to be the case now.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Gonela
Posts: 135
Joined: Wed Jan 10, 2018 5:23 am

Re: Services State of Windows servers

Post by Gonela »

Here is the command . But i'm getting wrong information about service .

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H XX.XX.XX.XX -t 120 -c check_service -a "filter=name in ('wuauserv')" "crit=start_type!= ('auto' OR 'delayed')" "show-all"
Nsclient Version : 0.5

Output :

Code: Select all

Server 1  --> Windows Update Service	Warning	warning(wuauserv=stopped (delayed))
Server 2  --> Windows Update Service	Ok	         wuauserv=stopped (delayed)
Server 3  --> Windows Update Service	Ok	         wuauserv=stopped (delayed)
Server 4  --> Windows Update Service	Warning	warning(wuauserv=stopped (auto))
Server 5  --> Windows Update Service	Ok	        wuauserv=stopped (delayed)
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Services State of Windows servers

Post by jomann »

In this list here, it has a default value for the warning option which might be the reason you're getting warnings (no criticals because they are all in either auto or delayed state) https://docs.nsclient.org/reference/win ... ce_options

Particularly this part
warning-default.PNG
The ones with the state=stopped next to them are stopped so it is giving a warning, but not a crit.
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.
Gonela
Posts: 135
Joined: Wed Jan 10, 2018 5:23 am

Re: Services State of Windows servers

Post by Gonela »

@jomann : Still not able to understand , Could you please share syntax for this.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Services State of Windows servers

Post by scottwilkerson »

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H XX.XX.XX.XX -t 120 -c check_service -a "filter=name in ('wuauserv')" "crit=start_type!= ('auto' OR 'delayed')" "warn=not state_is_ok()" "show-all"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Gonela
Posts: 135
Joined: Wed Jan 10, 2018 5:23 am

Re: Services State of Windows servers

Post by Gonela »

Still problem not solved . still showing same . i mean wrong output in NagiosXI
Locked