Need help for display traffic in node label

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
benoit
Posts: 23
Joined: Wed Dec 12, 2007 8:03 am
Location: Paris, France

Need help for display traffic in node label

Post by benoit »

Code: Select all

NODE TRAFFIC_out
	LABEL {node:this:bandwidth_out:%k} Out
	ICON none

NODE TRAFFIC_in
	LABEL {node:this:bandwidth_in:%d} In
	ICON none


# TEMPLATE-only LINKs:
LINK DEFAULT
	WIDTH 3
	ARROWSTYLE compact
	BWSTYLE Angled
	BANDWIDTH 50M


# regular NODEs:


NODE RACFWROS03_traffic_in
	TEMPLATE TRAFFIC_in
	INFOURL /cacti/graph.php?rra_id=all&local_graph_id=82557
	OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=82557
	TARGET gauge:/usr/share/cacti/site/rra/racfwros03_cluster_ifinoctets_82935.rrd:-:ifInOctets
	POSITION 1109 281

NODE RACFWROS03_traffic_out
	TEMPLATE TRAFFIC_out
	INFOURL /cacti/graph.php?rra_id=all&local_graph_id=82557
	OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=82557
	TARGET gauge:/usr/share/cacti/site/rra/racfwros03_cluster_ifinoctets_82935.rrd:-:ifOutOctets
	POSITION 1108 302
Hi Everybody !

First > excuse me for my bad English ...

Two > You can see up a truncated part of my testing config ... my problem is that i can't display correct label for the traffic " In " , always " showing " 0 " ( see attachment )
Is there any problem in the config ?
( inOutOctets and inOutOctets are the DS name showing by rrdtool info .. )
What to do to display mega and not kilo ?

Third > Can someone tell ( or show ) me how i can change the color of the concerned node label using the status of the VPN Tunnel ( up / down ) .
I'm using the "Netscreen - Tunnel Interface Traffic" template.

Cacti Logs =
04/19/2011 02:45:24 PM - WEATHERMAP: Poller[0] WARNING: [Map 30] test.conf: NewColourFromPercent: Clipped 489277.12484% to 100% for item RACFWROS03_traffic_out [WMWARN33]
04/19/2011 02:45:24 PM - WEATHERMAP: Poller[0] WARNING: [Map 30] test.conf: NewColourFromPercent: Clipped 147912.98507% to 100% for item RACFWROS03_traffic_in [WMWARN33]
Thank you very much

Benoît
Attachments
Capture-1.png
Capture-1.png (39.82 KiB) Viewed 5428 times
" no keyboard detected, press any key to continue ..."
benoit
Posts: 23
Joined: Wed Dec 12, 2007 8:03 am
Location: Paris, France

Re: Need help for display traffic in node label

Post by benoit »

hey !!??
My question is so stupid !? :( :o :wink:
" no keyboard detected, press any key to continue ..."
beenpricked
Posts: 6
Joined: Tue Sep 20, 2011 5:35 pm

Re: Need help for display traffic in node label

Post by beenpricked »

I don't think your question is stupid, I am just having a hard time trying to figure out what conclusion you are really looking for. Do you still need help here, I need a couple more details especially if you are running Outlook Repair like I think you should in this case. It is a quick way to recover missing items and get back on track.
rvd
Posts: 34
Joined: Wed Nov 21, 2007 10:09 am
Location: France

Re: Need help for display traffic in node label

Post by rvd »

benoit wrote:

Code: Select all

NODE TRAFFIC_out
	LABEL {node:this:bandwidth_out:%k} Out
	ICON none

NODE TRAFFIC_in
	LABEL {node:this:bandwidth_in:%d} In
	ICON none

...

What to do to display mega and not kilo ?
[/quote]

According to http://www.network-weathermap.com/manual/latest/pages/advanced.html#tokens

[quote]
Formatting in Special Tokens

To allow you to control better how the values of special tokens are used, you can add a final part inside the token that specifies the format. 

This borrows the '%' format from the printf() function in C, PHP, perl and many other languages, but adds a couple of Weathermap-specific extras: 



{link:this:bandwidth_in:%d}

force to integer



{link:this:bandwidth_in:%04d}

force to integer, and padd to 4 digits with zeroes



{link:this:bandwidth_in:%0.2f}

floating-point with 2 decimal places



{link:this:bandwidth_in:%k}

Add a prefix for mega, kilo, giga, milli etc, and show the rest as a floating-point number - e.g. 2.3M (Weathermap special)



{link:this:bandwidth_in:%0.2k}

as above, but limit the floating-point part to 2 decimal places (Weathermap special)
[/quote]

I would try %k in both IN and OUT
      

[quote="benoit"] Can someone tell ( or show ) me how i can change the color of the concerned node label using the status of the VPN Tunnel ( up / down ) .
           I'm using the "Netscreen - Tunnel Interface Traffic" template.

[/quote]

I don't know how this template works but the purpose should be to use a scale with 2 colors, let's say Green and Red, and to associate Red with down and Green with Up. 
See http://www.network-weathermap.com/manual/latest/pages/config-reference.html#NODE_USESCALE


Hervé
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests