UPS Runtime - Manipulate RRD Value

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
DonnieDarko84
Posts: 6
Joined: Wed Mar 19, 2014 2:31 pm

UPS Runtime - Manipulate RRD Value

Post by DonnieDarko84 »

Hi All,

I have a working Weather Map setup and I'm trying to expand on it to show the UPS runtime values. I have the proper value showing with the below config:

NODE L-UPS_RUNTIME
LABEL {node:this:bandwidth_in}
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=2670
TARGET gauge:D:/Apache2/htdocs/cacti/rra/79/2687.rrd:runtime:-
OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=2670
POSITION 89 1066
USESCALE none

The only problem is that the OID that the graph is tracking is expressed in 'ticks'. For example, what displays on the label is '3238800' - after some looking it appears that this value is the time remaining on battery in ticks - in order to get this into minutes I would need to divide 3238800 by 100 and then divide by 60.

(3238800 / 100) / 60 = ~540 minutes

Is there a way that I can manipulate this value with the above logic?
jfriant
Posts: 1
Joined: Fri Mar 04, 2016 3:30 pm
Location: North Carolina, USA

Re: UPS Runtime - Manipulate RRD Value

Post by jfriant »

I switched the TARGET from gauge to scale to do this. For example on your line:

Code: Select all

TARGET gauge:D:/Apache2/htdocs/cacti/rra/79/2687.rrd:runtime:-
It would become:

Code: Select all

TARGET scale:0.0001666667:D:/Apache2/htdocs/cacti/rra/79/2687.rrd:runtime:-
The number right after scale is the result of your equation to turn the ticks into minutes that you get by dividing 1 tick by 100 and 60.
Jim Friant
DonnieDarko84
Posts: 6
Joined: Wed Mar 19, 2014 2:31 pm

Re: UPS Runtime - Manipulate RRD Value

Post by DonnieDarko84 »

That did the trick. Thanks!
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: UPS Runtime - Manipulate RRD Value

Post by Howie »

You might also like the patch in this thread (which will be in the next release), that allows you to just display SNMP timeticks with better formatting...

(you'd still need gauge: )

http://forums.cacti.net/viewtopic.php?f=16&t=49274
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest