DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:rrdgraph

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:rrdgraph [2019-01-12 12:27] Flash Systemsplugin:rrdgraph [2023-04-26 20:07] (current) – screenshot Aleksandr
Line 7: Line 7:
 type       : syntax, action, helper, render type       : syntax, action, helper, render
 lastupdate : 2019-01-12 lastupdate : 2019-01-12
-compatible : Detritus, Elenor Of Tsort, Frusterick Manners, Greebo+compatible : Detritus, Elenor Of Tsort, Frusterick Manners, Greebo 
-screenshot_img : http://www.flashsystems.de/wp-content/uploads/rrdgraph.png +tags       : images, graph
-tags       : rrd, rrdtool, images, graphs+
  
 downloadurl: https://github.com/FlashSystems/rrdgraph/archive/r7.zip downloadurl: https://github.com/FlashSystems/rrdgraph/archive/r7.zip
-bugtracker : https://github.com/FlashSystems/rrdgraph/issues+bugtracker : 
 sourcerepo : https://github.com/FlashSystems/rrdgraph sourcerepo : https://github.com/FlashSystems/rrdgraph
 +
 +screenshot_img : https://trello.com/1/cards/64496805e09cd15dd92ec094/attachments/644968367c629bac84d5fc15/download/dokuwiki-plugin-rrdgraph.png
 ---- ----
 +
 +:!: **This Plugin is no longer maintained. If you want to take over maintaining it go ahead and contact me.** :!:
  
 ===== Installation ===== ===== Installation =====
-:!: **Important Warning:** The RRDgraph plugin uses the cache to store the generated images and the recipes. Please make sure you have a [[https://www.dokuwiki.org/tips:maintenance|maintenance task]] in place to avoid filling your DokuWiki cache directory with useless junk!+ 
 +:!: **Important Warning:** The RRDgraph plugin uses the cache to store the generated images and the recipes. Please make sure you have a [[tips:maintenance|maintenance task]] in place to avoid filling your DokuWiki cache directory with useless junk!
  
 Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ==== Prerequisites ==== ==== Prerequisites ====
 +
 To use this plugin your PHP installation must have been compiled with __GD support__ and the __rrd extension__ must be installed and activated. Regarding GD support also see [[tips:phpwithgd|PHP with GD]] for more information. To use this plugin your PHP installation must have been compiled with __GD support__ and the __rrd extension__ must be installed and activated. Regarding GD support also see [[tips:phpwithgd|PHP with GD]] for more information.
  
Line 27: Line 32:
  
 ===== Introduction ===== ===== Introduction =====
 +
 The RRDtool website says "RRDtool is the OpenSource industry standard, high performance data logging and graphing system for time series data.". From temperatures to cpu untilization everything can be graphed with RRDtool. There are two ways to integrate RRDtool graphs into DokuWiki documents: The RRDtool website says "RRDtool is the OpenSource industry standard, high performance data logging and graphing system for time series data.". From temperatures to cpu untilization everything can be graphed with RRDtool. There are two ways to integrate RRDtool graphs into DokuWiki documents:
  
 ==== Ahead of time generation ==== ==== Ahead of time generation ====
 +
 This is the classical way to embed RRD graphs into DokuWiki pages. The graphs are generated by a cron job and stored as image files. These images are embedded into wiki pages. This is the classical way to embed RRD graphs into DokuWiki pages. The graphs are generated by a cron job and stored as image files. These images are embedded into wiki pages.
  
Line 45: Line 52:
  
 ==== Just in time generation ==== ==== Just in time generation ====
 +
 The instructions and options for generating the RRD graphs are stored withing the DokuWiki documents. The graphs are generated on the fly by a plugin. The instructions and options for generating the RRD graphs are stored withing the DokuWiki documents. The graphs are generated on the fly by a plugin.
  
Line 59: Line 67:
  
 ===== Examples/Usage ===== ===== Examples/Usage =====
 +
 The RRDgraph DokuWiki plugin supplies the necessary infrastructure to implement just in time generation of RRD graphs on DokuWiki pages. The RRDgraph DokuWiki plugin supplies the necessary infrastructure to implement just in time generation of RRD graphs on DokuWiki pages.
  
 ==== Generating graphs ==== ==== Generating graphs ====
 +
 RRDtool gets its drawing instructions via the command line. There are [[http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html|command line options]] and [[http://oss.oetiker.ch/rrdtool/doc/rrdgraph_data.en.html|data]] and [[http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html|graph]] commands. RRDtool gets its drawing instructions via the command line. There are [[http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html|command line options]] and [[http://oss.oetiker.ch/rrdtool/doc/rrdgraph_data.en.html|data]] and [[http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html|graph]] commands.
  
Line 69: Line 79:
  
 ==== Syntax ==== ==== Syntax ====
 +
 The RRDgraph plugin provides the ''<rrd>'' tag for inserting a graph into a DokuWiki page. Everything between the ''<rrd>'' and the ''</rrd>'' tag is called a recipe and is processed by the plugin. Recipes contain options and commands passed to the RRD library. The RRDgraph plugin provides the ''<rrd>'' tag for inserting a graph into a DokuWiki page. Everything between the ''<rrd>'' and the ''</rrd>'' tag is called a recipe and is processed by the plugin. Recipes contain options and commands passed to the RRD library.
  
Line 91: Line 102:
  
 === RRDgraph commands === === RRDgraph commands ===
 +
 RRDgraph extends the RRDtool command set to allow for a consistent syntax. RRDgraph extends the RRDtool command set to allow for a consistent syntax.
  
 == OPT == == OPT ==
 +
 This command defines a command line option. There are two flavours of the ''OPT'' command. The switch and the option flavour. If you look at the RRDtool [[http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html|command line description]] there are command line options that can be passed to RRDtool to alter its behaviour. When using the RRDgraph plugin these options can be set by using the OPT command. This command defines a command line option. There are two flavours of the ''OPT'' command. The switch and the option flavour. If you look at the RRDtool [[http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html|command line description]] there are command line options that can be passed to RRDtool to alter its behaviour. When using the RRDgraph plugin these options can be set by using the OPT command.
  
Line 118: Line 131:
      
 == RANGE == == RANGE ==
 +
 RRDtool needs a time range to draw graphs for. You can define one or more time ranges via the ''RANGE'' command. This command takes three parameters separated by colons: RRDtool needs a time range to draw graphs for. You can define one or more time ranges via the ''RANGE'' command. This command takes three parameters separated by colons:
  
Line 129: Line 143:
  
 == INCLUDE == == INCLUDE ==
 +
 The ''INCLUDE'' command allows the inclusion of templates into the graph. This can be used to share the time range definition between multiple graphs or to define some standard display for different data. The included recipe is inserted at the exact position of the ''INCLUDE'' command. This way you can assign different data sources with the ''DEF'' and ''CDEF'' command and later add a generic graph. The ''INCLUDE'' command allows the inclusion of templates into the graph. This can be used to share the time range definition between multiple graphs or to define some standard display for different data. The included recipe is inserted at the exact position of the ''INCLUDE'' command. This way you can assign different data sources with the ''DEF'' and ''CDEF'' command and later add a generic graph.
  
Line 135: Line 150:
  
 === Using templates === === Using templates ===
 +
 The RRDgraph ''INCLUDE'' command allows the inclusion of a template into a recipe. A template is declared like any other RRDgraph graph: The RRDgraph ''INCLUDE'' command allows the inclusion of a template into a recipe. A template is declared like any other RRDgraph graph:
  
Line 151: Line 167:
  
 === Ganging === === Ganging ===
 +
 Sometimes you have to RRD graphs that show different aspects of a data set. Like CPU load and clock frequency. Wouldn't it be great to switch the time ranges on all graphs simultaneously. This can be accomplished by the ganging checkbox on the right of the tab bar. Just tick all graphs that you want to change and click one of the tabs. All graphs that have the checkbox ticked will automatically switch to that tab. Sometimes you have to RRD graphs that show different aspects of a data set. Like CPU load and clock frequency. Wouldn't it be great to switch the time ranges on all graphs simultaneously. This can be accomplished by the ganging checkbox on the right of the tab bar. Just tick all graphs that you want to change and click one of the tabs. All graphs that have the checkbox ticked will automatically switch to that tab.
  
Line 160: Line 177:
  
 === Conditions === === Conditions ===
 +
 Sometimes you want to hide some lines in longer time ranges because they clutter up the graph. Or you want to show additional information if the graph is clicked and displayed full screen. Conditions can be used to accomplish this. You can prefix any command with a question mark and add a condition. The commands are automatically ignored if the condition is false. A simple RPN parser is available for more complex setups. Sometimes you want to hide some lines in longer time ranges because they clutter up the graph. Or you want to show additional information if the graph is clicked and displayed full screen. Conditions can be used to accomplish this. You can prefix any command with a question mark and add a condition. The commands are automatically ignored if the condition is false. A simple RPN parser is available for more complex setups.
  
Line 194: Line 212:
  
 === Changing the border color === === Changing the border color ===
 +
 RRDgraph sets the color of the graph border to a nice shade of gray. If you want to override this you have to override the options ''999color'' and ''998color''. These default to the following values: RRDgraph sets the color of the graph border to a nice shade of gray. If you want to override this you have to override the options ''999color'' and ''998color''. These default to the following values:
 <code> <code>
Line 207: Line 226:
  
 ==== SVG binding mode ==== ==== SVG binding mode ====
 +
 Sometimes you want a more prominent appearance of your RRD data than just lines on a graph. Maybe the current network utilization should be shown on a real network map or the current temperature outside the building should be displayed in big letters. This can be achieved via the SVG binding mode. It takes a SVG image from the media library and processes it to insert values from the RRD. Sometimes you want a more prominent appearance of your RRD data than just lines on a graph. Maybe the current network utilization should be shown on a real network map or the current temperature outside the building should be displayed in big letters. This can be achieved via the SVG binding mode. It takes a SVG image from the media library and processes it to insert values from the RRD.
  
 === Preparing the SVG file === === Preparing the SVG file ===
 +
 SVG files are XML documents. They contain XML tags specifying what the web-browser should draw on the screen. One tool to easily create SVG files is [[https://inkscape.org/de/|inkscape]]. SVG files are XML documents. They contain XML tags specifying what the web-browser should draw on the screen. One tool to easily create SVG files is [[https://inkscape.org/de/|inkscape]].
  
Line 235: Line 256:
  
 === Binding the data === === Binding the data ===
 +
 Recipes for binding RRD data look almost the same as normal recipes for RRD graphs. The SVG binding mode is enabled by specifying the ''bind'' attribute on the ''rrd'' tag within the dokuwiki file. The ''bind'' attribute must be the wiki path to an SVG file stored by the media manager. The file must be accessible by the user viewing the wiki page. The recipe can use includes, specify options, DEFs and CDEFs. But there are a few major differences: Recipes for binding RRD data look almost the same as normal recipes for RRD graphs. The SVG binding mode is enabled by specifying the ''bind'' attribute on the ''rrd'' tag within the dokuwiki file. The ''bind'' attribute must be the wiki path to an SVG file stored by the media manager. The file must be accessible by the user viewing the wiki page. The recipe can use includes, specify options, DEFs and CDEFs. But there are a few major differences:
  
Line 274: Line 296:
  
 ==== Configuration options ==== ==== Configuration options ====
 +
 This plugin has two configuration options. This plugin has two configuration options.
  
 === RRD image cache timeout === === RRD image cache timeout ===
 +
 The timeout of the internal cache. As long as this time has not elapsed the graph is not generated again and the image from the cache is used. This value is set in seconds. The timeout of the internal cache. As long as this time has not elapsed the graph is not generated again and the image from the cache is used. This value is set in seconds.
  
 === Check ACL for included RRD templates === === Check ACL for included RRD templates ===
 +
 If a template is included by using the ''INCLUDE'' command the ACL of the included DokuWiki page is checked. If the user is not allowed to access the wiki page the graph will not be rendered. If this option is unchecked there is no ACL check for includes. If a template is included by using the ''INCLUDE'' command the ACL of the included DokuWiki page is checked. If the user is not allowed to access the wiki page the graph will not be rendered. If this option is unchecked there is no ACL check for includes.
  
Line 287: Line 312:
  
 === Virtual namespace for RRD graphs === === Virtual namespace for RRD graphs ===
 +
 This sets up the virtual namespace that is used for the generated graphs. This media namespace is not visible within the media manager.  This sets up the virtual namespace that is used for the generated graphs. This media namespace is not visible within the media manager. 
  
Line 294: Line 320:
  
 ===== Change Log ===== ===== Change Log =====
 +
   * **2014-12-10** Release 1   * **2014-12-10** Release 1
     * Initial Release     * Initial Release
Line 315: Line 342:
     * Converted all line endings to LF.     * Converted all line endings to LF.
  
-   +  
 ===== FAQ ===== ===== FAQ =====
 +
 No FAQ yet. No FAQ yet.
plugin/rrdgraph.1547292429.txt.gz · Last modified: 2019-01-12 12:27 by Flash Systems

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki