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

Note

This plugin is part of the community.grafana collection (version 1.1.0).

To install it use: ansible-galaxy collection install community.grafana.

To use it in a playbook, specify: community.grafana.grafana_annotations.

Synopsis

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

Requirements

The below requirements are needed on the local controller node that executes this callback.

  • whitelisting in configuration

Parameters

Parameter Choices/Defaults Configuration Comments
grafana_api_key
string
ini entries:

[callback_grafana_annotations]
grafana_api_key = None

env:GRAFANA_API_KEY
Grafana API key, allowing to authenticate when posting on the HTTP API. If not provided, grafana_login and grafana_password will be required.
grafana_dashboard_id
integer
ini entries:

[callback_grafana_annotations]
grafana_dashboard_id = None

env:GRAFANA_DASHBOARD_ID
The grafana dashboard id where the annotation shall be created.
grafana_panel_ids
list / elements=string
Default:
[]
ini entries:

[callback_grafana_annotations]
grafana_panel_ids = []

env:GRAFANA_PANEL_IDS
The grafana panel ids where the annotation shall be created. Give a single integer or a comma-separated list of integers.
grafana_password
string
Default:
"ansible"
ini entries:

[callback_grafana_annotations]
grafana_password = ansible

env:GRAFANA_PASSWORD
Grafana password used for authentication. Ignored if grafana_api_key is provided.
grafana_url
string / required
ini entries:

[callback_grafana_annotations]
grafana_url = None

env:GRAFANA_URL
Grafana annotations api URL
grafana_user
string
Default:
"ansible"
ini entries:

[callback_grafana_annotations]
grafana_user = ansible

env:GRAFANA_USER
Grafana user used for authentication. Ignored if grafana_api_key is provided.
http_agent
string
Default:
"Ansible (grafana_annotations callback)"
ini entries:

[callback_grafana_annotations]
http_agent = Ansible (grafana_annotations callback)

env:HTTP_AGENT
The HTTP 'User-agent' value to set in HTTP requets.
validate_certs
boolean
    Choices:
  • no
  • yes ←
ini entries:

[callback_grafana_annotations]
validate_grafana_certs = yes

[callback_grafana_annotations]
validate_certs = yes

env:GRAFANA_VALIDATE_CERT
validate the SSL certificate of the Grafana server. (For HTTPS url)

aliases: validate_grafana_certs

Authors

  • Rémi REY (@rrey)