Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Jun 16, 2019 1:51 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Varying the AREA colour ?
PostPosted: Fri Mar 13, 2009 4:08 pm 
Offline

Joined: Fri Mar 13, 2009 2:52 pm
Posts: 3
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:
Image

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:
Image
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.


Top
 Profile  
 
 Post subject: Getting closer ...
PostPosted: Sun Mar 15, 2009 7:23 am 
Offline

Joined: Fri Mar 13, 2009 2:52 pm
Posts: 3
Playing with this a little more, I've almost got there:
Image
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! :D]

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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 15, 2009 3:50 pm 
Offline
Cacti User
User avatar

Joined: Tue Sep 12, 2006 3:06 am
Posts: 116
Whoa... how did you change the color background?! :o

:o :o :o


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 16, 2009 2:53 am 
Offline

Joined: Fri Mar 13, 2009 2:52 pm
Posts: 3
The backgrounds are built using almost transparent STACK items using CDEF's to determine if their height is 0, threshold value, or (threshold - data).

Code:
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 \


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:

Code:
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. :-?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 18, 2009 12:05 pm 
Offline
Cacti User
User avatar

Joined: Tue Sep 12, 2006 3:06 am
Posts: 116
Thanks UTVi Carl,
will experiment ASAP

8)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 06, 2009 9:30 pm 
Offline

Joined: Thu May 22, 2008 2:09 am
Posts: 33
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

_________________
Template: Cisco CatOS
Mactrack: Netscreen Fw
_______________
Cacti Version - 0.8.7e, Plugin Architecture - 2.5, Poller Type - Cact-Spine 0.8.7e
Server Info - Ubuntu Server 8.10 (2.6.27-7-server), Web Server - Apache/2.2.9 PHP/5.2.6-2ubuntu4.3 with Suhosin-Patch
PHP - 5.2.6-2ubuntu4.3, MySQL - 5.0.67-0ubuntu6-log, RRDTool - 1.3.1, SNMP - 5.4.1
Plugins - Thresholds v0.4.1, Login Mod v1.0, Host Info v0.2


Top
 Profile  
 
 Post subject: Re: Varying the AREA colour ?
PostPosted: Fri Jan 18, 2013 9:29 am 
Offline

Joined: Fri Jan 18, 2013 9:06 am
Posts: 4
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) :

Image

i copy in the UI, the closest i can, the lines :

Image
Image

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,


Top
 Profile  
 
 Post subject: Re: Varying the AREA colour ?
PostPosted: Sat Jan 19, 2013 2:37 am 
Offline

Joined: Sat Jan 19, 2013 2:22 am
Posts: 8
I'm at a loss on the white lines, but still tinkering with the background STACK CDEF's to fix the NAN values.
Image
Image
Image
Image
Image


Top
 Profile  
 
 Post subject: Re: Varying the AREA colour ?
PostPosted: Sun Jan 20, 2013 11:48 am 
Offline

Joined: Fri Jan 18, 2013 9:06 am
Posts: 4
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,


Top
 Profile  
 
 Post subject: Re: Varying the AREA colour ?
PostPosted: Thu Jan 24, 2013 8:45 am 
Offline

Joined: Fri Jan 18, 2013 9:06 am
Posts: 4
Problem close to be solve


Top
 Profile  
 
 Post subject: Re: Varying the AREA colour ?
PostPosted: Wed Aug 26, 2015 2:12 pm 
Offline
User avatar

Joined: Wed Oct 10, 2007 4:16 am
Posts: 14
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.

_________________
Many Thanks
Marc
Datatech


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 9 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:  
cron

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