Unable to connet to ElasticSearch Datasource from Grafana

Grafana version : 6.1.2
ElasticSearch version : 6.4.2

I am not able to connect ElasticSearch datasource to grafana dashboard.

When I click Test&Save button,.it just says Testing… and disappears.

Logs :

t=2019-04-10T15:18:02+0800 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/proxy/5/rcms-scpay-hk-ddi-stages-pt/_mapping status=302 remote_addr=10.115.125.47 time_ms=19 size=0 referer=http://10.23.100.28:5000/datasources/edit/5/
t=2019-04-10T15:18:02+0800 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/login status=302 remote_addr=10.115.125.47 time_ms=0 size=24 referer=http://10.23.100.28:5000/datasources/edit/5/

ElasticSearch DB Json :

{
  "_index": "rcms-scpay-hk-ddi-stages-pt",
  "_type": "stages-pt",
  "_id": "M-K5AWoBp1fKJk1Do8BA",
  "_version": 1,
  "_score": null,
  "_source": {
    "application": "eCollection",
    "servicename": "RT DDI",
    "servicedescription": "Real Time Direct Debit Instruction",
    "eventname": "DDI Return",
    "eventheader": "DDI Return",
    "eventdetail": "Debit request failed for the DDI",
    "eventstatuscode": "D11",
    "transactionstatus": "DDI Return",
    "processingstatus": "NA",
    "responsetochannel": "Y",
    "statustochannel": "Rejected",
    "paymentidentifier": "1947b1c4-2351-43b3-9344-8b7fbdfce953",
    "messageidentifier": "",
    "timestamp": 1554807104000
  },
  "fields": {
    "timestamp": [
      "2019-04-09T10:51:44.000Z"
    ]
  },
  "sort": [
    1554807104000
  ]
}

Does it work if you change Access=Browser? If so, you have an issue where Grafana backend/server can’t access your Elasticsearch instance.

No it does not work with Access=Browser as well.

And when I make Access=Browser.,logs are also not generated.

I have tried Influx and Postgres before. After the successful datasource connection it used to show a success message.

But with elasticSearch when i click save and test datasource.,it just shows Testing… and disappears…

Hi @mefraimsson , I managed to connect the elastic search datasource. I was trying a wrong port.

Thank you

1 Like