petalmd / grafana-azure-datasource

Azure plus data source for Grafana

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Grafana Azure Plus Datasource

Build & Publish

Grafana Azure plus datasource plugin provides additional azure capabilities to grafana. For examples and screenshots, refer here.

Features

  • Azure Resource Graph
  • Azure Cost Analysis
  • Azure Service Health

Azure Cost Analysis

image

Azure Resource Graph

image

Installation

There are multiple ways to install this plugin

Download and extract zip file

Download the zip file from github and extract into your grafana plugin folder. Then restart Grafana.

Using grafana-cli

If you are using grafana-cli, execute the following command to install the plugin

grafana-cli --pluginUrl https://github.com/petalmd/grafana-azure-datasource/archive/master.zip plugins install petalmd-azure-datasource

Using helm chart

If you use help chart to provision grafana, use the following config to install the plugin

plugins:
  - https://github.com/petalmd/grafana-azure-datasource/archive/master.zip;petalmd-azure-datasource

Configuration

Configuration of the plugin requires Tenant ID, Client ID and Client Secret.

Provisioning via file

If you want to use the grafana provisioning feature, use the following yaml

apiVersion: 1

datasources:
- name: <Datasource Name>
  type: petalmd-azure-datasource
  access: proxy
  isDefault: false
  jsonData:
       cloudName: azuremonitor
       clientId: <Azure SPN ID>
       tenantId: <Azure Tenant ID>
  secureJsonData:
       clientSecret: <Azure SPN Secret>
  version: 1
  readOnly: false

Azure Permissions / Roles

The client which connects to azure should have the following permissions.

In case, if you are using the cost analysis services alone, provide only the following roles to the client

Dashboards Included

For convenience, following sample dashboards are included in the plugin

  • Azure Cost - By Subscription

If you want to share your dashboards to the community, Create a pull request with the dashboard json.

Template Variables

Following template variable queries are supported

  • Subscriptions()
  • ResourceGraph(YOUR RESOURCE GRAPH QUERY GOES HERE)

If the Resource graph query return two column, first column will be considered as display value and the second column will be considered as actual value.

Sample template variable queries are given here.

About

Azure plus data source for Grafana

License:Apache License 2.0


Languages

Language:TypeScript 99.9%Language:JavaScript 0.1%