Page 1 of 2
Services State of Windows servers
Posted: Wed Jul 18, 2018 8:53 pm
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.
Re: Services State of Windows servers
Posted: Thu Jul 19, 2018 9:05 am
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.
Re: Services State of Windows servers
Posted: Thu Jul 19, 2018 9:33 am
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.
Re: Services State of Windows servers
Posted: Thu Jul 19, 2018 9:56 am
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?
Re: Services State of Windows servers
Posted: Thu Jul 19, 2018 10:34 am
by jomann
It may not have been when the forum post was created, but it does seem to be the case now.
Re: Services State of Windows servers
Posted: Thu Jul 19, 2018 10:00 pm
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)
Re: Services State of Windows servers
Posted: Fri Jul 20, 2018 9:20 am
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.
Re: Services State of Windows servers
Posted: Sun Jul 22, 2018 8:34 am
by Gonela
@jomann : Still not able to understand , Could you please share syntax for this.
Re: Services State of Windows servers
Posted: Mon Jul 23, 2018 2:16 pm
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"
Re: Services State of Windows servers
Posted: Sun Jul 29, 2018 12:44 am
by Gonela
Still problem not solved . still showing same . i mean wrong output in NagiosXI