Depending on your UPS vendor you can monitor the remaining UPS battery time by monitoring appropriate SNMP variable.
For APC, there is a predefined monitoring pack which will be automatically added to your devices. By default, among others it will check if the battery need replacing or if the battery temperature is too high.
Of course you can also extend it - for an example add a new event which will be raised when remaining time on battery is less than 10 minutes:
Monitoring->Monitoring Packs & Policies->Hardware/Other->APC PowerChute (SNMP).- Click
Add Alertand from SNMP tab in Add Monitoring Event window double-click Event for SNMP Variable Value. - Click Select SNMP Variable. Enter or choose a variable from MIB database: 1.3.6.1.4.1.318.1.1.1.2.2.3 and click
OK. - Set the threshold value to 10.
- Enter alert description and save settings.
You can also create a map with your UPS and add nice Widget to display current battery status and overall UPS state or use GrafCrunch for even more amazing results.