Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Mar 21, 2019 1:40 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Odd SCALE behaviour with label/RRD
PostPosted: Tue May 01, 2018 6:11 am 
Offline

Joined: Tue Jun 13, 2017 3:23 pm
Posts: 12
Hi,

I'm running into a bit of an oddity here. I am building a summary of remote sites on a geographical map, but the traffic in/out nodes/labels I'm using don't seem to be behaving as I'd expect. They report the right data value from my RRD file, but they wont play ball with my scale.

The Scale "100M":
Code:
KEYPOS 100M 1659 52 100MTraffic
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE 100M 0    0    192 192 192
SCALE 100M 0    1    228 255 255
SCALE 100M 1    10   212 255 209
SCALE 100M 10   20   170 233 165
SCALE 100M 20   30   142 216 136
SCALE 100M 30   40   103 191  97
SCALE 100M 40   50    75 167  68
SCALE 100M 50   60    48 141  41
SCALE 100M 60   70   204 198  26
SCALE 100M 70   80   183 128   9
SCALE 100M 80   90   183  58   9
SCALE 100M 90   100  127  36   0
SET key_hidezero_100M 1


The bandwidth IN/OUT nodes:
Code:
NODE STR-QUA-ROU1-BWOUT
        LABEL Out: {node:this:bandwidth_out:%k} / {node:this:max_bandwidth_out:%k}
        TARGET /var/www/cacti/rra/str-qua-rou1_traffic_in_2276.rrd
        POSITION 1163 925
        MAXVALUE 100M
        USESCALE 100M in percent

NODE STR-QUA-ROU1-BWIN
        LABEL In: {node:this:bandwidth_in:%k} / {node:this:max_bandwidth_in:%k}
        TARGET /var/www/cacti/rra/str-qua-rou1_traffic_in_2276.rrd
        POSITION 1163 946
        MAXVALUE 100M
        USESCALE 100M in percent


I've attached an image to this post of what it's outputting at the moment. FOr some reason, two things happen:
1. They are both the same colour, when according to the scale they should be different
2. That shade of blue isn't in my scale... Sometimes it turns a light blue aswell, like a cyan, that colour also isnt in my scale (my scale is a colour sweep from light green to dark red..)

Have I grossly misunderstood how scales work? Or am I just not defining something somewhere? The fact the two nodes behave the same is also alarming, I would have expected it to use the data value of that node/label for the scale value?


Attachments:
ukmapsnip1.JPG
ukmapsnip1.JPG [ 35.61 KiB | Viewed 287 times ]
Top
 Profile  
 
 Post subject: Re: Odd SCALE behaviour with label/RRD
PostPosted: Tue May 01, 2018 6:23 am 
Offline

Joined: Tue Jun 13, 2017 3:23 pm
Posts: 12
UPDATE

I figured it was using the same colour for both nodes because the "TARGET" was set the same.. So I further defined traffic_in and traffic_out on the TARGET's like this:

Code:
NODE STR-QUA-ROU1-BWOUT
        LABEL Out: {node:this:bandwidth_out:%k} / {node:this:max_bandwidth_out:%k}
        TARGET /var/www/cacti/rra/str-qua-rou1_traffic_in_2276.rrd:traffic_out:traffic_out
        POSITION 1163 925
        MAXVALUE 100M
        USESCALE 100M in percent

NODE STR-QUA-ROU1-BWIN
        LABEL In: {node:this:bandwidth_in:%k} / {node:this:max_bandwidth_in:%k}
        TARGET /var/www/cacti/rra/str-qua-rou1_traffic_in_2276.rrd:traffic_in:traffic_in
        POSITION 1163 946
        MAXVALUE 100M
        USESCALE 100M in percent


That resolved the issue of bothe nodes being the same colour. They are now different. BUT!! Both the colours that they are now are not in my scale, lol... It's using random colours for some reason and I can't figure out why. Pic attached of how it looks now.

Thanks, Dave.


Attachments:
ukmapsnip2.JPG
ukmapsnip2.JPG [ 19.22 KiB | Viewed 285 times ]
Top
 Profile  
 
 Post subject: Re: Odd SCALE behaviour with label/RRD
PostPosted: Tue May 01, 2018 7:54 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5290
Location: United Kingdom
Scale names must start with a letter. You should be seeing errors about unrecognized config in the logs.

Since the scale doesn't exist, it's still using the DEFAULT scale.

Looks like the naming thing isn't actually documented, although you are the first person to hit it (as far as I know) in a decade or more :-) I'll update the manual.

_________________
Weathermap 0.98 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!)


Top
 Profile  
 
 Post subject: Re: Odd SCALE behaviour with label/RRD
PostPosted: Tue May 01, 2018 8:20 am 
Offline

Joined: Tue Jun 13, 2017 3:23 pm
Posts: 12
Howie wrote:
Scale names must start with a letter. You should be seeing errors about unrecognized config in the logs.

Since the scale doesn't exist, it's still using the DEFAULT scale.

Looks like the naming thing isn't actually documented, although you are the first person to hit it (as far as I know) in a decade or more :-) I'll update the manual.


Ah! Ok, that's great I wasn't going mad haha... Changed SCALE name to "T100M", and it's working now.

Code:
SCALE T100M 0    0    192 192 192
SCALE T100M 0    1    228 255 255
SCALE T100M 1    10   212 255 209
SCALE T100M 10   20   170 233 165
SCALE T100M 20   30   142 216 136
SCALE T100M 30   40   103 191  97
SCALE T100M 40   50    75 167  68
SCALE T100M 50   60    48 141  41
SCALE T100M 60   70   204 198  26
SCALE T100M 70   80   183 128   9
SCALE T100M 80   90   183  58   9
SCALE T100M 90   100  127  36   0

NODE STR-QUA-ROU1-BWOUT
        LABEL Out: {node:this:bandwidth_out:%k} / {node:this:max_bandwidth_out:%k}
        TARGET /var/www/cacti/rra/str-qua-rou1_traffic_in_2276.rrd:traffic_out:traffic_out
        POSITION 1163 925
        MAXVALUE 100M
        USESCALE T100M in percent

NODE STR-QUA-ROU1-BWIN
        LABEL In: {node:this:bandwidth_in:%k} / {node:this:max_bandwidth_in:%k}
        TARGET /var/www/cacti/rra/str-qua-rou1_traffic_in_2276.rrd:traffic_in:traffic_in
        POSITION 1163 946
        MAXVALUE 100M
        USESCALE T100M in percent


Image attached of it working, just for sanity's sake and future reference.


Attachments:
ukmapsnip3.JPG
ukmapsnip3.JPG [ 18.6 KiB | Viewed 282 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group