Mail Report Graphs



  • I, as well as many others it seems, were disappointed in 2.3 when our mailed reports no longer contained useful graphs to view in order to reduce size.  I thought I'd give it a go to try to get something strung together to get some basic graphs back in.  The idea is to use rrdtool to generate graphs and create png images to insert into the email.  If anyone is willing to help me out with this it would be appreciated.  It doesn't seem to be too difficult to do but there are some areas I'm not exactly proficient in.

    Currently, when I attempt to generate a graph it tells me```
    ERROR: the instance of rrdtool has been compiled without graphics

    
    

    cd $BUILD_DIR/rrdtool-1.4.3
    ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
    $MAKE clean
    $MAKE
    $MAKE install

    
    I don't want to go breaking anything but I'd love to get some graphs back into the emails.

  • Rebel Alliance Developer Netgate

    It wasn't to "reduce size" it was to stop it from increasing massively. The dependencies on rrdtool changed massively between versions.

    In theory, you could maybe get away with doing what you're after, but you are much better off letting a proper NMS do your graphing and reports, and let the firewall be a firewall.



  • From what I can recall of I read some months ago, keeping the graphs in would have doubled the size of the package.  I can understand that choice and I'm not looking to create anything in-depth.  For all the things that pfSense can do, there just isn't a good reporting package.  Mail Reports was the closest we have.  It's very helpful with all the boxes we have out there to have them send reports that we or the owners can skim and through and make sure everything is OK with all of our clients.

    From the install instructions, it needs 10 packages as dependencies.  8 of which I think are already installed:
    pkgconfig
    zlib
    freetype
    libxml2
    fontconfig
    pixman
    glib
    libpng

    And 2 which aren't:
    Cairo (install shows 701K in size)
    Pango (isn't available via pkg from what I can tell but is about a 5MB download)

    I don't know if some of these were installed by other packages that I've since installed but it seems most of the dependencies are already there, at least on my box.  I'm not very experienced with the package manager.  Is there some way to tell it to recompile?

    
    pkg install /var/cache/pkg/rrdtool-1.6.0_1.txz
    Updating pfSense-core repository catalogue...
    pfSense-core repository is up-to-date.
    Updating pfSense repository catalogue...
    pfSense repository is up-to-date.
    All repositories are up-to-date.
    Checking integrity... done (0 conflicting)
    The following 1 package(s) will be affected (of 0 checked):
    
    Installed packages to be REINSTALLED:
            rrdtool-1.6.0_1 [unknown-repository]
    
    Number of packages to be reinstalled: 1
    
    Proceed with this action? [y/N]: y
    pkg: archive_read_open_filename((null)): Failed to open '(null)'
    

    It doesn't seem to just run via pkg so downloaded source and tried to compile:

    
    ./configure
    checking build system type... x86_64-unknown-freebsd10.3
    checking host system type... x86_64-unknown-freebsd10.3
    checking target system type... x86_64-unknown-freebsd10.3
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... configure: error: in `/tmp/rrdtool-1.6.0':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details
    
    

    No Go on that as well.  Anyone have any ideas?


  • LAYER 8 Global Moderator

    What do you mean pango is not available as package?  Sure looks like it to me

    http://pkg.freebsd.org/freebsd:10:x86:64/latest/All/pango-1.38.0_1.txz

    pfsense is designed to be a firewall/router - it does not have the development tools installed, nor should they be.  If you need to compile something for use with pfsense.  Fireup a copy of freebsd compile what you need and move to pfsense.

    But you can for sure install packages from the freebsd repository directly.. But this is not really a supported or encouraged feature - and no saying what you could do to the security or operability of pfsense when doing such a thing.  That being said I do have a few packages from the freebsd installed.  And depending on what they are they have added packages to the pfsense repository that make sense.



  • This is why I said that about Pango:

    /root: pkg install pango
    Updating pfSense-core repository catalogue...
    pfSense-core repository is up-to-date.
    Updating pfSense repository catalogue...
    pfSense repository is up-to-date.
    All repositories are up-to-date.
    Updating database digests format: 100%
    pkg: No packages available to install matching 'pango' have been found in the repositories
    

    "pkg search pango" doesn't provide any results.

    Are Pango and Cairo development tools?  I thought they were just rendering packages for displaying text and graphs.  Or are you talking about GCC, etc?  I'll be honest, I'm not familiar with the whole compiling from source bit.  I installed gcc since that is what was being asked before but what I know how to do I've already done.  And then, even if I do get Pango installed, how do I go about recompiling for graphics?  Or does that need to be done on the other BSD box as well?

    I just look and see other higher-end routers like sophos and simplewan with all their charts and graphs and slick reports being emailed and think we could have the same thing.  We have a framework.  We have the data.  What's stopping me from trying to help and get it going?  I'd love to have a graph showing jitter and skew for my VOIP clients or a series of utilization graphs for clients on metered connections.  Maybe graphs that show the number of blocks provided by the IPS/IDS client or pages blocked by content filtering.  I've used the graphs in the reports a few times to show an ISP that we aren't using the data they claim we are or that we still see communication with the Gateway.  With the new version I send cropped screenshots.

    We somewhat had that before with the previous version of RRD but since these don't exist for pfSense now, I thought I'd take a stab at putting something together that others may be able to help with.  It's been fairly successful in the past with other OSS projects but this is the first time I've had to put together the tools for me to build with and so I'm a bit out of my wheelhouse.



  • In the mean time, what NMS package would read the RRD data?  Most everything I see monitors via SNMP.  We use PRTG which grabs SNMP information but since the routers already log the info I'd rather just read them for continuity and accuracy.


Log in to reply