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

Configure datasource via provisioning file #41

Open
hawksight opened this issue Jul 25, 2018 · 2 comments
Open

Configure datasource via provisioning file #41

hawksight opened this issue Jul 25, 2018 · 2 comments

Comments

@hawksight
Copy link

I couldn't see any examples on configuring the plugin via the provisioning method.

So I played around until I got a working example:

datasources:
 - name: alertmanager
   type: camptocamp-prometheus-alertmanager-datasource
   access: proxy
   org_id: 1
   url: http://alertmanager-main.monitoring:9093
   version: 1
   editable: false
   json_data:
     severity_critical: critical
     severity_high: error
     severity_warning: warning
     severity_info: information

In my case I am running Grafana as a pod in K8s talking to prometheus - and now alertmanager. The datasources file is provided on pod startup via a configmap.

Sharing my example incase its useful to anyone else.

Apologies, I wasn't sure how best to make a PR. clone, or just branch on repository.

@fessmage
Copy link

@hawksight i must correct you, becase i spent half-hour trying to work your config, but thanks for example anyway!

  1. Instead json_data: you must type jsonData
  2. Maybe it just in my environment, but for provisioning works, i was forced to create another key - keepCookies under jsonData, like that:
    jsonData:
      keepCookies: "[]"
      severity_critical: "4"
      severity_high: "3"
      severity_warning: "2"
      severity_info: "1"

@Blobonat
Copy link

Since there still seems to be no documentation on this topic, I wanted to provide an update: I am using Grafana v7.5.4 and was able to use the Plugin with the following config:

- name: alertmanager
  type: camptocamp-prometheus-alertmanager-datasource
  access: server
  org_id: 1
  url: http://alertmanager:9093
  version: 1
  jsonData:
    severity_critical: "4"
    severity_high: "3"
    severity_warning: "2"
    severity_info: "1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants