Checks Windows NT Service is stopped.
check-ntservice --service-name=SERVICE_NAME
First, build this program.
go get github.com/mackerelio/go-check-plugins
cd $(go env GOPATH)/src/github.com/mackerelio/go-check-plugins/check-ntservice
go install
Or when you installing the mackerel-agent msi package, this plug-in is included in the installation folder. About installing mackerel-agent in Windows, see Installing mackerel-agent on Windows - Mackerel Docs.
Next, you can execute this program :-)
check-ntservice --service-name=SERVICE_NAME
If there are no problems in the execution result, add a setting in mackerel-agent.conf .
[plugin.checks.check-ntservice-sample]
command = ["check-ntservice", "--service-name", "SERVICE_NAME"]
-s, --service-name= matches if contained in service name
-x, --exclude-service= exclude if contained in service name. This option takes precedence over --service-name
-l, --list-service list service
--exact more exact checking of the service. This option applies only to --service-name.
Please execute check-ntservice -h
and you can get command line options.