Skip to content
BleemeoBleemeo

UPSD

Auto-Detection
Built-in Metrics

Bleemeo monitors UPS devices through automatic service detection and built-in metrics gathered via Network UPS Tools (NUT). You need nut-server installed and configured. See the NUT documentation for setup details.

Glouton automatically detects UPSD instances running on the host. You may need to provide UPSD user credentials depending on your configuration. If the auto-detected parameters are incorrect, you can override them manually.

Terminal window
sudo tee /etc/glouton/conf.d/99-upsd.conf > /dev/null << 'EOF'
service:
- type: "upsd"
address: "127.0.0.1"
port: 3128
# UPSD user credentials
username: ""
password: ""
EOF
MetricDescription
service_statusStatus of UPSD
upsd_battery_statusBattery status. Critical when the UPS is overloaded, on battery, and when the battery is low or needs replacement.
upsd_status_flagsStatus flags (see apcupsd for details)
upsd_battery_voltageBattery voltage
upsd_input_voltageInput voltage
upsd_output_voltageOutput voltage
upsd_load_percentLoad of the UPS in percent
upsd_battery_charge_percentBattery charge in percent
upsd_internal_tempInternal temperature in degrees Celsius
upsd_input_frequencyInput frequency in Hz
upsd_time_left_secondsTime left on battery in seconds
upsd_time_on_battery_secondsTime spent on battery in seconds

See Troubleshoot a Service Check or Missing Metrics for what applies to every service: finding the address and port Glouton really uses, what each check message means, and how to read the collection error — which does not appear in the agent logs at the default level.

The check only opens the TCP port — it sends no command — so it fails when the port is wrong (Connection refused), when a firewall drops the packets (connection timed out after 10 seconds), or when the configured address cannot be parsed (Invalid TCP address). A green check proves the port is open, and nothing more.

A passing check says nothing about the metrics: they are collected separately.

Glouton connects to the NUT server on the detected address and port (3493) and lists the UPS units. Reading variables is anonymous by default in NUT, so username and password are only needed when your upsd requires them.

Reproduce what Glouton does, from the machine where the agent runs:

Terminal window
upsc -l
upsc UPSNAME
What you see Cause Fix
no metric, and no error No UPS is declared on this server Declare the UPS in ups.conf and reload upsd
DRIVER-NOT-CONNECTED or DATA-STALE The driver is not running, or its data is stale Start the driver with upsdrvctl start and check its own logs
a connection error LISTEN does not cover the address the agent uses Add a LISTEN line in upsd.conf for that address
ACCESS DENIED The server is configured to require authentication Set both username and password: Glouton authenticates only when the two are present