-
Notifications
You must be signed in to change notification settings - Fork 0
Zabbix Integration
Yoichi Takizawa edited this page Feb 15, 2026
·
2 revisions
apcget supports sending all UPS status items to Zabbix via zabbix_sender (trapper items).
Install zabbix_sender:
# RHEL / Amazon Linux
sudo dnf install zabbix-sender
# Ubuntu / Debian
sudo apt install zabbix-sender
# macOS (Homebrew)
brew install zabbixCreate a host in Zabbix (e.g., ups-living) and add the following trapper items:
| Key | Type | Description |
|---|---|---|
apc.status |
Text | Device status |
apc.load |
Numeric (float) | UPS load (%) |
apc.runtime |
Numeric (unsigned) | Runtime remaining (min) |
apc.voltage |
Numeric (float) | Input voltage (VAC) |
apc.battery |
Numeric (float) | Battery charge (%) |
apc.batteryvoltage |
Numeric (float) | Battery voltage (VDC) |
- Go to Data collection > Hosts > select your host
- Click Items > Create item
- Set:
-
Name: e.g.,
UPS Load -
Type:
Zabbix trapper -
Key: e.g.,
apc.load -
Type of information: e.g.,
Numeric (float)
-
Name: e.g.,
- Repeat for all 6 items
python3 apcget.py 192.168.1.100 your_username your_password \
--zabbix-send 10.0.0.1 \
--zabbix-host ups-living| Option | Description | Default |
|---|---|---|
--zabbix-send |
Zabbix server address | (none) |
--zabbix-host |
Host name in Zabbix | IP address |
--zabbix-port |
Zabbix server port | 10051 |
When --zabbix-send is specified, all 6 items are retrieved and sent at once. Normal stdout output is suppressed.
* * * * * /usr/bin/python3 /path/to/apcget.py --config /path/to/.apcget.conf --zabbix-send 127.0.0.1 --zabbix-host ups-living >/dev/null 2>&1* * * * * /usr/bin/python3 /home/user/apcget.py --config /home/user/.apcget-ups1.conf --zabbix-send 127.0.0.1 --zabbix-host ups-1 >/dev/null 2>&1
* * * * * /usr/bin/python3 /home/user/apcget.py --config /home/user/.apcget-ups2.conf --zabbix-send 127.0.0.1 --zabbix-host ups-2 >/dev/null 2>&1sudo dnf install cronie
sudo systemctl enable --now crond- Go to Monitoring > Latest data
- Filter by the host name (e.g.,
ups-living) - Confirm that all 6 items have recent values