Page 1 of 1

check_winservice

Posted: Sat Jan 29, 2022 11:56 pm
by cfgfile
Hi,

How do I run check_winservice from nagios? I have successfully run it from target windows server but trying to invoke it with either command not found or nagios help prompt.

Re: check_winservice

Posted: Mon Jan 31, 2022 5:15 pm
by gormank
Since it looks like you're using nsclient you'd want to add a command to nsclient.ini under scripts something like the following:

[/settings/external scripts/scripts]
check_winservice = scripts\\check_winservice.exe $ARGS$

Then create a service in Nagios to run the command with the desired arguments on the Windows host.

That said, nsclient has an internal check_service command that can be used to check Windows services.