Post

Grafana for Azure

ARM template for adding an VM with a fully automated bootstrap script to create monitoring that automatically connects to Azure monitor (data source) for metrics and allows users easy viewing of key metrics for Azure resources.

Video

Creation Proces:

  1. Create a Resource groups
  2. Create Azure Grafana ARM template
  3. Run the ARM template
  4. Edit Subscription IAM - add Role assignment: Monitor Reade

Resources creation for monitoring:

  • Resource group
  • Virtual network
  • Network Interface
  • Network security group
  • Virtual machine UserData
  • Public IP address
  • Disk

Grafana previsioned Data sources:

  • Azure Monitor for getting metrics on network resources. Credentials will be with User assigned Managed Identity.
  • InfluxDB data source in combination with Telegraf for getting metrics on service UpTime.

Custom dashboard for Azure resources.

Running ARM temp from Azure CLI

  1. Log in to Azure

    1
    
    az login
    
  2. Set the right subscription

    1
    
    az account set --subscription "your subscription id"
    
  3. Create the Resource group

    1
    2
    
    az account list-locations
    az group create --name "resource-group" --location "your location"
    
  4. Deploy the ARM template

    1
    
    az group deployment create --name "name of your deployment" --resource-group "resource-group" --template-file "./azuredeploy.json"
    
  5. In Azure CLI fill in “Linux OS Password” parameter

  • At least 12 characters
  • A mixture of both uppercase and lowercase letters
  • A mixture of letters and numbers
  1. Go to portal.azure.com and add the role assignment “Monitoring Reader” to the Subscription you want to monitor.

  1. Visit GrafanaVM IP address (DNS name) to access the Grafana
  • User: Admin
  • Password: admin
This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.