Varying the AREA colour ?
Moderators: Developers, Moderators
Varying the AREA colour ?
Finally got cacti working (Win2008 x64) and have started to play with templates.
This is a graph I've generated for the NPE outlet temp on one of our Cisco 7200's:
In a clunky way, this shows the current temp, and the chassis thresholds (WARNING, CRITICAL and SHUTDOWN). Those are just hardcoded HRULE's right now. I've been trying to pretty it up, and so far have only managed to break the graphs with various complaints from RRD.
This is what I'd like to get to:
Some of you will have noticed how much this is based on one of the nifty RRD gallery images.
Not seen any examples of varying AREA colour depending on value yet, and I've had no luck trying to use the various Graph Items myself, but I have become adept at completely trashing templates and graphs!
Any help or pointers appreciated.
This is a graph I've generated for the NPE outlet temp on one of our Cisco 7200's:
In a clunky way, this shows the current temp, and the chassis thresholds (WARNING, CRITICAL and SHUTDOWN). Those are just hardcoded HRULE's right now. I've been trying to pretty it up, and so far have only managed to break the graphs with various complaints from RRD.
This is what I'd like to get to:
Some of you will have noticed how much this is based on one of the nifty RRD gallery images.
Not seen any examples of varying AREA colour depending on value yet, and I've had no luck trying to use the various Graph Items myself, but I have become adept at completely trashing templates and graphs!
Any help or pointers appreciated.
Getting closer ...
Playing with this a little more, I've almost got there:
NB data src here is a PHP script - luckily the real temp values are pretty static!
A few cosmetic bugs I'm still stuck on:
• The white space plotted on category transitions
• The background colours for NaN data [UPDATE - now fixed! ]
I'm at a loss on the white lines, but still tinkering with the background STACK CDEF's to fix the NAN values. Suggestions welcome!
This particular chassis (Cisco 7200) happens to be an ISP transit router on our network edge. Be keen to get suggestions for a new host template. So far I've got:
CPU usage (5m, 1m, 5s)
Memory usage
NPE temp INLET
NPE temp OUTLET
Interfaces (IN, OUT)
BGP peer updates (IN, OUT)
... and would like to add COPP/ACL stats and NetFlow summary.
NB data src here is a PHP script - luckily the real temp values are pretty static!
A few cosmetic bugs I'm still stuck on:
• The white space plotted on category transitions
• The background colours for NaN data [UPDATE - now fixed! ]
I'm at a loss on the white lines, but still tinkering with the background STACK CDEF's to fix the NAN values. Suggestions welcome!
This particular chassis (Cisco 7200) happens to be an ISP transit router on our network edge. Be keen to get suggestions for a new host template. So far I've got:
CPU usage (5m, 1m, 5s)
Memory usage
NPE temp INLET
NPE temp OUTLET
Interfaces (IN, OUT)
BGP peer updates (IN, OUT)
... and would like to add COPP/ACL stats and NetFlow summary.
The backgrounds are built using almost transparent STACK items using CDEF's to determine if their height is 0, threshold value, or (threshold - data).
To handle NAN data was a challenge - RPN is really simple and yet totally brain-bending at the same time.
Here's what the graph template spits out to RRD:
I like the idea of graphs that quickly highlight thresholds (say interfaces hitting 75% usage, etc). The coloured backgrounds just give an indication of where the thresholds lie.
Still looking some pointers on getting rid of those vertical white lines - not sure where to even start on that.
Code: Select all
CDEF:cdefa=a,44,LT,a,0,IF \
CDEF:cdefb=a,UN,0,a,IF,44,LT,44,a,UN,0,a,IF,-,0,IF \
CDEF:cdefd=a,44,58,LIMIT \
CDEF:cdefh=a,59,LT,a,44,LT,15,59,a,-,IF,0,IF \
CDEF:cdefi=a,59,GE,a,0,IF \
CDEF:cdefj=a,59,LT,21,80,a,-,IF \
Here's what the graph template spits out to RRD:
Code: Select all
AREA:cdefa#35962BFF:"OK" \
AREA:cdefb#00FF0019:"":STACK \
COMMENT:" \n" \
AREA:cdefd#FF7D00FF:"WARNING":STACK \
GPRINT:a:LAST:" Current\:%8.0lf °C" \
GPRINT:a:AVERAGE:"Average\:%8.0lf °C" \
GPRINT:a:MAX:"Maximum\:%8.0lf °C\n" \
AREA:cdefh#FF7D0033:"":STACK \
AREA:cdefi#FF0000FF:"CRITICAL\n":STACK \
AREA:cdefj#FF000019:"":STACK \
LINE1:a#000000FF:""
I like the idea of graphs that quickly highlight thresholds (say interfaces hitting 75% usage, etc). The coloured backgrounds just give an indication of where the thresholds lie.
Still looking some pointers on getting rid of those vertical white lines - not sure where to even start on that.
I think the problem with the gap can be resolved by narrowing the difference between the 2 temperatures.
Intead of your
0 - 44, 45 - 59 , 60 - *
Use:
0 - 44.99 , 45 - 59.99 , 60 - *
You get the idea.. share ur nice graphs please
Intead of your
0 - 44, 45 - 59 , 60 - *
Use:
0 - 44.99 , 45 - 59.99 , 60 - *
You get the idea.. share ur nice graphs please
[url=http://forums.cacti.net/viewtopic.php?t=4356]Template: Cisco CatOS[/url]
[url=http://forums.cacti.net/viewtopic.php?t=21785]Mactrack: Netscreen Fw[/url]
[b]_______________[/b]
[b]Cacti Version[/b] - 0.8.7e, [b]Plugin Architecture[/b] - 2.5, [b]Poller Type[/b] - Cact-Spine 0.8.7e
[b]Server Info[/b] - Ubuntu Server 8.10 (2.6.27-7-server), [b]Web Server[/b] - Apache/2.2.9 PHP/5.2.6-2ubuntu4.3 with Suhosin-Patch
[b]PHP[/b] - 5.2.6-2ubuntu4.3, [b]MySQL[/b] - 5.0.67-0ubuntu6-log, [b]RRDTool[/b] - 1.3.1, [b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Thresholds v0.4.1, Login Mod v1.0, Host Info v0.2
[url=http://forums.cacti.net/viewtopic.php?t=21785]Mactrack: Netscreen Fw[/url]
[b]_______________[/b]
[b]Cacti Version[/b] - 0.8.7e, [b]Plugin Architecture[/b] - 2.5, [b]Poller Type[/b] - Cact-Spine 0.8.7e
[b]Server Info[/b] - Ubuntu Server 8.10 (2.6.27-7-server), [b]Web Server[/b] - Apache/2.2.9 PHP/5.2.6-2ubuntu4.3 with Suhosin-Patch
[b]PHP[/b] - 5.2.6-2ubuntu4.3, [b]MySQL[/b] - 5.0.67-0ubuntu6-log, [b]RRDTool[/b] - 1.3.1, [b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Thresholds v0.4.1, Login Mod v1.0, Host Info v0.2
Re: Varying the AREA colour ?
Hello, as a 100% beginner and noob with cacti, i want to copy the design of this graph but, i'm not able to do it and i don't know why. The graphic will be an analyse of a CPU usage with 2 "floors" (one at 55%, one at 80%)
i'm quite sure i copied well le CDEF :
i record the 6 ones like this (exemple of the second) :
i copy in the UI, the closest i can, the lines :
And Finally, nothing appears when i saw the graph... & i really don't know why...
Can someone be able to help me with this ? or maybe just have an idea about this
Sincerely,
i'm quite sure i copied well le CDEF :
i record the 6 ones like this (exemple of the second) :
i copy in the UI, the closest i can, the lines :
And Finally, nothing appears when i saw the graph... & i really don't know why...
Can someone be able to help me with this ? or maybe just have an idea about this
Sincerely,
Re: Varying the AREA colour ?
I'm at a loss on the white lines, but still tinkering with the background STACK CDEF's to fix the NAN values.
Re: Varying the AREA colour ?
Hello,
I am sorry but my limited skills in english and my limited (close to null) knowledges with cacti do not allow me to understand your sentence... is it possible to reformulate ?
What is a NAN values ? "Not a number" ?
What is the meaning of "I'm at a loss on the white lines" ?
And i can't see the images you post ...
Sincerly,
I am sorry but my limited skills in english and my limited (close to null) knowledges with cacti do not allow me to understand your sentence... is it possible to reformulate ?
What is a NAN values ? "Not a number" ?
What is the meaning of "I'm at a loss on the white lines" ?
And i can't see the images you post ...
Sincerly,
Re: Varying the AREA colour ?
Problem close to be solve
- datatechuk
- Posts: 14
- Joined: Wed Oct 10, 2007 4:16 am
Re: Varying the AREA colour ?
I know this is an old post, but did anyone ever get this working?
I have just tried it and can't get any graphs to appear when trying to apply the CDEF's against the colours.
It looks so cool and we would like to use it for our support staff to identify issues easier and at a glance of the projectors in our NOC.
I have just tried it and can't get any graphs to appear when trying to apply the CDEF's against the colours.
It looks so cool and we would like to use it for our support staff to identify issues easier and at a glance of the projectors in our NOC.
Many Thanks
Marc
Datatech
Marc
Datatech
Who is online
Users browsing this forum: No registered users and 1 guest