Cacti+NUT

Для сбора статистики вы можете использовать кактус для этого нужно следующее:
1. Скачать скрипт cacti-nut.0.5.tar_.gz (новая версия cacti-nut.0.6.tar_.gz) и распаковать.

Скопируйте файл scripts/ss_nut_ups_status.php в директорию cacti/scripts/
Скопируйте файл resource/nut_ups_status.xml в директорию cacti/resource/script_server/

2. Импортировать шаблон из архива

Console > Import Templates > Views [cacti_data_query_nut_ups_statistics.xml]

3. Создать данные. В разделе Console > Devices > [сервер с NUT] и на панели Associated Data Queries добавляем Data Query: NUT — UPS Statistics > Add. В добавленной строчке в столбце status должны увидеть:

Success [2 Items, 1 Row]

4. Создать график для этих данных на странице параметров устройств строка Create Graphs for this Host. Там мы есть Data Query [NUT — UPS Statistics] в строке которой расположены наши UPS. Отмечаем галочкой нужный и выбираем graph type:

Script Input and Output

In some cases you may want to execute the script file manually for debugging purposes. The parameters to the script use a fixed structure that is optimized for use with the Cacti poller, but also allows for human interaction. In particular, the script uses three parameter groups, with the exact structure depending on the output that is desired.

The first parameter group provides a NUT protocol «bundle» of the following values, separated by colon characters: In those cases where a default value is adequate (such as the NUT port number), the value can be omitted.

Taken as a whole, a valid NUT bundle for the localhost device on the default port number and a default timeout would be «localhost::».

The next parameter identifies the type of Cacti data that is being requested. Cacti uses «index» queries to enumerate all of the entries for a data query template, and then uses various kinds of «query» queries to obtain extended information about those entries (such as the full name of each indexed entry). Separately, the Cacti poller uses «get» queries to fetch the readings for each specific entry (again, keyed by index value). Note that he index and query operations are typically only performed when the device entry is being created or modified, and the get operations provide the actual readings to the poller. This script parameter must be one of those query types, with any remaining parameters providing any necessary supplemental data. Specifically the request parameters are one of the following:

The field names that can be used in «query» or «get» requests are as follows:

You must know the index value that has been assigned to a device before you can ask for details about that specific device. To do this, you can use the «query ups.description» request to get a list of UPS devices and their descriptions, and then use the «get <fieldname> <ups>» request to get information about the desired UPS. The full command lines for these requests, using example data from above, are shown below:

$ php ss_nut_ups_status.php hostname:: query ups.description
SMART2200RMXL2U:Tripp-Lite SMART2200RMXL2U

$ php ss_nut_ups_status.php hostname:: get ups.load SMART2200RMXL2U
23

Ссылки:
http://www.ignix.ru/book/freebsd/daemon/network_ups_tools
http://www.eric-a-hall.com/software/cacti-nut/