Using Grafana to display graph

Big thanks to the team for creating an awesome product!  Here is a tip on how to use Grafana/Graphite to create nice graphs based on stor2rrd rrd files. 

From http://graphite.readthedocs.io/en/latest/tools.html: ;
"Graphite can also read directly from collectd‘s RRD files. RRD files can simply be added to STORAGE_DIR/rrd (as long as directory names and files do not contain any . characters). For example, collectd’s host.name/load/load.rrd can be symlinked to rrd/collectd/host_name/load/load.rrd to graph collectd.host_name.load.load.{short,mid,long}term."

So, what you need is to install grafana and graphite first, then link /var/lib/graphite/rrd to /home/stor2rrd/stor2rrd/data and voila, you will be able to show your stor2rrd data on screen with nice grafana graphs :) 

I am running Grafana/Graphite on a separate server from stor2rrd, so I use sshfs to link like this on the grafana server: 
sshfs -o allow_other user@stor2rrd.server:/home/stor2rrd/stor2rrd/data /var/lib/graphite/rrd

Performance graphs with data from stor2rrd: 


Screen with Grafana playlist playing through selected dashboards :)   Powered by rasberry pi! 

Comments

  • Hello,

    I tried to do the same with lpar2rrd (i know it's a stor2rrd post)  but it is not working.

    i installed these (on a CentOS) :

    graphite-web-0.9.16-2.el7.noarch 
    mod_wsgi-3.4-12.el7_0.x86_64
    python-simplejson-3.5.3-2.el7.centos.x86_64
    python-whisper-0.9.16-1.el7.noarch
    python-django-tagging-0.3.1-11.el7.noarch
    python-django-1.6.11.6-1.el7.noarch
    python-django-bash-completion-1.6.11.6-1.el7.noarch

    fuse-sshfs-2.5-1.el7.x86_64

    I changed in /etc/graphite-web/local_settings.py the path to RRD Files (RRD_DIR = '/var/lib/graphite/rrd'
    ) and  use sshfs as you said.

    Someone has any clue ?


  • Hello,
    LPAR2RRD uses file extensions other than *.RRD (*.mmm, *.rrm, *.rsm, ...)
    so Graphite does not find them
    as an option, you can create individual links for each RRD-file (which you need) with the correct extension
    for example
    @cpu.rrd->cpu.mmm
    @mem.rrd->mem.mmm
    But can someone found an easier way?



  • I guess there is a problem if lpar2rrd/stor2rrd and Graphite/Grafana are running on different OS/Architectures ?

    RRD files created in Linux cannot be read with AIX and vice versa.

    Doesn't Graphite/Grafana have the same issue if its running on different architecture than where the RRD files were created ?

    Does anybody have experience with this ?

    I have lpar2rrd and stor2rrd on AIX and try to find a way to use these RRD files in Grafana.

  • can someone give me a step by step doc how to implement Graphana for Linux.  


  • Hello Guys,
    I'm searching implementation grafana for stor2rrd. Do any has step by step implemented this tool and has instruction?

    Regards,
    Dariusz
  • Hi,

    it is not officially provided or supported by us.
  • Hi,
    Sure, but i hope Mr/Ms Veguardian have some instruction :)

    Regards,
  • edited February 2019
    Hello Veguardian,
    Thank's for this topic, i did well all setps, graphite & grafana can see all rrd directories from stor2rrd, so didn't have any charts. 

    Could you help ? 

    Best Regards.
    Olivier
  • Hi all,
    similar issue here. Instead of sshfs I did a mount of an nfs share to the stor2rrd server data path, containing the rrd files.
    Graphite browser show the metrics folder with the mount, but no data.
    Any ideas?
    kind regards,
    Kris
  • Hi all,

    I created the symlink /var/lib/graphite/rrd to /home/stor2rrd/stor2rrd/data but it does not work. Grafana still ask for to add data source. 

    Any idea of what I am doing wrong?  I suspect it may be related to the version of Grafana/Graphite I use as the suggested solution goes back to 2017.  My version of Grafana is 6.6.

    Thanks
  • I managed to get this working a while ago but when I had to rebuild my stor2rrd server I forgot how this worked and had to do it all over again. This is actually much more involved then the original post makes it out to be. I am using centos 7 so I can only comment on how it works on that distro.

     So here goes:

    Use this link to setup graphite and carbon-cache:
    https://www.vultr.com/docs/how-to-install-and-configure-graphite-on-centos-7

    Then in /var/lib/carbon/rrd , create a symlink to your stor2rrd data directory, e.g
    lrwxrwxrwx 1 root root 19 Jan 17 13:18 stor2rrd -> /opt/stor2rrd/data/

    Then go to http://<your ip>:80

    It should now open graphite web GUI and if you expand the metrics graph you should now see stor2rrd and under each one, you will see the corresponding graphs.

    Now open grafana and set up a new data source of type graphite (install the plugin if you don't already have it).

    Point to your IP: port and click verify. If all was done correctly, you should now be able to add stor2rrd queries.

    Caveats: Don't expect to have fine control and granularity of data that you get from using Influxdb/SQL data sources.

    However, you will still get to be able to get your graphs out and present them nicely in grafana.

    Happy Grafing 
  • I am using the Xorux apliance, with everything included. On the apliance machine, I was able to install Graphite, I pointed the RRD_DIR to the files folder.


    In graphite he created the structure with the folders of the storages, but I don't have any metric.

    Does anyone have any idea what it might be?
  • Hi Ineves, how did you manage the install Graphite on the xorux vm?
    I can't connect after finishing the installation.
    Do you have any steb by step quide?
    Thanks,
    Tibor
Sign In or Register to comment.