Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Jun 18, 2019 7:55 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: TrippLite PowerAlert UPS stats -- update November 11, 2010
PostPosted: Fri Jan 27, 2006 12:51 am 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
Here is a 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:

Image

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.

--> see this page for the tarball and instructions <--


Last edited by ehall on Thu Nov 11, 2010 9:29 pm, edited 8 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 10, 2007 11:51 am 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 28, 2007 4:18 pm 
Offline
Cacti User
User avatar

Joined: Fri Aug 04, 2006 2:12 pm
Posts: 64
Location: MI
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.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 03, 2007 4:47 pm 
Offline
Cacti User
User avatar

Joined: Tue Jul 03, 2007 4:11 pm
Posts: 74
Location: San Luis Obispo
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?


Top
 Profile  
 
 Post subject: I am not able to get this to work for me
PostPosted: Wed Aug 15, 2007 2:21 pm 
Offline
Cacti User
User avatar

Joined: Tue May 22, 2007 7:56 am
Posts: 278
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
I am not able to get this to work for me looks like the script is not running ?


Attachments:
File comment: tripp lite mib
TRIPPLITE-MIB.zip [11.65 KiB]
Downloaded 883 times
File comment: three pic
Example3.GIF
Example3.GIF [ 4.9 KiB | Viewed 27025 times ]
File comment: two pic
Example2.GIF
Example2.GIF [ 35.17 KiB | Viewed 27024 times ]
File comment: one pic
Example1.GIF
Example1.GIF [ 39.43 KiB | Viewed 27025 times ]
Top
 Profile  
 
 Post subject: Second post
PostPosted: Wed Aug 15, 2007 2:23 pm 
Offline
Cacti User
User avatar

Joined: Tue May 22, 2007 7:56 am
Posts: 278
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
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.


Top
 Profile  
 
 Post subject: Interesting
PostPosted: Tue Oct 02, 2007 8:31 am 
Offline
Cacti User
User avatar

Joined: Tue May 22, 2007 7:56 am
Posts: 278
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
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?


Top
 Profile  
 
 Post subject: Error I am getting.
PostPosted: Tue Oct 09, 2007 7:49 am 
Offline
Cacti User
User avatar

Joined: Tue May 22, 2007 7:56 am
Posts: 278
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
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.


Attachments:
File comment: Both the Poweralert_ups_status.php and snmp.php. Incase I am missing somthing.
snmp.zip [5.72 KiB]
Downloaded 606 times
Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 17, 2008 2:20 pm 
Offline

Joined: Sun Aug 17, 2008 2:19 pm
Posts: 5
Will this work directly with the UPS? IE. with the websnmp card?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 28, 2009 8:19 pm 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
I uploaded a new version that should work with the SNMP APIs in 0.8.6 and 0.8.7 alike, added the ability to probe for battery temperature, and also cleaned up some of the code

As for the question about working directly with the UPS SNMP-Web card, yes it will but you have to change the port number in the data template to 161. Alternatively, create a new data template that is specifically for use with the SNMP cards, but keep the data source names the same, and you will be able to use the graphs between both the software and the cards.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 29, 2009 2:00 pm 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
The latest version of poweralert has a bug where it reads some batteries as 120 volts (wrong by 10x) so I added a control condition that if batteryVoltage was >= 100 then divide by 10


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 21, 2009 6:03 pm 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
I posted a new version of the script with many significant enhancements. The biggest change is a switch from the expensive and slow script query interface to the persistent and fast script server interface. I also dropped the comma-separated parameters and switched to a colon-separated "bundle" for SNMP arguments, tightened up the array and variable management, added a lot more error checking, and otherwise did a complete rewrite of the script.

Due to the changes, the script and resource xml files need to be reinstalled and any data queries need to be reimported. However the existing graphs and data sources should continue to operate afterwards.

I've also moved the files to this page on my web server so that I can more easily maintain them


Top
 Profile  
 
 Post subject: Re: TrippLite PowerAlert UPS stats -- update November 11, 20
PostPosted: Thu Nov 11, 2010 9:30 pm 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
I've uploaded a new version that is compatible with 0.8.7g

http://www.eric-a-hall.com/software/cacti-poweralert/


Top
 Profile  
 
 Post subject: Re: TrippLite PowerAlert UPS stats -- update November 11, 20
PostPosted: Fri Dec 03, 2010 6:04 pm 
Offline

Joined: Fri Dec 03, 2010 5:59 pm
Posts: 3
Eric,

Thanks for your work on this, however I cannot get things working with .8.7g. When I run Verbose Query under Associated Data Queries for a given device, I get:

+ Running data query [10].
+ Found type = '6 '[script query].
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/poweralert_ups_status.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /usr/share/cacti/site/scripts/ss_poweralert_ups_status.php 172.16.0.4:1:tlremote:::::::3664:1500 index'
+ Executing script query '/usr/bin/php -q /usr/share/cacti/site/scripts/ss_poweralert_ups_status.php 172.16.0.4:1:tlremote:::::::3664:1500 query upsDevice'
+ Found item [upsDevice='1'] index: 1
+ Executing script query '/usr/bin/php -q /usr/share/cacti/site/scripts/ss_poweralert_ups_status.php 172.16.0.4:1:tlremote:::::::3664:1500 query upsName'
+ Found item [upsName=' Unable to locate UPS attribute data in SNMP'] index: FATAL
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/poweralert_ups_status.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/poweralert_ups_status.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/poweralert_ups_status.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/poweralert_ups_status.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/poweralert_ups_status.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/poweralert_ups_status.xml'


When I run the php script it seems not to like the upsName variable. I am running the most current version of the Tripplite Agent downloaded today from their website.

When I snmpwalk the device, I do get values and device name, but all I can see are the OID numbers and not the variable name.

I was wondering if you might offer a suggestion about this.

Thanks!


Top
 Profile  
 
 Post subject: Re: TrippLite PowerAlert UPS stats -- update November 11, 20
PostPosted: Thu Dec 16, 2010 3:54 pm 
Offline

Joined: Fri Dec 03, 2010 5:59 pm
Posts: 3
Discovered in the guide it says it's for php 5.2.

Mine is:


PHP 5.3.3-1ubuntu9.1 with Suhosin-Patch (cli) (built: Oct 15 2010 14:17:04)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


I know the move to 5.3 broke some compat stuff across the board. Are there any plans for a future release? :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group