|
|
| Author |
Message |
ehall Cacti User
Joined: 09 Dec 2005 Posts: 160
|
Posted: Fri Jan 27, 2006 12:51 am Post subject: TrippLite PowerAlert 12 UPS stats -- update Feb 10, 2007 |
|
|
Here is a data-query script and two associated charts for gathering basic UPS stats from TrippLite PowerAlert 12 agents. Here is what data from a TrippLite managed UPS looks like:
The data query model is used because PowerAlert can monitor multiple UPSes (local devices as well as remote devices attached to other PowerAlert nodes). PowerAlert 12 also supports multiple vendor devices, although it should be noted that not all devices provide all of the monitored information. For example, here is what the data from an APC desktop UPS looks like (it is missing the Current Load and the Input Frequency signals):
To use this, import the XML definition and copy the script to the cacti/resources/script_queries/ directory, then link the data query to a device that has PowerAlert 12 running on it. Each of the two graphs can be created for every node (just use the drop-down box in the Create Graphs for this Host dialog).
Note that PowerAlert uses SNMP for its own peer-to-peer messaging, but uses the default port of 3664 with a default community name of "tlremote". Since these are different ports and community strings from what the underlying host is going to be using -- and since there's no way to prompt for additional user variables in cacti at the moment -- I have hardcoded these values into the XML template. If you are using different port number or community string with your PowerAlert installation, you will need to change the XML file accordingly.
Even though the devices use SNMP, I am having to use a script to wrap the query because of the way their private (undocumented) MIB is structured. They support the standard UPS-MIB but it doesn't have as much useful data as their private MIB, so using a script is a fair trade.
This was written for PowerAlert 12, and exported from Cacti 0.8.6i using PHP 5. Other combinations may not work.
PowerAlert 12 info can be found here
| Description: |
|
 Download |
| Filename: |
cacti-poweralert.tar.gz |
| Filesize: |
9.34 KB |
| Downloaded: |
335 Time(s) |
Last edited by ehall on Fri May 02, 2008 8:25 pm; edited 2 times in total |
|
| Back to top |
|
 |
ehall Cacti User
Joined: 09 Dec 2005 Posts: 160
|
Posted: Sat Feb 10, 2007 11:51 am Post subject: |
|
|
| The posted update contains a fix that converts the SNMP timeout value from Cacti's millisecond format to PHP/Net-SNMP microsecond format. The lack of conversion in the earlier script would sometimes result in excessive retries or complete failure.
|
|
| Back to top |
|
 |
malichidemonos Cacti User
Joined: 04 Aug 2006 Posts: 64 Location: MI
|
Posted: Thu Jun 28, 2007 4:18 pm Post subject: |
|
|
Any idea why thold wont work with this? I'm setting a templete to monitor the battery charge and it will not even apply to the device.
Last edited by malichidemonos on Mon Jul 16, 2007 12:21 pm; edited 1 time in total |
|
| Back to top |
|
 |
Mark.
Joined: 03 Jul 2007 Posts: 45 Location: San Luis Obispo
|
Posted: Tue Jul 03, 2007 4:47 pm Post subject: |
|
|
Thanks for the files and all of your work.
I was able to get the temperature graph template working but I can't get the signal and capacity templates to show up under each UPS host. They are visible via the Graph Templates page but not where I would select the graph template to be used under a specific host.
To use this, import the XML definition and copy the script to the cacti/resources/script_queries/ directory, then link the data query to a device that has PowerAlert 12 running on it (A UPS or a different Machine?)
Any ideas, need more information?
|
|
| Back to top |
|
 |
chrisgapske Cacti User
Joined: 22 May 2007 Posts: 264 Location: Padacuh, Ky-Alpena, MI-Gulf Shores,AL
|
Posted: Wed Aug 15, 2007 2:21 pm Post subject: I am not able to get this to work for me |
|
|
I am not able to get this to work for me looks like the script is not running ?
| Description: |
|
| Filesize: |
4.9 KB |
| Viewed: |
6267 Time(s) |

|
| Description: |
|
| Filesize: |
35.17 KB |
| Viewed: |
6266 Time(s) |

|
| Description: |
|
| Filesize: |
39.43 KB |
| Viewed: |
6267 Time(s) |

|
| Description: |
|
 Download |
| Filename: |
TRIPPLITE-MIB.zip |
| Filesize: |
11.65 KB |
| Downloaded: |
184 Time(s) |
|
|
| Back to top |
|
 |
chrisgapske Cacti User
Joined: 22 May 2007 Posts: 264 Location: Padacuh, Ky-Alpena, MI-Gulf Shores,AL
|
Posted: Wed Aug 15, 2007 2:23 pm Post subject: Second post |
|
|
I was having trouble putting images on this as it would just break.
I was able to see everything install ok just not get graphing from it.
Help would be great if you have any ideas.
Chris.
|
|
| Back to top |
|
 |
chrisgapske Cacti User
Joined: 22 May 2007 Posts: 264 Location: Padacuh, Ky-Alpena, MI-Gulf Shores,AL
|
Posted: Tue Oct 02, 2007 8:31 am Post subject: Interesting |
|
|
It looks like most every script and many plugins are going to need updating when they move to a newer version of cacti.
As the Cacti group splitup the database information from the rest of the informatiion. Most files have to now be pointed to global.php insted of config.php.
The problem I am having is my php seems to hang when running this script? Anybody have any ideas on this or what I can do to resolve my problem?
|
|
| Back to top |
|
 |
chrisgapske Cacti User
Joined: 22 May 2007 Posts: 264 Location: Padacuh, Ky-Alpena, MI-Gulf Shores,AL
|
Posted: Tue Oct 09, 2007 7:49 am Post subject: Error I am getting. |
|
|
CACTI01 2007-10-09 07:40:13 php: PHP Warning: Missing argument 10 for cacti_snmp_get(), called in /var/www/html/scripts/poweralert_ups_status.php on line 197 and defined in /var/www/html/lib/snmp.php on line 39
I am getting this error and do not know what Is wrong or to look at.
Chris.
| Description: |
| Both the Poweralert_ups_status.php and snmp.php. Incase I am missing somthing. |
|
 Download |
| Filename: |
snmp.zip |
| Filesize: |
5.72 KB |
| Downloaded: |
141 Time(s) |
|
|
| Back to top |
|
 |
variable
Joined: 17 Aug 2008 Posts: 4
|
Posted: Sun Aug 17, 2008 2:20 pm Post subject: |
|
|
| Will this work directly with the UPS? IE. with the websnmp card?
|
|
| Back to top |
|
 |
|