[SOLVED] Creating stand alone values CPU,packetloss,latency?

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

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

Post by Howie »

Lonlie wrote:Hello,

I read all messages, but i have a problem with the CPU. I don't konw how do you do to recover this. I wrote :

NODE test
LABEL {node:this:name} %
TARGET C:/Apache2.2/htdocs/cacti/rra/lol_traffic_in_36.rrd
POSITION 212 399

I don't know for "name" what I should write.
It is ALWAYS {node:this:bandwidth_in} or {node:this:bandwidth_out} or {node:this:inpercent} or {node:this:outpercent} - depending on if you want the value or percentage, and in or out.

It looks like you are looking at an interface traffic rrd file 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!)
Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

Post by Lonlie »

Sorry, I took a bad example ...

NODE test
LABEL {node:this:name} %
TARGET C:/Apache2.2/htdocs/cacti/rra/cool_cpu_54.rrd
POSITION 212 399

Must I do use bandwidth_in, bandwidth_out ... too ?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Lonlie wrote:Sorry, I took a bad example ...

NODE test
LABEL {node:this:name} %
TARGET C:/Apache2.2/htdocs/cacti/rra/cool_cpu_54.rrd
POSITION 212 399

Must I do use bandwidth_in, bandwidth_out ... too ?
howie wrote: ALWAYS
:-)

You change the DS name in the TARGET, but the {} part will always be bandwidth_in or bandwidth_out etc as above.

If you check the cacti.log, you will see errors from WEATHERMAP if the DS name is incorrect, along with a list of valid DS names.
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!)
Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

Post by Lonlie »

Thanks, I understood !

I wrote :

NODE test
LABEL {node:this:outpercent:%k} %
TARGET C:/Apache2.2/htdocs/cacti/rra/cool_cpu_55.rrd:-:cpu
POSITION 53 274

In result, I have a number like this : 143.47

But the percent should be between 0 and 100 !
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Lonlie wrote:Thanks, I understood !

I wrote :

NODE test
LABEL {node:this:outpercent:%k} %
TARGET C:/Apache2.2/htdocs/cacti/rra/cool_cpu_55.rrd:-:cpu
POSITION 53 274

In result, I have a number like this : 143.47

But the percent should be between 0 and 100 !
I agree :-)

If you run with DEBUG logging turned on for one poller cycle, then look in cacti.log, you should see some lines like:
RRD ReadData returning [...]

that should tell you what weathermap is reading from the rrd file. I guess it's possible that for a dual core CPU, you get a number from 0 to 200%...

If that's what is going on, then you should add
MAXVALUE 200
to the node, so the percentage is calculated with 100% as the value 200 (if you see what I mean).
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!)
Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

Post by Lonlie »

I see what you mean. And I have a dual core CPU :).
But I have one .rrd for each CPU ...
Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

Post by Lonlie »

I used an other computer (Amd Sempron), and for the Cpu, I had 756 !
I verified, and I used the good file. Then, I opened the .rrd file with RRD Editor, and the values don't jibed with the values in weathermap ... In the file, I had the good values I think. For example :
9,2000000000E+01
9,2000000000E+01
9,3680000000E+01
9,5000000000E+01

I looked on the graph, and it's the good values.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Lonlie wrote:I used an other computer (Amd Sempron), and for the Cpu, I had 756 !
I verified, and I used the good file. Then, I opened the .rrd file with RRD Editor, and the values don't jibed with the values in weathermap ... In the file, I had the good values I think. For example :
9,2000000000E+01
9,2000000000E+01
9,3680000000E+01
9,5000000000E+01

I looked on the graph, and it's the good values.
Oh wait... add gauge: to the front of the TARGET - by default it multiplies by 8, because it assumes you have a byte-counter value, and you want bits/sec.

So that's:
TARGET gauge:C:/Apache2.2/htdocs/cacti/rra/cool_cpu_55.rrd:-:cpu
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!)
Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

Post by Lonlie »

Thanks a lot !
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: [SOLVED] Creating stand alone values CPU,packetloss,late

Post by Atreides »

Hello, I have a question somehow related to this thread and I dont wanna open another one, I hope its not a problem:).
Howie : If I want to aggregate 2 .rrd's for a link, to have a "sum" its possible this way : ?

LABEL {node:this:inpercent}
TARGET gauge:/rra/traffic1.rrd :/rra/traffic2.rrd

Basically I want to see traffic(both inbound and outbound) on a single link combined from 2 separated interfaces.
ikorzha758
Cacti User
Posts: 164
Joined: Thu Jan 21, 2010 8:41 pm

Re: [SOLVED] Creating stand alone values CPU,packetloss,late

Post by ikorzha758 »

Atreides, answer to your question is YES:
Below is CPU example that I use
Basically take a look at target statement It uses 2 gauge statements back to back.

NODE CPU
LABEL {node:this:inpercent:%.d}%
TARGET gauge:/var/www/html/rra/xxx_proc_system_25653.rrd:proc_system:proc_system gauge:/var/www/html/rra/xxx_proc_user_25654.rrd:proc_user:proc_user
USESCALE ping in percent
POSITION 50 50
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: [SOLVED] Creating stand alone values CPU,packetloss,late

Post by Howie »

Yep, you can add two targets by adding them both on one line with a space between. You can also do subtraction by prefixing a target with a '-' (no space between the - and the target) and also multiply with '3*' prefix (again, no space around the *). Finally, because x/y = x * 1/y you can also divide: 0.5*blah.rrd
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!)
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: [SOLVED] Creating stand alone values CPU,packetloss,late

Post by Atreides »

Hmm, something I'm doing wrong, it seems that its not possible to put a LABEL on links. Keep getting this error :

Unrecognised config on line 91: LABEL {node:this:inpercent:%k}%

I have this same labe under a NODE section(for CPU) and its working. This is the full code :

# regular LINKs:
LINK ra-rd
WIDTH 5
BWOUTLINECOLOR none
BWBOXCOLOR none
LABEL {node:this:inpercent:%k}%
INFOURL /v3/graph.php?rra_id=all&local_graph_id=3388
OVERLIBGRAPH /v3/graph_image.php?local_graph_id=3388&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET gauge:/var/www/html/v3/rra/ro-ar01a-ra_traffic_in_3416.rrd:traffic_in:traffic:in gauge:/var/www/html/v3/rra/ro-ar01a-ra_traffic_in_3417.rrd:traffic_in:traffic_in


Few lines up under the NODE section I have :

NODE cpu0_aurora
LABEL {node:this:outpercent:%k}%
TARGET gauge:/var/www/html/v3/rra/local_cpu_3240.rrd:-:cpu
INFOURL /v3/graph.php?rra_id=all&local_graph_id=3212
OVERLIBGRAPH /v3/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=3212
POSITION 550 537

wich is working.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: [SOLVED] Creating stand alone values CPU,packetloss,late

Post by Howie »

That's correct. There is no such thing as a label on links.

However, there is a COMMENT - check out INCOMMENT and OUTCOMMENT in the manual.
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!)
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: [SOLVED] Creating stand alone values CPU,packetloss,late

Post by Atreides »

That will do what I'm trying? Wich is a sum of 2 rrd's from 2 interfaces?

EDIT : I've read about COMMENT,'tho its a nice feature and I'll use it, its not what I'm looking for.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest