Expose trigger status for Windows services with on demand start
#4408 opened on Jul 10, 2018
Description
Feature Request
Windows services may be configured with a trigger that stops inactive services and restart them on demand when requested. These services are shown in Windows as (Trigger Start) after the startup mode. One such example is the service DNS Client (Dnscache).
Proposal:
In the Telegraf plugin win_services it would be good to add trigger info as either
a tag with the name triggered on the existing startup_mode metric (preferred).
or
a new metric triggered with value 0 (no trigger) or 1 (has trigger) in addition to state and startup_mode. Include the same tags as on startup_mode (display_name and service_name)
See https://mikefrobbins.com/2015/12/24/use-powershell-to-determine-services-with-a-starttype-of-automatic-or-manual-with-trigger-start/ and https://docs.microsoft.com/en-us/windows/desktop/services/service-trigger-events
Current behavior:
Currently only metrics for state and startup_mode are returned, none shows info if the service is configured with trigger info.
Desired behavior:
A way to see if a service is configured as Manual (Trigger Start) or Automatic (Trigger Start) and distinguish that from "normal" Manual and Automatic startup mode.
Use case: [Why is this important (helps with prioritizing requests)]
When the metrics startup_mode and state are combined it is possible to alert on all services that should be started actually are started without having to list each service being monitored. This works well for services with startup mode Automatic.
It also works for services in startup mode Automatic (Trigger Start) if they are not stopped by Windows awaiting on-demand start. Monitoring these services gives false alarms since they are in state stopped and startup mode automatic. It would be good to be able to filter these kind of services out (and possibly monitor them in other ways).