Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Thruk as Grafana Datasource #55651

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 15 additions & 2 deletions lib/ansible/modules/monitoring/grafana_datasource.py
Expand Up @@ -35,7 +35,7 @@
description:
- The type of the datasource.
required: true
choices: [ graphite, prometheus, elasticsearch, influxdb, opentsdb, mysql, postgres, cloudwatch, alexanderzobnin-zabbix-datasource]
choices: [ graphite, prometheus, elasticsearch, influxdb, opentsdb, mysql, postgres, cloudwatch, alexanderzobnin-zabbix-datasource, sni-thruk-datasource]
url:
description:
- The URL of the datasource.
Expand Down Expand Up @@ -298,6 +298,18 @@
aws_access_key: "speakFriendAndEnter"
aws_secret_key: "mel10n"
aws_custom_metrics_namespaces: "n1,n2"

- name: grafana - add thruk datasource
grafana_datasource:
name: "datasource-thruk"
grafana_url: "https://grafana.company.com"
grafana_user: "admin"
grafana_password: "xxxxxx"
org_id: "1"
ds_type: "sni-thruk-datasource"
url: "https://thruk.company.com/sitename/thruk"
basic_auth_user: "thruk-user"
basic_auth_password: "******"
'''

RETURN = '''
Expand Down Expand Up @@ -604,7 +616,8 @@ def main():
'mysql',
'postgres',
'cloudwatch',
'alexanderzobnin-zabbix-datasource']),
'alexanderzobnin-zabbix-datasource',
'sni-thruk-datasource']),
url=dict(required=True, type='str', aliases=['ds_url']),
access=dict(default='proxy', choices=['proxy', 'direct']),
grafana_api_key=dict(type='str', no_log=True),
Expand Down