Monasca Grafana Datasource
Go to file
Witek Bedyk e076ee51d2 Add CONTRIBUTING.rst
Change-Id: I11d897526c338ab0af4aef1b660f55888571f97a
2020-05-19 16:21:34 +02:00
examples Add OpenStack default dashboard 2017-12-01 10:02:47 +09:00
img Move monasca datasource to new repo 2016-07-27 17:21:19 +00:00
partials Revert "Revert "Add support for monasca-ui metrics API proxy"" 2018-01-16 13:50:33 +01:00
.gitreview OpenDev Migration Patch 2019-04-19 19:28:08 +00:00
CONTRIBUTING.rst Add CONTRIBUTING.rst 2020-05-19 16:21:34 +02:00
datasource.js Support time range to query dimension names/values 2019-07-25 12:31:21 +01:00
LICENSE Move monasca datasource to new repo 2016-07-27 17:21:19 +00:00
module.js Add annotation support for monasca plugin 2016-10-19 10:57:44 -06:00
package.json Support time range to query dimension names/values 2019-07-25 12:31:21 +01:00
plugin.json Support time range to query dimension names/values 2019-07-25 12:31:21 +01:00
query_ctrl.js Updates for new dimensions endpoints 2016-10-06 15:02:40 -06:00
README.rst Convert README.md to ReStructuredTest format 2018-06-19 15:42:46 +02:00

Team and repository tags

image

Monasca Datasource - A datasource for use with the OpenStack Monasca api.

For more information on Monasca see the Monasca documentation

Authentication Options

Horizon Session

The Monasca Horizon plugin offers Horizon integration for Monasca. Among other things this plugin proxies the Monasca metrics API, using the Horizon session for authentication (as opposed to a Keystone token). This proxied API can be used to let this plugin access the Monasca API with the privileges of the user logged in to Horizon.

Note that this is entirely separate from Grafanas user management.

Setting this up requires the following steps:

  1. Install and configure the monasca-ui Horizon plugin. Specifically you will need to set GRAFANA_URL to /grafana and point GRAFANA_LINKS to your dashboards which can either be JSON dashboards you point to or in-database dashboards. In the former case set the links raw attribute to True and their path attribute to the dashboards path or full URL. In the latter case, set the links raw attribute to False (or omit it entirely) and set their path attributes to the database dashboards names.

  2. Enable mod_proxy and mod_proxy_http in Apache:

    a2enmod proxy proxy_http
  3. Configure the VHost hosting your Horizon instance with a proxy path that points at your Grafana instance (the example assumes you are running Horizon on Apache - adapt as required for other web servers):

    ProxyPass "/grafana" "http://my.grafana.server:3000"
    ProxyPassReverse "/grafana" "http://my.grafana.server:3000"
  4. Configure Grafanas [server/root_url] setting to point at your dashboard nodes /grafana path:

    [server]
    root_url = %(protocol)s://%(domain)s/grafana
  5. Configure the plugin as follows:

    • Http settings:
      • Url: http://my.dashboard.server/monitoring/proxy (substitute your dashboards actual host name for my.dashboard.server here)
      • Access: direct
    • Authentication
      • Auth: Horizon

Steps (2) and (3) are neccessary to ensure both Grafana and Horizon are on the same Host/Port from the browsers perspective. Otherwise the browsers XSS protection mechanisms will omit the Horizon session cookie from any requests triggered by the monasca-grafana-datasource plugin.

Keystone Authentication

When combined with Grafana Keystone authentication this datasource supports using login credentials to authenticate queries.

Keystone Token

Without the Grafana Keystone auth, this datasource can be used by inserting a keystone token into the datasource. To get a keystone token download the python-openstackclient, source credentials and run openstack token issue.