[SOLVED] Creating stand alone values CPU,packetloss,latency?
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 89
- Joined: Fri May 25, 2007 1:18 pm
Hi,
can someone clear this up for me?
I'm have the Advanced Ping templates working and I'd like to add a node with Average Latency value to my weathermap.
I have the following in my node's config:
NODE node1208821722
LABEL Latency
INFOURL http://myserver/cacti/graph.php?rra_id= ... ph_id=1996
OVERLIBGRAPH http://myserver/cacti/graph_image.php?l ... _width=300
TARGET gauge:/srv/www/htdocs/cacti/rra/gw1_rtr_loss_2059.rrd:loss:avg
POSITION 145 143
the OVERLIBGRAPH part works fine, but I have no idea how to reference the avg latency value from my rrd and then put that into the Label.
Can someone pls help? I'm all confused
Thx
can someone clear this up for me?
I'm have the Advanced Ping templates working and I'd like to add a node with Average Latency value to my weathermap.
I have the following in my node's config:
NODE node1208821722
LABEL Latency
INFOURL http://myserver/cacti/graph.php?rra_id= ... ph_id=1996
OVERLIBGRAPH http://myserver/cacti/graph_image.php?l ... _width=300
TARGET gauge:/srv/www/htdocs/cacti/rra/gw1_rtr_loss_2059.rrd:loss:avg
POSITION 145 143
the OVERLIBGRAPH part works fine, but I have no idea how to reference the avg latency value from my rrd and then put that into the Label.
Can someone pls help? I'm all confused
Thx
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
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:
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: Select all
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
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!)
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!)
-
- Cacti User
- Posts: 89
- Joined: Fri May 25, 2007 1:18 pm
-
- Cacti User
- Posts: 89
- Joined: Fri May 25, 2007 1:18 pm
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Yes. This is the bit that's apparently not documentedcdnvballer 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?
{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
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!)
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!)
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.
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: Select all
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
- Attachments
-
- node.jpg (16.92 KiB) Viewed 9950 times
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
What does the SCALE look like? That's what decides the colours...
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!)
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!)
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: Select all
SCALE DEFAULT 0 75 0 255 0 255 255 0
SCALE DEFAULT 76 100 255 255 0 255 0 0
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
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.
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.
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!)
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!)
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.
Thanks,
Bob
Code: Select all
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
Bob
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
And you weren't getting any errors about non-existent files? That's weird. Oh well.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.
Thanks,Code: Select all
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
Bob
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!)
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!)
This works for me now too:
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
Code: Select all
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
Thanks,
Bob
Who is online
Users browsing this forum: No registered users and 1 guest