aggregate all DS from one rrd

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
sh0x
Posts: 32
Joined: Thu Aug 30, 2007 6:12 pm
Location: California

aggregate all DS from one rrd

Post by sh0x »

Hi,is there an easy way to add all of the data sources in the same target together and display the output? For example I want to combine these values and display them as an aggregate.

guage:{map:cacti_path_rra}/node_errors_in_4000.rrd:errors_in
guage:{map:cacti_path_rra}/node_errors_in_4000.rrd::errors_out
guage:{map:cacti_path_rra}/node_errors_in_4000.rrd:discards_in
guage:{map:cacti_path_rra}/node_errors_in_4000.rrd:discards_out

I think I could put that all on one line and it would total them up, but then I'd have to do this for every link. Its a lot of typing, so I'm looking for an easier way.

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

Re: aggregate all DS from one rrd

Post by Howie »

Code: Select all


LINK DEFAULT
   TARGET gauge:{map:cacti_path_rra}/node_errors_in_{link:this:local_data_id}.rrd:errors_in:- gauge:{map:cacti_path_rra}/node_errors_in_{link:this:local_data_id}.rrd:-:errors_out gauge:{map:cacti_path_rra}/node_errors_in_{link:this:local_data_id}.rrd:discards_in gauge:{map:cacti_path_rra}/node_errors_in_{link:this:local_data_id}.rrd:-:discards_out
   
LINK one
   NODES a b
   SET local_data_id 4000
   
LINK two
   NODES c d
   SET local_data_id 3384
(that's all one line for the target, and I corrected the spelling of gauge, and the ds specs wouldn't have worked without the - in there).
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!)
sh0x
Posts: 32
Joined: Thu Aug 30, 2007 6:12 pm
Location: California

Post by sh0x »

Thanks I see how that works. When I use a "-" I get an error. For example:

Code: Select all

TARGET target_errors_in_4366.rrd:discards_in:-
Results in:

Code: Select all

target: /var/www/html/cacti/rra/target_errors_in_4366.rrd:discards_in:- on config line 80 had no valid data, according to WeatherMapDataSource_rrd 
But if i use:

Code: Select all

target_errors_in_4366.rrd:discards_in:discards_out
I don't get any errors, but thats not what I want. I'm leaving gauage out for now until I understand this part.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

sh0x wrote: But if i use:

Code: Select all

target_errors_in_4366.rrd:discards_in:discards_out
I don't get any errors, but thats not what I want. I'm leaving gauage out for now until I understand this part.
Well, actually it is, if you want to show total errors/discards in and total errors/discards out as the two sides of link. You can reduce it to:

Code: Select all

LINK DEFAULT 
   TARGET gauge:{map:cacti_path_rra}/node_errors_in_{link:this:local_data_id}.rrd:errors_in:errors_out gauge:{map:cacti_path_rra}/node_errors_in_{link:this:local_data_id}.rrd:discards_in:discards_out 
If you want the in and out errors to all appear on the 'in' side of the link on the map, then the example I gave was wrong anyway.

The '-' issue is a bug in 0.96 that is fixed in 0.97 - sorry, I'd forgotten about that. It should work again soon though.
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!)
madraven
Posts: 14
Joined: Tue Mar 25, 2008 11:46 am

Re: aggregate all DS from one rrd

Post by madraven »

Hi,
I'm trying to show the total power used in each of the banks of the PDU's in my racks on weathermap...

To do this i've followed this thread...

What i'm getting displayed is the first DS's value... or a no value at all..
the two ds's are :-
host-1-bank1
host-2-bank1

This is the target line from my config..

TARGET 0.1*gauge:/var/www/html/cacti/rra/host-1-bank1.rrd:APC_32a_Bank1_Load:- 0.1*gauge:/var/www/html/cacti/rra/host-2-bank1.rrd:APC_32a_Bank1_Load
I'm using
weathermap 0.97a
Cacti 0.8.7e

I've tryed removing the space from the ":- 0.1*gauge" bit.. taking out the "-" but it seems to not like it :(
Can any one help??

Thanks :)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: aggregate all DS from one rrd

Post by Howie »

You are missing the :- from the end of the second part. You should be getting an error in the cacti log saying that the second part is not recognised as a valid target.

So you MUST have the space between the two parts, because they are two separate targets. And if you specify DS names, you MUST specify two DS names, even if the second one is only '-' (which is the bit you have wrong at the moment, I think).
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!)
madraven
Posts: 14
Joined: Tue Mar 25, 2008 11:46 am

Re: aggregate all DS from one rrd

Post by madraven »

Yea it works now :lol: !!

Thanks sorting that out Howie :) ... it was driving me round the bend :S
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest