Open johnelliott opened 1 year ago
New monitor types are always appreciated. See our contribution guide: https://github.com/louislam/uptime-kuma/blob/87b2e45fbf31be91d19d89e6bead3b9653a1cd6e/CONTRIBUTING.md
See https://github.com/louislam/uptime-kuma/blob/master/server/monitor-types/dns.js for a reference on how to implement a monitor-type using the newer syntax and https://github.com/louislam/uptime-kuma/pull/3178/files for the other files that need editing
For anyone else looking for NUT monitoring it can be pretty easily done without new code:
http://192.168.0.100:1234/api/v1/devices/apc1500
ups.status
OL CHRG => online charging
OL => charged and online
OB DISCHRG => on battery and discharging
Keyword: OB DISCHRG
with Invert Keyword
so the monitor is DOWN when the keyword is foundvars.ups.status
to achieve the same thing wit more flexibilityalternatively, use a Json Query monitor with the expression
`ups.status` in ["OL CHRG", "OL"]
and Expected Value true
⚠️ Please verify that this feature request has NOT been suggested before.
🏷️ Feature Request Type
New Monitor
🔖 Feature description
NUT (Network UPS Tools) is a standard protocol for monitoring uninteruptable power supplies, AKA battery backups.
Common examples are on in datacenters, but home users have Synology NAS devices with most UPS with USB ports.
✔️ Solution
I add a monitor type for NUT and ask others in the community to test it.
❓ Alternatives
Current work-around without this feature: A user runs an additional docker container, a side-car like nut-exporter and makes an HTTP keyword monitor.
📝 Additional Context
There was already a similar APCUPSD issue, and this may address that use case too since NUT supports APC devices.