Scale+Legend editting (weathermap)

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
epair
Posts: 13
Joined: Mon Dec 22, 2008 3:52 am
Location: KL, Malaysia
Contact:

Scale+Legend editting (weathermap)

Post by epair »

Hi,

I've a situation here. i need to change the legend to something like this:

<Colour1> <text1>
<Colour2> <text2>
<Colour3> <text3>
(without displaying the scale)

default weathermap legend;

<Colour1> <Scale1>
<Colour2> <Scale2>
<Colour3> <Scale3>

Could somebody please help me here? What to change and how to do it?

TQ
Attachments
example.PNG
example.PNG (1.02 KiB) Viewed 8793 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

You can't do this right now.

Where would you want that text to come from? The 'tag' from the end of the SCALE lines?
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!)
colejv
Posts: 46
Joined: Wed Mar 19, 2008 10:50 am

Post by colejv »

The config below simulates your example,it is not very clean and it takes a bit of work but it works on the sample.conf

Simulating the white background of the legend is a bit ugly and may pose problems (z-ordering in .96 would help)

.96's Templates would clean it up a bit

the target values here are based on the default scale and a MAXVALUE of 100

Using LABELOFFSET would also clean it up by cutting the number of nodes needed if half, but as far as I can tell you can't use (LABELBGCOLOR none) and (AICONFILLCOLR copy) or (USEICONSCALE) together, whenever I try this (LABELBGCOLOR none) is ignored.

Code: Select all

NODE Legend
        LABEL Traffic Load
        ICON 80 80 box
        LABELOFFSET 0 -30
        AICONFILLCOLOR 255 255 255
        LABELBGCOLOR none
        LABELOUTLINECOLOR none
        POSITION 200 300

NODE Legend1text
        LABEL text1
        LABELBGCOLOR none
        LABELOUTLINECOLOR none
        POSITION Legend1 40 0

NODE Legend1
        ICON 30 15 box
        AICONFILLCOLOR copy
        TARGET static:9
        POSITION Legend -20 -10

NODE Legend2text
        LABEL text2
        LABELBGCOLOR none
        LABELOUTLINECOLOR none
        POSITION Legend2 40 0

NODE Legend2
        ICON 30 15 box
        AICONFILLCOLOR copy
        TARGET static:24
        POSITION Legend1 0 20

NODE Legend3text
        LABEL text3
        LABELBGCOLOR none
        LABELOUTLINECOLOR none
        POSITION Legend3 40 0


NODE Legend3
        ICON 30 15 box
        TARGET static:39
        POSITION  Legend2 0 20
epair
Posts: 13
Joined: Mon Dec 22, 2008 3:52 am
Location: KL, Malaysia
Contact:

Post by epair »

Howie wrote:You can't do this right now.

Where would you want that text to come from? The 'tag' from the end of the SCALE lines?

yup, something like that. sigh
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

epair wrote:
Howie wrote:You can't do this right now.

Where would you want that text to come from? The 'tag' from the end of the SCALE lines?

yup, something like that. sigh
OK. Watch this space. See what santa brings you.
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!)
epair
Posts: 13
Joined: Mon Dec 22, 2008 3:52 am
Location: KL, Malaysia
Contact:

Post by epair »

colejv wrote:The config below simulates your example,it is not very clean and it takes a bit of work but it works on the sample.conf

Simulating the white background of the legend is a bit ugly and may pose problems (z-ordering in .96 would help)

.96's Templates would clean it up a bit

the target values here are based on the default scale and a MAXVALUE of 100

Using LABELOFFSET would also clean it up by cutting the number of nodes needed if half, but as far as I can tell you can't use (LABELBGCOLOR none) and (AICONFILLCOLR copy) or (USEICONSCALE) together, whenever I try this (LABELBGCOLOR none) is ignored.

Code: Select all

NODE Legend
        LABEL Traffic Load
        ICON 80 80 box
        LABELOFFSET 0 -30
        AICONFILLCOLOR 255 255 255
        LABELBGCOLOR none
        LABELOUTLINECOLOR none
        POSITION 200 300

NODE Legend1text
        LABEL text1
        LABELBGCOLOR none
        LABELOUTLINECOLOR none
        POSITION Legend1 40 0

NODE Legend1
        ICON 30 15 box
        AICONFILLCOLOR copy
        TARGET static:9
        POSITION Legend -20 -10

NODE Legend2text
        LABEL text2
        LABELBGCOLOR none
        LABELOUTLINECOLOR none
        POSITION Legend2 40 0

NODE Legend2
        ICON 30 15 box
        AICONFILLCOLOR copy
        TARGET static:24
        POSITION Legend1 0 20

NODE Legend3text
        LABEL text3
        LABELBGCOLOR none
        LABELOUTLINECOLOR none
        POSITION Legend3 40 0


NODE Legend3
        ICON 30 15 box
        TARGET static:39
        POSITION  Legend2 0 20
I've tried what colejv had suggested to me. TQVM. but, the thing is, i would like to hide the default scale/legend in the map without interfering with the scale. attached is the sample of what i've tried so far.
Attachments
example2.PNG
example2.PNG (138.44 KiB) Viewed 8726 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

You can hide the default legend:

KEYPOS DEFAULT -1 -1


(just noticed that that's not in the manual... I'll fix that)
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!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Just added in time for 0.96test2: KEYSTYLE tags

Gives you a 'classic' style legend, but with the scale tags instead of percentages.

Code: Select all

KEYPOS DEFAULT 40 40 Traffic Load
KEYSTYLE  DEFAULT tags
SCALE DEFAULT 1 10   140 0 255  Nothing
SCALE DEFAULT 10 25   32 32 255  Not Much
SCALE DEFAULT 25 40   0 192 255  Fair
SCALE DEFAULT 40 55   0 240 0  Some
SCALE DEFAULT 55 70   240 240 0  Quite A Lot
SCALE DEFAULT 70 85   255 192 0  Loads
SCALE DEFAULT 85 100   255 0 0  Too Much
0.96test2 should be out in a day or two, depending on how much time I get over Christmas, and how much I decide to document ;-)
Attachments
tag-style.png
tag-style.png (5.47 KiB) Viewed 8697 times
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!)
epair
Posts: 13
Joined: Mon Dec 22, 2008 3:52 am
Location: KL, Malaysia
Contact:

Post by epair »

Nice! TQ. Let say if i upgrade to this 0.96test2 (currently i'm using 0.941), will i lose any data/weathermap configs file? my system is now on development and soon to be in production.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

There are no incompatible changes - you should even be able to go back to 0.94 or 0.95 if you don't like it (as long as you don't use the new features, obviously).
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!)
epair
Posts: 13
Joined: Mon Dec 22, 2008 3:52 am
Location: KL, Malaysia
Contact:

Post by epair »

thanks, you guys. you have been very helpful. :D
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests