Elasticsearch datasource provisioning just...fails

Hello Everyone,

I have recently just started using elasticsearch with grafana and when I manually provision a datasource…it works just fine.

I duplicated all of the settings from the UI in my datasource yaml, however, it seems to not want to work. The connetion fails each time (see screenshot).

apiVersion: 1                                                                                                                                                                                                                                                                                                         datasources:                                                                                                                                                 - name: Elasticsearch                                                                                                                                        type: elasticsearch                                                                                                                                        access: proxy                                                                                                                                              basicAuth: true                                                                                                                                            basicAuthUser: elastic                                                                                                                                     url: https://elasticsearch:9200                                                                                                                            secureJsonData:                                                                                                                                              basicAuthPassword: changeme                                                                                                                              jsonData:                                                                                                                                                    index: '[metrics-]YYYY.MM.DD'                                                                                                                              interval: Daily                                                                                                                                            timeField: '@timestamp'                                                                                                                                    tlsSkipVerify: true

We are using TLS as the elasticseach instance will reside on another host.

Not sure where I went wrong, but if anyone has any insight please let me know :slight_smile:

Thanks a bunch in advance!

Best Regards,

Chris W.

Please follow instruction and check your server logs first to see what’s a problem.

Also I’m missing how yaml (which creates broken datasource) and working datasource looks like, grafana version,… (all details to have reproducible example).

Check this out

Thank you, I have seen the documentation. I am going to add it manually for now, it seems to work fine.

1 Like