Welcome, Guest. Please login or register.
Did you miss your activation email?
+  pfSense Forum
|-+  pfSense English Support» Packages» RRD Graphs Color Mod
Username:
Password:
 
 

Pages: [1]   Go Down
  Print  
Author Topic: RRD Graphs Color Mod  (Read 6109 times)
0 Members and 1 Guest are viewing this topic.
johnnybe
Hero Member
*****
Online Online

Posts: 1149


I've got... a head with wings


View Profile WWW
« on: May 24, 2009, 08:09:11 pm »

First... Hello to everyone.
I'm just another guy playing around with pfsense 'cause I like it.
Yes, I like it.

And I like graphs. But that RRD Graphs color as it is, by default,
doesn't fit my taste. It's hard to recognize this from that.
Not just me, several other guys have the same feeling.

So, I've changed some colors to RRD Graphs.
Without pretension or ambition, just wanna show you this "mod":
See Attach.

If you guys like it, let me tell. Then I'm going to share the
script.


« Last Edit: May 24, 2009, 08:27:22 pm by johnnybe » Logged

you would not believe the view up here
johnnybe
Hero Member
*****
Online Online

Posts: 1149


I've got... a head with wings


View Profile WWW
« Reply #1 on: May 24, 2009, 08:11:42 pm »


traffic graph

Logged

you would not believe the view up here
johnnybe
Hero Member
*****
Online Online

Posts: 1149


I've got... a head with wings


View Profile WWW
« Reply #2 on: May 24, 2009, 08:14:10 pm »


packets graph

Logged

you would not believe the view up here
johnnybe
Hero Member
*****
Online Online

Posts: 1149


I've got... a head with wings


View Profile WWW
« Reply #3 on: May 24, 2009, 08:18:33 pm »


quality graph

Logged

you would not believe the view up here
jahidhk
Jr. Member
**
Offline Offline

Posts: 27


View Profile
« Reply #4 on: May 27, 2009, 01:30:50 pm »

where do i find this mod??
Logged
johnnybe
Hero Member
*****
Online Online

Posts: 1149


I've got... a head with wings


View Profile WWW
« Reply #5 on: May 27, 2009, 09:36:28 pm »

where do i find this mod??

jahidhk, I can't attach .php or even .txt files to download.  Sad

Didn't notice that before, sorry.
To modify the RRD graphs color follow this steps:

 
1- you need to copy the script above:


/* The RRD graph colors above were previous modified from the original by J. Kemp/Brazil (colors v1.31 2009/05/12) */

$colortrafficup = "ffff00"; /* mod */
$colortrafficdown = "262bfe"; /* mod */
$colorpacketsup = "ffff00"; /* mod */
$colorpacketsdown = "262bfe"; /* mod */
$colorstates = array('c00000','00c000','0000ff','ffff00','808080','000000');  /* mod */
$colorprocessor = array('c00000','00c000','0000ff','ffff00','808080','000000'); /* mod */
$colormemory = array('c00000','00c000','0000ff','ffff00','808080','000000'); /* mod */
$colorqueuesup = array('000000','7B0000','990000','BB0000','CC0000','D90000','EE0000','FF0000','CC0000');
$colorqueuesdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC');
$colorqueuesdropup = array('000000','7B0000','990000','BB0000','CC0000','D90000','EE0000','FF0000','CC0000');
$colorqueuesdropdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC');
$colorqualityrtt = array('ffff00','00ff00','008080','0000ff','d0d0d0','808080'); /* mod */
$colorqualityloss = "ee0000";
$colorwireless = array('c00000','00c000','0000ff'); /* mod */
$colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066');
$colorspamdconn = array('00AA00BB', 'FFFFFFFF', '00660088', 'FFFFFF88', '006600');

?>


2- Save it as rrdcolors.inc.php.mod131 (or anything you like).

3- On pfsense shell go to /usr/local/www/themes/nervecenter
(or the themes/name of your taste), rename rrdcolors.inc.php to anything (i.e - rrdcolors.inc.php.original).

4- Edit the renamed file. Scroll to the end of file and you'll see something like this:

/* This file is included by the RRD graphing page and sets the colors */

$colortrafficup = "666666";
$colortrafficdown = "990000";
$colorpacketsup = "666666";
$colorpacketsdown = "990000";
$colorstates = array('990000','a83c3c','b36666','bd9090','cccccc','000000');
$colorprocessor = array('990000','a83c3c','b36666','bd9090','cccccc','000000');
$colorqueuesup = array('000000','7B0000','990000','BB0000','CC0000','D90000','EE0000','FF0000','CC0000');
$colorqueuesdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC');
$colorqueuesdropup = array('000000','7B0000','990000','BB0000','CC0000','D90000','EE0000','FF0000','CC0000');
$colorqueuesdropdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC');
$colorqualityrtt = array('990000','a83c3c','b36666','bd9090','cccccc','000000');
$colorqualityloss = "ee0000";
$colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066');
$colorspamdconn = array('00AA00BB', 'FFFFFFFF', '00660088', 'FFFFFF88', '006600');

?>

5- Delete anything after this comment line:  /* This file is included by the RRD graphing page and sets the colors */

6- Copy and paste the script there, save as rrdcolors.inc.php, refresh the pfsense browser and you're done.

Thanks for your interest.

NOTE: I didn't changed all graphs colors 'cause I don't use "queues" or "wireless".
Anyway, each line with /* mod */ at the end, was modified by me.

Any help from you guys, to turn it better, are welcome.
« Last Edit: May 27, 2009, 09:51:17 pm by johnnybe » Logged

you would not believe the view up here
cyboc
Full Member
***
Offline Offline

Posts: 119


View Profile WWW
« Reply #6 on: August 13, 2009, 02:45:38 pm »

Nice mod johnnybe!

FYI, I even managed to apply this mod to embedded pfSense running on Alix box by running /etc/rc.conf_mount_rw to make filesystem temporarily writeable, making your changes, then running /etc/rc.conf_mount_ro to set filesystem back to read-only. Now my graphs are much more readable.  Smiley
Logged
mjf246
Newbie
*
Offline Offline

Posts: 1


View Profile
« Reply #7 on: August 24, 2009, 05:56:03 pm »

I try and it's great!!

It would be included in the future Pfsense release this mod.

One thing... teh queues part is not modified... I tried with no luck... could you help me johnnybe

Thanks   Wink
Logged
dreamslacker
Hero Member
*****
Offline Offline

Posts: 717


View Profile
« Reply #8 on: August 25, 2009, 02:05:42 am »

I try and it's great!!

It would be included in the future Pfsense release this mod.

One thing... teh queues part is not modified... I tried with no luck... could you help me johnnybe

Thanks   Wink

Change the colour codes in $colorqueuesup and $colorqueuesdown.
There is no pegging to a particular queue, only as the RRDtool sees it on a first come first serve basis.

The first color code in line is the root, followed by default queue then acks and the rest of the queues.  If you have qwanroot, qwandef, qwanacks and qotheruph only in your traffic shaper, then you need only change the first 4 colour codes (the 6 character hex-code in single-quotes) in queuesup.
Ditto for download queues and queuesdown.

Of course, if you have more queues, then you would change more of the colour codes to match.
Logged
johnnybe
Hero Member
*****
Online Online

Posts: 1149


I've got... a head with wings


View Profile WWW
« Reply #9 on: September 06, 2009, 08:31:56 pm »

From May till now... waiting some reply, for good or bad...

I see you've been working on my suggestion.
For good.

I say to you all: thanks!

Logged

you would not believe the view up here
Volui
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #10 on: April 28, 2010, 08:43:00 am »

Thanks!!
Logged
tommyboy180
Global Moderator
Hero Member
*****
Offline Offline

Posts: 976



View Profile WWW
« Reply #11 on: April 29, 2010, 02:32:08 pm »

Cool. I like. You should create a package that allows you to enter the color for the specific fields.
Logged

-Tom Schaefer
SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM
TomSchaefer.org/pfsense
Please support Countryblock | IP-Blocklist | File Browser | Strikeback Here
crnet
Newbie
*
Offline Offline

Posts: 9


View Profile
« Reply #12 on: June 22, 2010, 07:22:50 am »

That was where I was looking for - I couldn't see anything on the queue-graphs with the default colorset.
Thanks to all - and to share my expieriences:

Code:
$colorqueuesup = array('666666','0000ff','00ff00','ff0000','ff8000','9f00ff','ff00ff','00dfff','ffdf00'); /* mod */
$colorqueuesdown = array('666666','000080','008000','800000','804000','500080','800080','007080','807000'); /* mod */
$colorqueuesdropup = array('666666','0000ff','00ff00','ff0000','ff8000','9f00ff','ff00ff','00dfff','ffdf00');  /* mod */
$colorqueuesdropdown = array('666666','000080','008000','800000','804000','500080','800080','007080','807000'); /* mod */

Makes: (see Picture attached)
Logged
johnnybe
Hero Member
*****
Online Online

Posts: 1149


I've got... a head with wings


View Profile WWW
« Reply #13 on: June 22, 2010, 04:47:50 pm »

Wow! Nice job crnet!
I've been playing around with that script for pfSense v.2 beta3. Here it goes:

Code:
$colortrafficup = array("00c000", "000000");  /* mod */
$colortrafficdown = array("de0202", "000000");  /* mod */
$colorpacketsup = array("00c000", "000000");  /* mod */
$colorpacketsdown = array("de0202", "000000");  /* mod */
$colorstates = array('ece904','757575','0000ff','00c000','de0202');  /* mod */
$colorprocessor = array('ece904','00c000','0000ff','ff0000','808080','000000'); /* mod */
$colormemory = array('c00000','00c000','0000ff','ffff00','808080','000000'); /* mod */


Logged

you would not believe the view up here
Pages: [1]   Go Up
  Print  
 
Jump to:  

 

Page created in 0.038 seconds with 20 queries.