I didn’t find any good solutions, but it would probably be better if the batter data was available on the standard power OIDs as generic data?
But for now this is my hack to show some battery data for laptop (my server with built in UPS)
# cat /etc/snmp/ups-apcups-acpi.sh
#!/usr/bin/env bash
################################################################
# copy this script to /etc/snmp/ and make it executable: #
# chmod +x /etc/snmp/ups-apcups-acpi.sh #
# ------------------------------------------------------------ #
# edit your snmpd.conf and include: #
# extend ups-apcups /etc/snmp/ups-apcups-acpi.sh #
#--------------------------------------------------------------#
# restart snmpd and activate the app for desired host #
#--------------------------------------------------------------#
# please make sure you have the path/binaries below #
################################################################
# LINEV - PSU generally provides around 20v but we don't know
grep -q 1 /sys/class/power_supply/AC/online && echo 20 || echo 0
# LOADPCT - no such value
echo "Unknown"
# BCHARGE
cat /sys/class/power_supply/BAT0/capacity
# TIMELEFT
grep -q Discharging /sys/class/power_supply/BAT0/status && echo "scale=2; $(cat /sys/class/power_supply/BAT0/charge_now) / $(cat /sys/class/power_supply/BAT0/current_now) * 60" | bc || echo Unknown
# BATTV
echo "scale=3; $(cat /sys/class/power_supply/BAT0/voltage_now) / 1000 / 1000" | bc
# NOMINV
echo 20
# NOMBATTV
echo "scale=3; $(cat /sys/class/power_supply/BAT0/voltage_min_design) / 1000 / 1000" | bc