Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    RRD Graphs Color Mod

    Scheduled Pinned Locked Moved pfSense Packages
    14 Posts 8 Posters 13.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jahidhk
      last edited by

      where do i find this mod??

      1 Reply Last reply Reply Quote 0
      • J
        johnnybe
        last edited by

        @jahidhk:

        where do i find this mod??

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

        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.

        you would not believe the view up here

        1 Reply Last reply Reply Quote 0
        • C
          cyboc
          last edited by

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

          1 Reply Last reply Reply Quote 0
          • M
            mjf246
            last edited by

            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  ;)

            1 Reply Last reply Reply Quote 0
            • D
              dreamslacker
              last edited by

              @mjf246:

              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   ;)

              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.

              1 Reply Last reply Reply Quote 0
              • J
                johnnybe
                last edited by

                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!

                you would not believe the view up here

                1 Reply Last reply Reply Quote 0
                • V
                  Volui
                  last edited by

                  Thanks!!

                  1 Reply Last reply Reply Quote 0
                  • T
                    tommyboy180
                    last edited by

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

                    -Tom Schaefer
                    SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

                    Please support pfBlocker | File Browser | Strikeback

                    1 Reply Last reply Reply Quote 0
                    • C
                      crnet
                      last edited by

                      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:

                      $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)

                      RRDanonymized.jpg
                      RRDanonymized.jpg_thumb

                      1 Reply Last reply Reply Quote 0
                      • J
                        johnnybe
                        last edited by

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

                        
                        $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 */
                        
                        

                        rrd_mem.png
                        rrd_mem.png_thumb
                        rrd_packs.png
                        rrd_packs.png_thumb

                        you would not believe the view up here

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.