Vonage / Grafana_Status_panel

A panel plugin for Grafana to monitor multiple parameters at once
Other
178 stars 108 forks source link

Elastic: Query Example #80

Open SeriousM opened 6 years ago

SeriousM commented 6 years ago

I'm trying to get the panel running with elastic, but I just started with grafana and have no idea what's wrong.

I always get the error "this.datapoints is undefined".

TypeError: this.datapoints is undefined
Stack trace:
execute/g</a.prototype.isMsResolutionNeeded@http://server.lan:3000/public/app/boot.js:30:9887
a@http://server.lan:3000/public/app/boot.js:30:6824
seriesHandler@http://server.lan:3000/public/plugins/vonage-status-panel/status_ctrl.js?bust=1507128083840:665:20
onDataReceived@http://server.lan:3000/public/plugins/vonage-status-panel/status_ctrl.js?bust=1507128083840:591:21
f.prototype.emit@http://server.lan:3000/public/app/boot.js:74:1709
execute/e</a.prototype.emit@http://server.lan:3000/public/app/boot.js:74:4019
execute/k</b.prototype.handleQueryResult@http://server.lan:3000/public/app/boot.js:73:25553
i@http://server.lan:3000/public/app/boot.js:61:3972
l/<@http://server.lan:3000/public/app/boot.js:61:4394
$eval@http://server.lan:3000/public/app/boot.js:61:11545
$digest@http://server.lan:3000/public/app/boot.js:61:10014
$apply@http://server.lan:3000/public/app/boot.js:61:11830
x/i<@http://server.lan:3000/public/app/boot.js:61:7880
f@http://server.lan:3000/public/app/boot.js:59:22130
pb/k.defer/c<@http://server.lan:3000/public/app/boot.js:59:23593

Thats the settings I'm using:

image

Which has this query:

{"size":0,"query":{"bool":{"filter":[{"range":{"@timestamp":{"gte":"1507108311626","lte":"1507129911626","format":"epoch_millis"}}},{"query_string":{"analyze_wildcard":true,"query":"regionId:(\"8\") AND type:FileRepository"}}]}},"aggs":{"2":{"histogram":{"interval":1000,"field":"@timestamp","min_doc_count":1},"aggs":{}}}}

And this is one of the documents that is queried:

{
  "_index": "heartbeat-2017.40",
  "_type": "server backchannel",
  "_id": "AV7nwzkJAuPdL1LjVnSs",
  "_score": null,
  "_source": {
    "scheme": "http",
    "ip": "192.163.10.15",
    "tcp_connect_rtt": {
      "us": 0
    },
    "monitor": "server backchannel@http://xx.xx.xx.xx:84xx/",
    "type": "server backchannel",
    "http_rtt": {
      "us": 3005
    },
    "url": "http://xx.xx.xx.xx:84xx/",
    "tags": [
      "beats_input_raw_event"
    ],
    "duration": {
      "us": 3005
    },
    "@timestamp": "2017-10-04T14:21:06.412Z",
    "rtt": {
      "us": 3005
    },
    "port": 833,
    "regionId": "800",
    "response": {
      "status": 200
    },
    "beat": {
      "hostname": "xxx",
      "name": "xxx",
      "version": "5.5.2"
    },
    "@version": "1",
    "host": "xxx",
    "up": true
  },
  "fields": {
    "@timestamp": [
      1507126866412
    ]
  },
  "highlight": {
    "regionId": [
      "@kibana-highlighted-field@8@/kibana-highlighted-field@"
    ]
  },
  "sort": [
    1507126866412
  ]
}

Sadly I found no information how to setup the query.

Thank you for the help!