Provision elasticsearch datastore over ansible

Hi there,

Anybody can advise how to map the configuration properties seen in the Grafana UI to their equivalents in the configuration file over Ansible?

I managed to set up everything except Auth section. Actually I setup only “Basic auth” field by adding “basicAuth: false”. Now I am stuck with setting up the following fields:

  • TLS Client Auth
  • Skip TLS Verify
  • Forward OAuth Identity

I tried with adding “tlsAuth: false” , “tlsAuthWithCACert: false” and “tlsSkipVerify: false” but nothing happens. I also tried with adding the same to jsonData but still no luck…

Thanks in advance.

Cheers,
Dragan

Is there any more documentation about elasticsearch datastore provisioning? Provided documentation doesn’t include all elastic datastore fields.

This is how I resolved this. In order to get these three fields I added the following to my playbook:

isDefault: false

How I figured it out? Well, I created a dashboard manually and then exported it to json with the following command:

mkdir -p data_sources && curl -s "http://grafana.staged-by-discourse.com/api/datasources"  -u admin:password | jq -c -M '.[]'|split -l 1 - data_sources/

Then I edited exported dashboard json file and found out the key and the value I used in my playbook.

Cheers