Extension:Grafana

Grafana creates beautiful metrics & analitics dashboards.

Introduction
Usually people spend a lot of time solving trivial problems and a lot of problems can be solved by end users.

If we join a wiki (Mediawiki) for documentation and a tool (Grafana) for creating dashboards with metrics & analytics we obtain a powerful tool. System administrators can create instructions with panels updated in realtime. (Also you can use Nagvis extension to monitor alarms, warnings, etc.)

Check usage

 * Check Grafana extension

Installation

 * 1) Download the extension (tgz) or (zip).
 * 2) Upload Grafana directory to your extensions directory from the root of your MediaWiki installation.
 * 3) Add   to your LocalSettings.php file (near the end).
 * 4) Done

Usage
To insert a Grafana panel add the tag on any page:

Grafana panel

Tag attributes
The following arguments (tag attributes) can be used to control  tags:

Mandatory

 * showheader (yes/no)
 * Show a title for the panel and an icon to link Grafana server.


 * urlgrafana
 * Grafana url (Extension will check if it's a correct Grafana site)


 * dashboard
 * Name of the dashboard in Grafana Server


 * papelposition
 * It's the position of the panel in the dashboard (panelposition=1 it's the first panel in row 1).
 * For example if we have 3 rows (row 1 with 2 panels, row 2 with 1 panel and row 3 with 3 panels)
 * and we want to select panel 2 in row 3:
 * panelposition = 5 -> 2 (panels in row 1) + 1 (panels in row 2) + 2 (panel in row 3)
 * panelposition = 5 -> 2 (panels in row 1) + 1 (panels in row 2) + 2 (panel in row 3)

''

Optional

 * var-templatename
 * Include params for templates, we need to add an argument with the prefix "var-"
 * and templateparamname. For example to add var $macrolan:
 * var-macrolan=template_var_value
 * width
 * Panel width
 * width
 * Panel width


 * height
 * Panel height


 * theme
 * Grafana theme (dark, light, etc.)

Example
Grafana panel

Screenshots (Examples)

 * Grafana tag with argument showheader=yes
 * Grafana tag with argument showheader=no theme=light:
 * Grafana tag with argument showheader=no:

Notes about authentication
(See Grafana configuration site)

For a better experience with Grafana extension you need to enable anonymous access in $GRAFANA_WORKING_DIR/conf/defaults.ini [auth.anonymous] enabled: Set to true to enable anonymous access. Defaults to false org_name: Set the organization name that should be used for anonymous users. If you change your organization name in the Grafana UI this setting needs to be updated to match the new name. org_role: Specify role for anonymous users. Defaults to Viewer, other valid options are Editor and Admin.

Notes about proxy
If your Grafana Server is behind a proxy you need to enable proxy in $MEDIAWIKI_WORKING_DIR/extensions/Grafana/Grafana.php $PROXY_ENABLE       = $YES;                           // $YES/$NO $PROXY_HOST         = "proxy_server";                 // Proxy server address $PROXY_PORT         = "proxy_port";                   // Proxy server port $PROXY_USER         = "user";                         // Username $PROXY_PASS         = "password";                     // Password

Credits
This extension works with the following software:
 * Grafana http://grafana.org

Versions
Download

1.00:
 * Initial release