247-IT Guide
UPS in PRTG, Zabbix and Prometheus: the health endpoint
Polling a UPS directly via SNMP gives you one sensor per device and no answer to whether the Hyper-V hosts behind it are reachable or an emergency shutdown is running right now. The health endpoint of the UPS Hyper-V Shutdown Monitor (Enterprise) delivers both from one source: as JSON, as plain text, in the Prometheus text format and in PRTG's native format. This guide walks through the setup in PRTG, Zabbix, Prometheus and Grafana with concrete values and explains what triggers WARN and CRIT.
Why one endpoint instead of SNMP per UPS
PRTG, Zabbix and Prometheus can poll a UPS network card directly via SNMP. That works, but it leaves three gaps. Each UPS needs its own sensor with the OIDs of its vendor; an APC, an Eaton and an RFC 1628 device look different in the monitoring tool. What “critical” means is defined per sensor. And the card knows nothing about the servers that hang on the UPS, or whether the shutdown software is working at this moment.
The UPS Hyper-V Shutdown Monitor has this information anyway: it polls the UPS devices via SNMP or NUT, checks the reachability of Hyper-V hosts and additional servers via WinRM, and decides about the shutdown. The health endpoint exposes that state:
- One source — every UPS, Hyper-V host and additional server of an installation in one answer, regardless of UPS vendor.
- State instead of raw values — the monitor condenses everything into one level:
Ok,Warning,CriticalorUnknown. The raw values are still there next to it. - Shutdown visible — per UPS a field
shutdownInProgressthat stays set from the moment the emergency shutdown fires until mains power is confirmed back. - Hosts included — per host the result of the last reachability check, every 120 seconds by default.
One point belongs here from the start: the endpoint shows the state as the monitor sees it. It is not a second, independent measurement path to the UPS. What that means for alerting is covered in section 08.
The four endpoints
The endpoint runs inside the Windows service, on port 9099 by default, and answers
GET requests on four paths only. Anything else returns 404, any other method 405, more than eight
concurrent requests 429.
| Path | Format | HTTP code | Meant for |
|---|---|---|---|
/health | JSON: status, generatedAt, serviceStartedAt, upsDevices[], hosts[] | 200 for Ok, 503 for Critical and Unknown; Warning 200, or 503 with HealthEndpointWarnAsError | Your own scripts, Zabbix via JSONPath, PRTG “REST Custom” |
/health/simple | One line of plain text: OK, WARN, CRIT or UNKNOWN | Same as /health | Uptime sensors that only evaluate status code and text |
/metrics | Prometheus text format 0.0.4, families upshypervshutdown_* | Always 200 | Prometheus, Grafana, Zabbix “Prometheus pattern” |
/prtg | JSON in the schema {"prtg":{"result":[…],"text":"…"}} | Always 200 | PRTG sensor “HTTP Data Advanced” |
That /metrics and /prtg answer with 200 even at Critical is deliberate. A
scraper treats a 503 as a failed scrape and discards the response, which is exactly the data that
matters during a power outage. The state is carried by the metric
upshypervshutdown_health_level and by the channel “Overall Health” instead.
The /health JSON carries, per UPS, name, status, battery charge, runtime, load, input
voltage, the further readings, phases, time of the last poll, battery replacement flag, last
self-test, shutdownInProgress, onBypass and the list alarms;
per host name, hostname, reachable, a message and the time of the last check.
Passwords, SNMP communities, WinRM credentials and license data are not included.
Enabling and securing the endpoint
In the desktop app under “General” settings, tab “Monitoring”: tick “Enable HTTP API”, check port
and bind address, then generate a bearer token below. The same fields exist in the remote web
interface. Alternatively in config.json:
"HealthEndpointEnabled": true,
"HealthEndpointPort": 9099,
"HealthEndpointBindAddress": "192.168.10.20",
"HealthEndpointAllowedIps": ["192.168.10.50"],
"HealthEndpointAllowQueryToken": false,
"HealthEndpointWarnAsError": false
Generate the token in the app; it stores it encrypted with DPAPI. Each of these settings takes effect only after a service restart, because the endpoint starts once at service startup and not on every configuration reload.
- Bind address — default
127.0.0.1, reachable only on the machine running the service. For a monitoring server elsewhere, enter the server's actual IP or+for all interfaces, and open the port in Windows Firewall for the monitoring server's address only.localhostis deliberately mapped to127.0.0.1, because a hostname prefix in HTTP.sys would otherwise listen on all interfaces. - Bearer token — once set, every request must carry the header
Authorization: Bearer <token>, otherwise 401. The comparison runs in constant time. PRTG, Zabbix and Prometheus can set this header. - Token in the URL — for checks without a header field, the endpoint also accepts
?token=…as long asHealthEndpointAllowQueryTokenistrue(the default, so existing installations keep working). A token in the URL ends up in plain text in HTTP.sys access logs, proxy logs, browser history and the sensor configuration. If an Authorization header is present, even with a wrong value, only the header counts; the URL cannot bypass a wrong header. Switch the URL path off once all tools send the header. - IP allowlist —
HealthEndpointAllowedIpstakes exact IPv4 or IPv6 addresses, no CIDR. Requests from other senders get 403, before the token check. - No TLS — the endpoint speaks plain HTTP only. The token protects against unintended access such as port scans, not against someone reading the traffic. Outside the management network, put a reverse proxy with a certificate in front, such as IIS or nginx forwarding to
127.0.0.1:9099.
First test from the monitoring server, in PowerShell:
Invoke-RestMethod -Uri "http://ups-monitor.example.local:9099/health/simple" `
-Headers @{ Authorization = "Bearer <token>" }
The answer is OK, WARN, CRIT or UNKNOWN.
Right after the service starts, UNKNOWN is normal until the first UPS poll has been
answered.
PRTG: HTTP Data Advanced against /prtg
- Create a device — in PRTG, a device for the server running the service, for example
ups-monitor.example.local. - Sensor “HTTP Data Advanced” — enter
http://ups-monitor.example.local:9099/prtgas the URL. A scanning interval of 60 seconds is enough; the monitor polls the UPS every 30 seconds by default, so there are no newer values to fetch more often. - Token — in the sensor's field for custom HTTP headers, enter
Authorization: Bearer <token>. Only if your PRTG version lacks that field, fall back to…/prtg?token=<token>with the drawbacks from section 03. - Check the channels — PRTG creates them from the response: “Overall Health”, “Configured UPS Devices”, “Configured Hosts”, per UPS “Battery”, “Runtime”, “Load” and “Shutdown In Progress”, per host “Reachable”, then per UPS “On Bypass”, “Active Alarms”, readings such as “Input Voltage” or “Temperature”, and for three-phase units “L1 Input Voltage” to “L3 Load”. The sensor message reads, for example, “2/2 UPS, 3/3 hosts reporting”.
- Configure nothing for the status — the channel “Overall Health” brings its own limits: an error limit at 2.5 turns the sensor red at Critical (3), a separate warning flag turns it yellow at Warning and Unknown. Ok (1) stays green.
PRTG shows at most 50 channels per sensor. With four UPS devices and ten hosts,
status and host channels take 29, bypass and alarms another 8; measurement and phase channels sit
deliberately at the end of the list and are cut first, never the overall status. If you need the
readings of a large fleet, add a second sensor “REST Custom” against /health and map
fields such as $.upsDevices[0].batteryChargePercent. For a plain traffic light, an
“HTTP” sensor on /health/simple is enough: a 503 puts it into the down state.
Zabbix: HTTP agent with Prometheus preprocessing
Zabbix needs no agent on the monitor server. An item of type “HTTP agent” fetches
/metrics, and the preprocessing step “Prometheus pattern” extracts single values
(available in Zabbix 6.0 LTS and newer).
- Master item — type “HTTP agent”, URL
http://ups-monitor.example.local:9099/metrics, under “Headers”Authorizationwith the valueBearer <token>, type of information “Text”, interval 1 minute. Leave “Required status codes” at 200;/metricsalways returns 200. - Dependent items — one “Dependent item” per value with the preprocessing step “Prometheus pattern”:
upshypervshutdown_health_levelfor the level,upshypervshutdown_ups_battery_percent{ups="UPS-Rack-1"}for the battery charge,upshypervshutdown_ups_battery_runtime_seconds{ups="UPS-Rack-1"}for the runtime,upshypervshutdown_host_reachable{host="HV-01"}per host. The UPS name in the label is the name from the monitor's configuration. - Triggers —
last(/UPS Monitor/health.level)=3with severity “High”,=2with “Warning”,=0also “Warning”, plusnodata(/UPS Monitor/health.level,5m)=1for a failed fetch. A dedicated rule for the running emergency shutdown:last(/UPS Monitor/ups.shutdown[UPS-Rack-1])=1. - JSON alternative — if you already maintain JSONPath items, use
/healthwith the step “JSONPath” and$.upsDevices[0].batteryChargePercentor$.status.
For a simple availability check, also in Nagios, Icinga or Checkmk, /health/simple is
the right path: the check evaluates status code and text. In Zabbix, clear the field “Required
status codes” for this item, otherwise the 503 at Critical makes the item unsupported instead of
firing a trigger; the trigger then checks find(/UPS Monitor/health.simple,,"like","OK")=0.
Prometheus and Grafana: scrape_config, panels, alert rules
To Prometheus the monitor is an ordinary target. In prometheus.yml:
scrape_configs:
- job_name: upshypervshutdown
scrape_interval: 30s
metrics_path: /metrics
static_configs:
- targets: ["ups-monitor.example.local:9099"]
authorization:
type: Bearer
credentials: "<token>"
Leave out the authorization block if no token is set. Metrics without a reading are
omitted, not reported as -1: a missing series means “no value”, while
a -1 would look like a reading in a graph.
| Panel | Query | Note |
|---|---|---|
| Overall status (Stat) | upshypervshutdown_health_level | Value mappings 0 Unknown, 1 Ok, 2 Warning, 3 Critical |
| Battery charge (Gauge) | upshypervshutdown_ups_battery_percent | Legend {{ups}}, unit percent |
| Runtime (Time series) | upshypervshutdown_ups_battery_runtime_seconds / 60 | Unit minutes; the shutdown threshold as a threshold line |
| Load (Time series) | upshypervshutdown_ups_load_percent | For three-phase units the highest phase load; per phase upshypervshutdown_ups_phase_load_percent with label phase |
| UPS status (State timeline) | upshypervshutdown_ups_status | Value always 1, the status is in the label status: Online, OnBattery, LowBattery, Charging, Unknown, Unreachable |
| Hosts (Table) | upshypervshutdown_host_reachable | 1 reachable, 0 not; label host |
Alert rules, as a Prometheus rule file or with the same expressions as Grafana-managed alert rules:
groups:
- name: upshypervshutdown
rules:
- alert: UpsOnBattery
expr: upshypervshutdown_ups_status{status="OnBattery"} == 1
for: 1m
labels: { severity: warning }
annotations:
summary: "{{ $labels.ups }} is running on battery"
- alert: UpsCritical
expr: upshypervshutdown_health_level == 3
for: 2m
labels: { severity: critical }
annotations:
summary: "UPS monitoring reports Critical"
- alert: UpsShutdownInProgress
expr: upshypervshutdown_ups_shutdown_in_progress == 1
labels: { severity: critical }
annotations:
summary: "Emergency shutdown in progress for {{ $labels.ups }}"
- alert: UpsPollingStalled
expr: time() - upshypervshutdown_ups_last_update_timestamp_seconds > 300
labels: { severity: warning }
annotations:
summary: "No data from {{ $labels.ups }} for more than 5 minutes"
- alert: HostUnreachable
expr: upshypervshutdown_host_reachable == 0
for: 10m
labels: { severity: warning }
annotations:
summary: "{{ $labels.host }} does not answer on WinRM"
Add a rule on up{job="upshypervshutdown"} == 0: if the service goes down, all other
series disappear, and only this rule reports it.
What triggers WARN and CRIT
The level is the worst state across all UPS devices and hosts. The rules are fixed in the monitor and identical in all four formats:
| Level | Trigger | Representation |
|---|---|---|
| Unknown | UPS devices or hosts are configured, but no device of that group has delivered data yet, typically right after the service starts. | /health 503, UNKNOWN, level 0, PRTG yellow |
| Critical | A UPS reports LowBattery, Unreachable or Unknown; or a UPS or host entry has not been updated for more than 30 minutes. | /health 503, CRIT, level 3, PRTG red |
| Warning | A UPS is on battery (OnBattery), on bypass or reports a notifiable alarm such as GeneralFault; a host is unreachable; an entry has not been updated for more than 10 minutes; or a configured device has never delivered data while others report. | /health 200 (503 with HealthEndpointWarnAsError), WARN, level 2, PRTG yellow |
| Ok | Everything online, reachable and recent; or nothing configured. | /health 200, OK, level 1, PRTG green |
Informational UPS alarms such as a running self-test do not change the level, but they are
counted in alarms and upshypervshutdown_ups_alarms_active. The
warning thresholds (Enterprise) for battery charge, load, temperature and input
voltage do not feed into the level; they go out through the alert channels and Windows event 2004.
If you want them in the monitoring tool, set thresholds on the raw values there.
The endpoint and the alerting complement each other. The endpoint is a state that the monitoring tool fetches. The alert channels (email, Teams, SMS, webhook, SNMP trap) and the Windows events with fixed IDs report transitions: 2003 critical threshold in monitoring-only mode, 2004 warning threshold, 2005 and 2006 self-test, 2007 bypass, 2008 changed alarms, 3000 emergency shutdown triggered. A SIEM that collects the events anyway does not need the endpoint; a dashboard does not need the events. How to set up the alert channels is covered in the guide UPS alerts via Microsoft 365, Teams and SMS.
Limits and duplicate alerts
- Enterprise — the endpoint is part of the monitoring integration of the Enterprise edition. Pro licenses activated before the switch keep their access. Without a matching license the service does not start the endpoint even if it is enabled in the configuration, and writes a warning to the log.
- The monitor's view — if the service is down, the endpoint is down. Monitor the fetch itself: in Prometheus via
up, in PRTG via the sensor state, in Zabbix vianodata(). If the poll loop hangs without the service dying, the staleness rule kicks in: Warning after 10 minutes, Critical after 30 minutes. - Duplicate alerts — if the monitoring tool also polls the same UPS directly via SNMP, a power outage is reported twice: once from the SNMP sensor, once from the endpoint. Pick one source for alerting. A pattern that works: the direct SNMP sensor stays as an availability check of the card without thresholds, and alerts come from the endpoint, because it knows hosts and shutdown state.
- Service only — the endpoint runs inside the Windows service, not in the desktop app's own monitoring. If the service is stopped, it does not answer, even while the desktop app keeps monitoring the UPS.
Which values arrive per UPS at all, and how three-phase units report their phases, is covered in the guide Monitoring a three-phase UPS. How the service runs on Server Core without a desktop is in Protecting Hyper-V on Server Core during a power outage.
Checklist for the integration
- Bind address and firewall — the endpoint listens only on the address it needs, and the firewall rule applies to the monitoring server only.
- Token in the header — all sensors send
Authorization: Bearer, andHealthEndpointAllowQueryTokenisfalse. - Service restarted — after the last change to the health settings; the log shows “Health endpoint started”.
- Fetch monitored — a rule reports when the endpoint stops answering.
- One alert source — either the endpoint or the direct SNMP sensor alerts on a power outage, not both.
- Test in a maintenance window — briefly disconnect the UPS from mains: status
OnBattery, level Warning, alert rule fires. Then mains back, level Ok again. - Test mode for the shutdown — in the monitor's test mode, verify that
shutdownInProgressgoes to 1 and the “emergency shutdown in progress” rule arrives.
Frequently asked questions
Do I need the health endpoint if PRTG already polls the UPS via SNMP?
The SNMP sensor shows the raw values of the UPS network card. The endpoint adds what the card does not know: whether the Hyper-V hosts are reachable, whether an emergency shutdown is running right now, and how the monitor rates the overall state. If you run both, decide which source raises alerts, otherwise every power outage arrives twice.
Why does /metrics return HTTP 200 instead of 503 when a UPS is critical?
Prometheus and the PRTG sensor would treat a 503 as a failed scrape and discard exactly the values that matter during an outage. /metrics and /prtg therefore always return 200; the state is in upshypervshutdown_health_level or in the “Overall Health” channel. Only /health and /health/simple use the status code as a signal.
Why is a channel or metric missing, for example the input voltage?
Readings the UPS does not deliver are omitted rather than reported as -1. Right after the service starts, battery charge and runtime are also missing until the first poll has been answered. In PRTG the limit of 50 channels per sensor adds to this: measurement and phase channels sit at the end of the list and are cut first when there are many UPS devices.
What can someone do who reaches the endpoint?
Read, not change. The endpoint answers GET only, any other method returns 405, and it has no commands. It does reveal the names and hostnames of the UPS devices and hosts and their state. It contains no passwords, SNMP communities, WinRM credentials or license data. Bind address, token and IP allowlist limit who sees this information.
More guides
Event IDs for your SIEM
Event log, Sentinel, Splunk and PowerShell.
Monitoring branch office UPS centrally
One installation, many sites, alert-only per UPS.
UPS monitoring without shutdown
Monitor and alert without shutting anything down.
UPS alerts via Microsoft 365 and Teams
Graph instead of SMTP AUTH, Workflows instead of connectors.
Monitoring a three-phase UPS
Reading phase values L1 to L3 correctly.
Hyper-V on Server Core during a power outage
Two paths without a desktop, preparing WinRM, testing the sequence.
SNMPv3 on a UPS network card
authPriv with SHA and AES instead of a plain-text community.
Monitoring UPS units from multiple vendors
One tool instead of several silos.
NUT on Windows
Query a UPS via Network UPS Tools from a NAS or Linux server.
Hyper-V failover cluster power outage
Coordinating quorum, CSV and live migration.
Restarting after a power outage
Starting servers, storage and VMs automatically when power returns.
Calculating UPS runtime
Why the datasheet runtime rarely holds.
See UPS and hosts in the monitoring you already have
30 days free, all features included. With a health endpoint for PRTG, Zabbix, Prometheus and Grafana, bearer token and fixed event IDs in the Windows Event Log.