|
|
| Author |
Message |
cdnvballer
Joined: 25 May 2007 Posts: 27
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2059 Location: United Kingdom
|
Posted: Tue Apr 22, 2008 2:00 am Post subject: |
|
|
OK. Once again:
1) In the TARGET, those loss and avg on the end must be the names of DS in your rrd file - check by either looking at the cacti.log for Weathermap complaining that they are not, or by running 'rrdtool info yourfile.rrd'.
2) The weathermap rrd plugin uses those DS names as the 'in' and 'out' value for your link or node (nodes have an in and out value too).
3) So regardless of what the rrd DS are called, the string for the label (if you want the 'in' value) will always be: {node:this:bandwidth_in} or {node:this:inpercent} (if you want a percentage of BANDWIDTH/MAXVALUE instead).
In your TARGET line, the latency is the out value (I assume avg is latency), so that would be:
| Code: |
NODE node1208821722
LABEL Latency {node:this:bandwidth_out}ms
INFOURL http://myserver/cacti/graph.php?rra_id=all&local_graph_id=1996
OVERLIBGRAPH http://myserver/cacti/graph_image.php?local_graph_id=1996&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET gauge:/srv/www/htdocs/cacti/rra/gw1_rtr_loss_2059.rrd:loss:avg
POSITION 145 143
|
|
|
| Back to top |
|
 |
cdnvballer
Joined: 25 May 2007 Posts: 27
|
Posted: Tue Apr 22, 2008 3:00 am Post subject: |
|
|
thanks it makes sense now, after I looked at the cacti log
|
|
| Back to top |
|
 |
cdnvballer
Joined: 25 May 2007 Posts: 27
|
Posted: Tue Apr 22, 2008 3:32 pm Post subject: |
|
|
one last question:
the latency values being reported are pretty lenghty..
any way I can round them to 2-3 digits to the right of the decimal place?
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2059 Location: United Kingdom
|
Posted: Tue Apr 22, 2008 3:51 pm Post subject: |
|
|
| cdnvballer wrote: | one last question:
the latency values being reported are pretty lenghty..
any way I can round them to 2-3 digits to the right of the decimal place? |
Yes. This is the bit that's apparently not documented
{node:this:bandwidth_in:%.2f} will give you 2 decimal places
{node:this:bandwidth_in:%d} will give you an integer
That last part is optional, and gives you control over the formatting of the number. It uses the same tokens as printf() does in C, php, perl etc...
There's one other option: %k, which uses weathermap's kilo/mega/giga/milli formatting. e.g. 12300212 -> 12.3M and 0.0034 -> 3.4m
|
|
| Back to top |
|
 |
thomasj
Joined: 27 Mar 2008 Posts: 7
|
Posted: Wed Apr 23, 2008 5:07 am Post subject: |
|
|
Hi!
Have been busy with other stuff for a couple of weeks but gave this a new try today.
Can someone explain why node03871 in the picture is red and the others are green. Here are the config for these four.
| Code: | NODE node00576
LABEL {node:this:bandwidth_out:%d} NonUnicast/s
TARGET gauge:/var/www/cacti/rra/r-adm-stadshus_nonunicast_out_536.rrd:-:nonunicast_out
POSITION 212 399
NODE node03161
LABEL {node:this:bandwidth_in:%d} NonUnicast/s
TARGET gauge:/var/www/cacti/rra/r-adm-stadshus_nonunicast_out_536.rrd:nonunicast_in:-
POSITION 149 484
NODE node03502
LABEL {node:this:bandwidth_out:%d} Unicast/s
TARGET gauge:/var/www/cacti/rra/r-adm-stadshus_unicast_in_537.rrd:-:unicast_out
POSITION 174 427
NODE node03871
LABEL {node:this:bandwidth_in:%d} Unicast/s
TARGET gauge:/var/www/cacti/rra/r-adm-stadshus_unicast_in_537.rrd:unicast_in:-
POSITION 128 511
|
| Description: |
|
| Filesize: |
16.92 KB |
| Viewed: |
1713 Time(s) |

|
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2059 Location: United Kingdom
|
Posted: Wed Apr 23, 2008 5:14 am Post subject: |
|
|
| What does the SCALE look like? That's what decides the colours...
|
|
| Back to top |
|
 |
thomasj
Joined: 27 Mar 2008 Posts: 7
|
Posted: Wed Apr 23, 2008 5:53 am Post subject: |
|
|
This is what the scale looks like. Since SCALE is the same for all four and the second one is even higher than the bottom one i did not think it had anything to do with that.
| Code: | SCALE DEFAULT 0 75 0 255 0 255 255 0
SCALE DEFAULT 76 100 255 255 0 255 0 0
|
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2059 Location: United Kingdom
|
Posted: Wed Apr 23, 2008 6:09 am Post subject: |
|
|
Nothing else changes the colours...
I think what it is is that the default setup for nodes is to use the 'in' value to colour the node (it has to use one or the other). The one that is red is the only one with a large 'in' value. The other large value is on the 'out' side.
If you don't want them to change colour at all, then set use USESCALE none.
If you want them all to change colour the same way, then use USESCALE DEFAULT out on the ones that have an 'out' value but no in.
|
|
| Back to top |
|
 |
thomasj
Joined: 27 Mar 2008 Posts: 7
|
Posted: Wed Apr 23, 2008 6:42 am Post subject: |
|
|
Solved again! (Found the MAXVALUE to set the values the same way as BANDWIDTH)
Thanks!
/Thomas
|
|
| Back to top |
|
 |
laamidd
Joined: 17 Feb 2006 Posts: 48
|
Posted: Mon May 12, 2008 1:05 pm Post subject: |
|
|
For Windows, I had to use the full path to the .rrd. That was my problem it seems. Everything that should have worked, does now.
| Code: |
NODE AtlanticCityWClatency
LABEL Latency {node:this:bandwidth_out:%.2f} ms
TARGET gauge:D:\cacti8.7b\rra\atlantic_city_wc_-_10_6_12_5_loss_159.rrd:-:avg
|
Thanks,
Bob
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2059 Location: United Kingdom
|
Posted: Mon May 12, 2008 1:08 pm Post subject: |
|
|
| laamidd wrote: | For Windows, I had to use the full path to the .rrd. That was my problem it seems. Everything that should have worked, does now.
| Code: |
NODE AtlanticCityWClatency
LABEL Latency {node:this:bandwidth_out:%.2f} ms
TARGET gauge:D:\cacti8.7b\rra\atlantic_city_wc_-_10_6_12_5_loss_159.rrd:-:avg
|
Thanks,
Bob |
And you weren't getting any errors about non-existent files? That's weird. Oh well.
|
|
| Back to top |
|
 |
laamidd
Joined: 17 Feb 2006 Posts: 48
|
Posted: Mon May 12, 2008 1:28 pm Post subject: |
|
|
| Quote: |
And you weren't getting any errors about non-existent files? That's weird. Oh well.
|
Nope. I just had time to look at this again and it jumped out at me when I looked at Thomasj's code. He has the path to the file, so I tried that and it's all good now.
Thanks again,
Bob
|
|
| Back to top |
|
 |
laamidd
Joined: 17 Feb 2006 Posts: 48
|
Posted: Mon May 12, 2008 1:55 pm Post subject: |
|
|
This works for me now too:
| Code: |
NODE testnode
LABEL testnode
POSITION 89 182
TARGET gauge:D:\cacti8.7b\rra\atlantic_city_wc_-_10_6_12_5_loss_159.rrd:-:avg
NODE testnodeLatency
POSITION testnode 0 30
LABEL Latency {node:testnode:bandwidth_out} ms
|
The result is on the left side of the map. What's on the right, is from the code from my last post. Sorry for the big .png, but I can't manipulate photos on the web at work.
Thanks,
Bob
|
|
| Back to top |
|
 |
Lonlie
Joined: 05 Jun 2008 Posts: 23 Location: France
|
Posted: Fri Jun 20, 2008 5:12 am Post subject: |
|
|
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.
|
|
| Back to top |
|
 |
|