From mediawiki.org
MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
Release status: unmaintained
Grafana Screenshot.png
Implementation Tag
Description Add Grafana panels to MediaWiki pages
Author(s) Felipe Muñoz Brieva (felipe@delegacionprovincial.com)
MediaWiki Tested on 1.24, 1.25
License GNU General Public License 2.0 or later
Download Download
Check extension
GitHub mediawiki-grafana

Check usage and version matrix.

Grafana creates beautiful metrics & analitics dashboards.


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[edit]


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


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

<Grafana showheader=no urlgrafana=http://grafana_server_url dashboard="Dashboard name" panelposition=1>Grafana panel</Grafana>

Tag attributes[edit]

The following arguments (tag attributes) can be used to control <Grafana> tags:


showheader (yes/no)
Show a title for the panel and an icon to link Grafana server.
Grafana url (Extension will check if it's a correct Grafana site)
Name of the dashboard in Grafana Server
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)


Include params for templates, we need to add an argument with the prefix "var-"
and templateparamname. For example to add var $macrolan:
Panel width
Panel height
Grafana theme (dark, light, etc.)


<Grafana showheader=no width=450 height=200 theme=light urlgrafana=http://yourgrafanaserver.com dashboard="Macrolan" panelposition=2 var-macrolan=macrolan_line>Grafana panel</Grafana>

Screenshots (Examples)[edit]

  • Grafana tag with argument showheader=yes

Grafana Screenshot header.png

  • Grafana tag with argument showheader=no theme=light:

Grafana Screenshot light.png

  • Grafana tag with argument showheader=no:
Grafana Screenshot.png

Notes about authentication[edit]

(See Grafana configuration site)

For a better experience with Grafana extension you need to enable anonymous access in $GRAFANA_WORKING_DIR/conf/defaults.ini

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[edit]

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


This extension works with the following software:




Initial release