Well it was still easier to use your package than last time I was monitoring a UPS, by extracting results from nut's upsc and feeding it direct to rrdtool.ehall wrote:sorry for the trouble, these are on my list of templates to update for 0.8.7 and I'll try to clean them up when I get there
Network UPS Tools template -- update November 11, 2010
Moderators: Developers, Moderators
Hello. First of I'm new to graphing ups data. I use cacti already for local server and seperate storage snmp enabled server. All is fine with that.
Now I would like to connect NUT with cacti using this template but I'm having issues . I use ubuntu 8.04.2 with standard packages and I followed all steps as instructed.
Importing template gave me this unmet dependency:
After creating all relevant graphs I'm getting data for battery charge. This one shows 100 as it should.
Temperature and output load shows me zero.
Power signal graph is not visible at all and gives me this debuging error:
Ups is working fine by the way:
Is there any good soul out there who can help me out?
Now I would like to connect NUT with cacti using this template but I'm having issues . I use ubuntu 8.04.2 with standard packages and I followed all steps as instructed.
Importing template gave me this unmet dependency:
Code: Select all
GPRINT Preset
[success] Normal [update]
Data Input Method
[success] Get Script Data (Indexed) [update]
Data Template
[success] NUT - UPS Status [update]
Graph Template
[success] UPS - NUT - UPS Temperature [update]
[success] UPS - NUT - UPS Load Capacity [update]
[success] UPS - NUT - UPS Power Signal [update]
Data Query
[success] NUT - UPS Statistics [update]
+ Found Dependency: (Data Input Method) Get Script Data (Indexed)
+ Found Dependency: (Graph Template) UPS - NUT - UPS Power Signal
+ Found Dependency: (Data Template) NUT - UPS Status
+ Unmet Dependency: (Data Template Item)
+ Found Dependency: (Graph Template) UPS - NUT - UPS Load Capacity
+ Found Dependency: (Data Template Item) batteryCharge
+ Found Dependency: (Data Template Item) upsLoad
+ Found Dependency: (Graph Template) UPS - NUT - UPS Temperature
+ Found Dependency: (Data Template Item) upsTemperature
Temperature and output load shows me zero.
Power signal graph is not visible at all and gives me this debuging error:
Code: Select all
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Server - UPS Power Signal - Tripplite" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="quality" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/server_upstemperature_33.rrd":inputVoltage:AVERAGE \
DEF:b="/var/lib/cacti/rra/server_upstemperature_33.rrd":inputFrequency:AVERAGE \
DEF:c="/var/lib/cacti/rra/server_upstemperature_33.rrd":batteryVoltage:AVERAGE \
LINE1:a#00FF00FF:"Input Voltage" \
GPRINT:a:LAST:" Current\:%8.2lf%s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:a:MIN:"Minimum\:%8.2lf%s" \
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n" \
LINE1:b#0000FFFF:"Input Frequency" \
GPRINT:b:LAST:"Current\:%8.2lf%s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:b:MIN:"Minimum\:%8.2lf%s" \
GPRINT:b:MAX:"Maximum\:%8.2lf%s\n" \
LINE1:c#FF00FFFF:"Battery Voltage" \
GPRINT:c:LAST:"Current\:%8.2lf%s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:c:MIN:"Minimum\:%8.2lf%s" \
GPRINT:c:MAX:"Maximum\:%8.2lf%s\n"
RRDTool Says:
ERROR: reading the cookie off /var/lib/cacti/rra/server_upstemperature_33.rrd faild
Code: Select all
root@atom:# upsc tripplite@localhost
battery.charge: 100
battery.voltage: 13.4
driver.name: tripplite
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS0
driver.version: 2.2.1-
driver.version.internal: 0.8
input.frequency: 50.20
input.voltage: 118
input.voltage.maximum: 118
input.voltage.minimum: 118
ups.delay.reboot: 64
ups.delay.shutdown: 64
ups.delay.start: 60
ups.firmware: DB
ups.load: 18
ups.mfr: Tripp Lite
ups.model: Smart 2200
ups.status: OL
ups.temperature: 47
ups.test.result: OK
- Attachments
-
- Screenshot of curent situation
- ups.JPG (53.25 KiB) Viewed 24353 times
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 NUT protocol 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
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
Hm..
Hi!
Just tried to import the template and I got a lot of "Unmet Dependency" in Graph Templet, UPS Power Input. (around 15)
And 3 "Unmet Dependency" in Data Query / UPS Statistics.
New installation of 0.8.7e. I could run the php script manually and it works with the remote UPS, no issues there.
Any ideas?
Somehow managed to get graphs generated, but 4 of 5 numbers are wrong:
batteryCharge: 40, upsc says battery.charge: 100
OutputLoad: 40, upsc says ups.load: 30
Inputvoltage: 100, upsc says input.voltage: 249.0
InputFreq: NaN, upsc says input.frequency: 50.0
Correct:
BatteryVoltage: 40, upsc says battery.voltage: 40.0
Btw, php ss_nut_ups_status.php 192.168.1.41:: get <div> ups0
shows all the correct values.
Someting is a bit fishy here...
JJ
PS: My ups does not support temperature reading. Could this be the reason the script failes?
PS2: That was the error. Modified the script and removed temperature readings, all values look ok now. As a feature request I would suggest modifying the script to check if the read values are "legal" for the UPS type and gracefully handle a failure.
Just tried to import the template and I got a lot of "Unmet Dependency" in Graph Templet, UPS Power Input. (around 15)
And 3 "Unmet Dependency" in Data Query / UPS Statistics.
New installation of 0.8.7e. I could run the php script manually and it works with the remote UPS, no issues there.
Any ideas?
Somehow managed to get graphs generated, but 4 of 5 numbers are wrong:
batteryCharge: 40, upsc says battery.charge: 100
OutputLoad: 40, upsc says ups.load: 30
Inputvoltage: 100, upsc says input.voltage: 249.0
InputFreq: NaN, upsc says input.frequency: 50.0
Correct:
BatteryVoltage: 40, upsc says battery.voltage: 40.0
Btw, php ss_nut_ups_status.php 192.168.1.41:: get <div> ups0
shows all the correct values.
Someting is a bit fishy here...
JJ
PS: My ups does not support temperature reading. Could this be the reason the script failes?
PS2: That was the error. Modified the script and removed temperature readings, all values look ok now. As a feature request I would suggest modifying the script to check if the read values are "legal" for the UPS type and gracefully handle a failure.
my UPS also does not support temperature and I also got unmet dependencies while importing the template
can you tell me what changes did you make on the script?
now the load capacity graph works OK
the temperature graph shows NaN (that is expected because my UPS does not show temperature)
but the power input graph should be working but it doesn't
my cacti is 0.8.7e
can you tell me what changes did you make on the script?
Code: Select all
Cacti has imported the following items:
GPRINT Preset
[success] Normal [update]
Data Input Method
[success] Get script Server Data (Indexed) [update]
Data Template
[success] NUT - UPS Status [new]
Graph Template
[success] UPS - NUT - UPS Temperature [new]
[success] UPS - NUT - UPS Load Capacity [new]
[success] UPS - NUT - UPS Power Input [new]
+ Unmet Dependency: (Data Template Item)
+ Found Dependency: (GPRINT Preset) Normal
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
Data Query
[success] NUT - UPS Statistics [new]
+ Found Dependency: (Data Input Method) Get Script Server Data (Indexed)
+ Found Dependency: (Graph Template) UPS - NUT - UPS Power Input
+ Found Dependency: (Data Template) NUT - UPS Status
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Found Dependency: (Graph Template) UPS - NUT - UPS Load Capacity
+ Found Dependency: (Data Template Item) batteryCharge
+ Found Dependency: (Data Template Item) upsLoad
+ Found Dependency: (Graph Template) UPS - NUT - UPS Temperature
+ Found Dependency: (Data Template Item) upsTemperature
the temperature graph shows NaN (that is expected because my UPS does not show temperature)
but the power input graph should be working but it doesn't
my cacti is 0.8.7e
i found the solution
the error is in the graph template of Power Input
you must click each item and select the appropriate data source because after the template import it was <none>
input voltage for items 1-5
input frequency for items 6-10
battery voltage for items 11-15
after that you must go to Data Queries , select NUT - UPS Statistics and then Power Input
then you select the appropriate data source and check the box for
battery voltage
input frequency
input voltage
the error is in the graph template of Power Input
you must click each item and select the appropriate data source because after the template import it was <none>
input voltage for items 1-5
input frequency for items 6-10
battery voltage for items 11-15
after that you must go to Data Queries , select NUT - UPS Statistics and then Power Input
then you select the appropriate data source and check the box for
battery voltage
input frequency
input voltage
I have the same problem with Power Input graph.
Best regards,
Emilien
Can you explain me more about this, in what menu entry I must go to do this?atrias wrote:i found the solution
the error is in the graph template of Power Input
you must click each item and select the appropriate data source because after the template import it was <none>
input voltage for items 1-5
input frequency for items 6-10
battery voltage for items 11-15
Best regards,
Emilien
-
- Posts: 11
- Joined: Sun Mar 01, 2009 7:39 am
- Location: Saint-Petersburg, Russia
- Contact:
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Network UPS Tools template -- update June 21, 2009
The original author needs to run the repair template script on the template and then re-publish it.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Posts: 11
- Joined: Sun Mar 01, 2009 7:39 am
- Location: Saint-Petersburg, Russia
- Contact:
Re: Network UPS Tools template -- update June 21, 2009
cacti/cli/repair_templates.php? It seems useless for that...TheWitness wrote:The original author needs to run the repair template script on the template
Re: Network UPS Tools template -- update November 11, 2010
I uploaded a new version that is compatible with 0.8.7g
http://www.eric-a-hall.com/software/cacti-nut/
http://www.eric-a-hall.com/software/cacti-nut/
-
- Posts: 11
- Joined: Sun Mar 01, 2009 7:39 am
- Location: Saint-Petersburg, Russia
- Contact:
Re: Network UPS Tools template -- update November 11, 2010
Cacti-0.8.7f, php-5.2.11, cacti-nut 0.6:ehall wrote:I uploaded a new version that is compatible with 0.8.7g
http://www.eric-a-hall.com/software/cacti-nut/
Cacti has imported the following items:
GPRINT Preset
[success] Normal [update]
Data Input Method
[success] Get script Server Data (Indexed) [update]
Data Template
[success] NUT - UPS Status [new]
Graph Template
[success] UPS - NUT - UPS Temperature [new]
[success] UPS - NUT - UPS Load Capacity [new]
[success] UPS - NUT - UPS Power Input [new]
+ Unmet Dependency: (Data Template Item)
+ Found Dependency: (GPRINT Preset) Normal
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
Data Query
[success] NUT - UPS Statistics [update]
+ Found Dependency: (Data Input Method) Get Script Server Data (Indexed)
+ Found Dependency: (Graph Template) UPS - NUT - UPS Power Input
+ Found Dependency: (Data Template) NUT - UPS Status
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Found Dependency: (Graph Template) UPS - NUT - UPS Load Capacity
+ Found Dependency: (Data Template Item) batteryCharge
+ Found Dependency: (Data Template Item) upsLoad
+ Found Dependency: (Graph Template) UPS - NUT - UPS Temperature
+ Found Dependency: (Data Template Item) upsTemperature
Re: Network UPS Tools template -- update November 11, 2010
Network tool can be very useful for the functioning of the Office. Once you have this tool to your system, you can index hundreds and hundreds of files, the entire network. When you set up folders, directories, and the places you want to index, you can run a search for one or more files that you need a few seconds. This victory will contact each team behind and ask them if they remember to create a physical file on hand. Fortunately for you, if the writer in question is a very large memory.
network tools
network tools
Re: Network UPS Tools template -- update November 11, 2010
I am not having much luck installing this template.
I get all the unmet dependencies previously mentioned but I am not all that worried about them, I am sure I can fix them when I get the query working.
I have the latest nut installed for Ubuntu Natty 11.04
I have an Eaton Powerware 5110 attached to the USB port and get the following output from upsc:
ambient.temperature.high: 1
battery.charge.low: 22
battery.voltage: 27.7
device.mfr: Eaton
device.model: POWERWARE UPS 1000i
device.serial: ����
device.type: ups
driver.name: bcmxcp_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.6.0
driver.version.internal: 0.23
input.frequency: 50.1
input.frequency.high: 55
input.frequency.low: 45
input.frequency.nominal: 50
input.transfer.boost.high: 216
input.transfer.high: 280
input.transfer.low: 186
input.transfer.trim.low: 260
input.voltage: 242
input.voltage.nominal: 240
output.current: 0.0
output.current.nominal: 2.5
output.frequency: 50.1
output.phases: 1
output.voltage: 242
output.voltage.nominal: 240
ups.beeper.status: enabled
ups.firmware: Cont:00.50 Inve:01.50
ups.load: 0.0
ups.mfr: Eaton
ups.model: POWERWARE UPS 1000i
ups.power.nominal: 1000
ups.serial: ����
ups.status: OL
running the following query gives the expected result:
php /usr/share/cacti/site/scripts/ss_nut_ups_status.php localhost:: query ups.description
eaton:Eaton Powerware 5110
however when I try to run this query I get:
php /usr/share/cacti/site/scripts/ss_nut_ups_status.php 127.0.0.1:: query input.frequency eaton
FATAL: Unable to locate the requested data in NUT output
I don't know much PHP but it seems to be this test that fails:
if (preg_match("/^VAR \S+ \S+ \"(\d*\.?\d*)\"$/", $nut_response, $scratch) == 0) {
and a couple of echo's to show the data that is being processed show:
nut_response: VAR eaton input.frequency " 50.1"
scratch: Array
however that is the extent of my PHP. I have no idea where to go from here.
Can anyone point me towards a solution?
Thanks in advance.
I get all the unmet dependencies previously mentioned but I am not all that worried about them, I am sure I can fix them when I get the query working.
I have the latest nut installed for Ubuntu Natty 11.04
I have an Eaton Powerware 5110 attached to the USB port and get the following output from upsc:
ambient.temperature.high: 1
battery.charge.low: 22
battery.voltage: 27.7
device.mfr: Eaton
device.model: POWERWARE UPS 1000i
device.serial: ����
device.type: ups
driver.name: bcmxcp_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.6.0
driver.version.internal: 0.23
input.frequency: 50.1
input.frequency.high: 55
input.frequency.low: 45
input.frequency.nominal: 50
input.transfer.boost.high: 216
input.transfer.high: 280
input.transfer.low: 186
input.transfer.trim.low: 260
input.voltage: 242
input.voltage.nominal: 240
output.current: 0.0
output.current.nominal: 2.5
output.frequency: 50.1
output.phases: 1
output.voltage: 242
output.voltage.nominal: 240
ups.beeper.status: enabled
ups.firmware: Cont:00.50 Inve:01.50
ups.load: 0.0
ups.mfr: Eaton
ups.model: POWERWARE UPS 1000i
ups.power.nominal: 1000
ups.serial: ����
ups.status: OL
running the following query gives the expected result:
php /usr/share/cacti/site/scripts/ss_nut_ups_status.php localhost:: query ups.description
eaton:Eaton Powerware 5110
however when I try to run this query I get:
php /usr/share/cacti/site/scripts/ss_nut_ups_status.php 127.0.0.1:: query input.frequency eaton
FATAL: Unable to locate the requested data in NUT output
I don't know much PHP but it seems to be this test that fails:
if (preg_match("/^VAR \S+ \S+ \"(\d*\.?\d*)\"$/", $nut_response, $scratch) == 0) {
and a couple of echo's to show the data that is being processed show:
nut_response: VAR eaton input.frequency " 50.1"
scratch: Array
however that is the extent of my PHP. I have no idea where to go from here.
Can anyone point me towards a solution?
Thanks in advance.
Who is online
Users browsing this forum: No registered users and 0 guests