Start with a service that should stay running
A useful service alert begins with an expectation: this named service should be running on this device during this period. A stopped service is not automatically a fault. Demand-start services, scheduled jobs and components that run only when a user needs them can be quiet by design.
Write down the service owner, why it matters, what state is normal and the first diagnostic step. If nobody knows what to do when an alert arrives, first improve the runbook. A shorter polling interval cannot supply that missing context.
Find the exact name on Ubuntu
For systemd system services, start with a read-only inspection:
systemctl list-units --type=service --all
systemctl show ssh.service --property=LoadState,ActiveState,SubState
The example inspects ssh.service; choose the actual unit for your application. Read LoadState and ActiveState together. A unit that is not loaded is different from a loaded unit that is inactive. Also confirm that the unit is a persistent system service. A oneshot task can finish successfully and then become inactive without a problem.
These command forms were checked against the upstream documentation; the property query was also run on the website test VM. No production service was stopped. See systemctl's reference for its full query behavior.
Find the exact name on Windows
Use PowerShell's Name field rather than the friendly DisplayName:
Get-Service | Select-Object Name,DisplayName,Status
Get-Service -Name Spooler
Spooler is a recognizable example, not a recommendation to monitor printing on every device. Verify the service's role first. These are read-only command examples reviewed against Microsoft Get-Service; they were not rerun on a Windows device for this website release.
If an administrator sees the service but a restricted collector cannot query it, treat the result as unknown. Do not label access denied as stopped or grant broad privileges simply to remove the unknown label.
Choose a duration, not just a state
A short service restart during an authorized upgrade may be expected. A sustained-stop rule waits for fresh, repeated observations over a chosen elapsed duration. This reduces alerts from short transitions, but it also delays detection. Choose the tradeoff based on the service's role.
IronAgents's reviewed implementation polls selected names on the normal one-minute check-in. A one-minute stopped rule usually needs one or two check-in intervals, plus worker time. It cannot observe every failure between polls. Increasing the duration further delays detection; it does not make the source measurement more precise.
Test the entire path on a disposable service
- Establish a healthy Running observation and confirm the exact selected name.
- Use a disposable test service on a device authorized for lifecycle testing.
- Stop only that fixture and wait beyond the configured duration.
- Confirm a separate service incident, the observed state and its timing.
- Restore the fixture and verify a fresh Running observation closes the incident.
- Check notification history and remove the test fixture and selection afterward.
Do not stop remote access, security tools or a business service to prove that an alert works. IronAgents's repository records successful disposable Linux and Windows service lifecycle tests; this website build does not repeat those application tests.
Keep the investigation separate from remediation
A monitoring observation should lead to a deliberate next action. Read the service's own logs and dependencies before restarting it. A recurring stop may be an application crash, a dependency failure or expected behavior the rule did not account for.
IronAgents supports selected-service observations and sustained-stop incidents on Windows and Ubuntu. It does not automatically restart services or run arbitrary remediation scripts. Its service documentation explains supported names, inheritance, unknown states and maintenance behavior.