RobustPerception/azure_metrics_exporter

Create a config map

Closed this issue · 0 comments

How can I use a configmap with a Kubernetes deployment when I use https://hub.docker.com/r/robustperception/azure_metrics_exporter image as the deployment?
Below code is not working.

apiVersion: v1
kind: ConfigMap
metadata:
  name: az-exporter
data:
  active_directory_authority_url: "https://login.microsoftonline.com/"
  resource_manager_url: "https://management.azure.com/"
  credentials:
    subscription_id: ""
    client_id: ""
    client_secret: ""
    tenant_id: ""

  targets:
    - resource: "azure_resource_id"
      metrics:
      - name: "BytesReceived"
      - name: "BytesSent"
    - resource: "azure_resource_id"
      aggregations:
      - Minimum
      - Maximum
      - Average
      metrics:
      - name: "Http2xx"
      - name: "Http5xx"
    - resource: "azure_resource_id"
      metric_namespace: "Azure.VM.Windows.GuestMetrics"
      metrics:
      - name: 'Process\Thread Count'

  resource_groups:
    - resource_group: "webapps"
      resource_types:
      - "Microsoft.Compute/virtualMachines"
      resource_name_include_re:
      - "testvm.*"
      resource_name_exclude_re:
      - "testvm12"
      metrics:
      - name: "CPU Credits Consumed"

  resource_tags:
    - resource_tag_name: "group"
      resource_tag_value: "tomonitor"
      resource_types:
        - "Microsoft.Compute/virtualMachines"
      metrics:
        - name: "CPU Credits Consumed"