Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


TrippLite PowerAlert 12 UPS stats -- update Feb 10, 2007

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
ehall
Cacti User


Joined: 09 Dec 2005
Posts: 160

PostPosted: Fri Jan 27, 2006 12:51 am    Post subject: TrippLite PowerAlert 12 UPS stats -- update Feb 10, 2007 Reply with quote

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



cacti-poweralert.tar.gz
 Description:

Download
 Filename:  cacti-poweralert.tar.gz
 Filesize:  9.34 KB
 Downloaded:  360 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

PostPosted: Sat Feb 10, 2007 11:51 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 28, 2007 4:18 pm    Post subject: Reply with quote

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

PostPosted: Tue Jul 03, 2007 4:47 pm    Post subject: Reply with quote

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: 268
Location: Padacuh, Ky-Alpena, MI-Gulf Shores,AL

PostPosted: Wed Aug 15, 2007 2:21 pm    Post subject: I am not able to get this to work for me Reply with quote

I am not able to get this to work for me looks like the script is not running ?


Example3.GIF
 Description:
three pic
 Filesize:  4.9 KB
 Viewed:  6677 Time(s)

Example3.GIF



Example2.GIF
 Description:
two pic
 Filesize:  35.17 KB
 Viewed:  6676 Time(s)

Example2.GIF



Example1.GIF
 Description:
one pic
 Filesize:  39.43 KB
 Viewed:  6677 Time(s)

Example1.GIF



TRIPPLITE-MIB.zip
 Description:
tripp lite mib

Download
 Filename:  TRIPPLITE-MIB.zip
 Filesize:  11.65 KB
 Downloaded:  203 Time(s)

Back to top
chrisgapske
Cacti User


Joined: 22 May 2007
Posts: 268
Location: Padacuh, Ky-Alpena, MI-Gulf Shores,AL

PostPosted: Wed Aug 15, 2007 2:23 pm    Post subject: Second post Reply with quote

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: 268
Location: Padacuh, Ky-Alpena, MI-Gulf Shores,AL

PostPosted: Tue Oct 02, 2007 8:31 am    Post subject: Interesting Reply with quote

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: 268
Location: Padacuh, Ky-Alpena, MI-Gulf Shores,AL

PostPosted: Tue Oct 09, 2007 7:49 am    Post subject: Error I am getting. Reply with quote

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.



snmp.zip
 Description:
Both the Poweralert_ups_status.php and snmp.php. Incase I am missing somthing.

Download
 Filename:  snmp.zip
 Filesize:  5.72 KB
 Downloaded:  152 Time(s)

Back to top
variable



Joined: 17 Aug 2008
Posts: 4

PostPosted: Sun Aug 17, 2008 2:20 pm    Post subject: Reply with quote

Will this work directly with the UPS? IE. with the websnmp card?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group