community.grafana.grafana_annotations (1.8.0) — callback

send ansible events as annotations on charts to grafana over http api.

Authors: Rémi REY (@rrey)

Install collection

Install with ansible-galaxy collection install community.grafana:==1.8.0


Add to requirements.yml

  collections:
    - name: community.grafana
      version: 1.8.0

Description

This callback will report start, failed and stats events to Grafana as annotations (https://grafana.com)


Requirements

Inputs

    
http_agent:
    default: Ansible (grafana_annotations callback)
    description: The HTTP 'User-agent' value to set in HTTP requets.
    env:
    - name: HTTP_AGENT
    ini:
    - key: http_agent
      section: callback_grafana_annotations
    type: string

grafana_url:
    description: Grafana annotations api URL
    env:
    - name: GRAFANA_URL
    ini:
    - key: grafana_url
      section: callback_grafana_annotations
    required: true
    type: string

grafana_user:
    default: ansible
    description: Grafana user used for authentication. Ignored if grafana_api_key is provided.
    env:
    - name: GRAFANA_USER
    ini:
    - key: grafana_user
      section: callback_grafana_annotations
    type: string

validate_certs:
    aliases:
    - validate_grafana_certs
    default: true
    description: validate the SSL certificate of the Grafana server. (For HTTPS url)
    env:
    - name: GRAFANA_VALIDATE_CERT
    ini:
    - key: validate_grafana_certs
      section: callback_grafana_annotations
    - key: validate_certs
      section: callback_grafana_annotations
    type: bool

grafana_api_key:
    description: Grafana API key, allowing to authenticate when posting on the HTTP API.
      If not provided, grafana_login and grafana_password will be required.
    env:
    - name: GRAFANA_API_KEY
    ini:
    - key: grafana_api_key
      section: callback_grafana_annotations
    type: string

grafana_password:
    default: ansible
    description: Grafana password used for authentication. Ignored if grafana_api_key
      is provided.
    env:
    - name: GRAFANA_PASSWORD
    ini:
    - key: grafana_password
      section: callback_grafana_annotations
    type: string

grafana_panel_ids:
    default: []
    description: The grafana panel ids where the annotation shall be created. Give a single
      integer or a comma-separated list of integers.
    elements: integer
    env:
    - name: GRAFANA_PANEL_IDS
    ini:
    - key: grafana_panel_ids
      section: callback_grafana_annotations
    type: list

grafana_dashboard_id:
    description: The grafana dashboard id where the annotation shall be created.
    env:
    - name: GRAFANA_DASHBOARD_ID
    ini:
    - key: grafana_dashboard_id
      section: callback_grafana_annotations
    type: integer