# Kibana Metrics – 500 Internal Server Error

**URL:** https://discuss.elastic.co/t/kibana-metrics-500-internal-server-error/238260
**Category:** Kibana
**Created:** [June 23, 2020, 12:46pm UTC](https://discuss.elastic.co/t/kibana-metrics-500-internal-server-error/238260 "2020-06-23T12:46:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tvander](https://avatars.discourse-cdn.com/v4/letter/t/d6d6ee/32.png) [@tvander](https://discuss.elastic.co/u/tvander)
#### Post date: [June 23, 2020, 12:46pm UTC](https://discuss.elastic.co/t/kibana-metrics-500-internal-server-error/238260/1 "2020-06-23T12:46:07Z")

</div>

When i'm trying to access to the metrics page ([https://kibana-elk.pxdtools.io:5601/app/metrics](https://kibana-elk.pxdtools.io:5601/app/metrics)) on Kibana i have an error 500 showing on the right bottom corner, and i can't use this page, i've got the "There is no data to display." message.

I changed the log to verbose on kibana config but i dont have many information, i only have these two logs:

```auto
{ 
"type": "error", 
"@timestamp": "2020-06-22T12:46:03Z", 
"tags": [], 
"pid": 3685, 
"level": "error", 
"error": { 
"message": "Internal Server Error", 
"name": "Error", 
"stack": "Error: Internal Server Error\n at HapiResponseAdapter.toError (/usr/share/kibana/src/core/server/http/router/response_adapter.js:132:19)\n at HapiResponseAdapter.toHapiResponse (/usr/share/kibana/src/core/server/http/router/response_adapter.js:86:19)\n at HapiResponseAdapter.handle (/usr/share/kibana/src/core/server/http/router/response_adapter.js:81:17)\n at Router.handle (/usr/share/kibana/src/core/server/http/router/router.js:160:34)\n at process._tickCallback (internal/process/next_tick.js:68:7)" 
}, 
"url": { 
"protocol": null, 
"slashes": null, 
"auth": null, 
"host": null, 
"port": null, 
"hostname": null, 
"hash": null, 
"search": null, 
"query": {}, 
"pathname": "/api/metrics/snapshot", 
"path": "/api/metrics/snapshot", 
"href": "/api/metrics/snapshot" 
}, 
"message": "Internal Server Error" 
} 

```

```auto
{ 
"type": "response", 
"@timestamp": "2020-06-22T12:18:19Z", 
"tags": [ 
"access:infra" 
], 
"pid": 3685, 
"method": "post", 
"statusCode": 500, 
"req": { 
"url": "/api/metrics/snapshot", 
"method": "post", 
"headers": { 
"host": "kibana-elk.pxdtools.io:5601", 
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0", 
"accept": "*/*", 
"accept-language": "fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3", 
"accept-encoding": "gzip, deflate, br", 
"referer": "https://kibana-elk.pxdtools.io:5601/app/metrics/inventory?waffleFilter=(expression:%27%27,kind:kuery)&waffleTime=(currentTime:1592828234054,isAutoReloading:!f)&waffleOptions=(accountId:%27%27,autoBounds:!t,boundsOverride:(max:1,min:0),customMetrics:!(),customOptions:!(),groupBy:!(),metric:(type:cpu),nodeType:host,region:%27%27,view:map)", 
"content-type": "application/json", 
"kbn-version": "7.8.0", 
"origin": "https://kibana-elk.pxdtools.io:5601", 
"content-length": "191", 
"connection": "keep-alive" 
}, 
"remoteAddress": "10.242.2.4", 
"userAgent": "10.242.2.4", 
"referer": "https://kibana-elk.pxdtools.io:5601/app/metrics/inventory?waffleFilter=(expression:%27%27,kind:kuery)&waffleTime=(currentTime:1592828234054,isAutoReloading:!f)&waffleOptions=(accountId:%27%27,autoBounds:!t,boundsOverride:(max:1,min:0),customMetrics:!(),customOptions:!(),groupBy:!(),metric:(type:cpu),nodeType:host,region:%27%27,view:map)" 
}, 
"res": { 
"statusCode": 500, 
"responseTime": 91, 
"contentLength": 9 
}, 
"message": "POST /api/metrics/snapshot 500 91ms - 9.0B" 
} 

```

My problem seems similar to this one: [Viewing Metrics -- 500 Internal Server Error](https://discuss.elastic.co/t/viewing-metrics-500-internal-server-error/225501/3)  
but there is no fix.

Here is the installation detail:  
3 nodes elasticsearch with license/xpack/security installed  
1 kibana on different server with security  
1 separate logstash and many others filebeat/metricbeat clients.

all stack is running on elk 7.8

i can correctly see metricbeat data from discover page.

---

<div class="post-metadata">

### Author: ![ntk](https://avatars.discourse-cdn.com/v4/letter/n/48db29/32.png) [@ntk](https://discuss.elastic.co/u/ntk)
#### Post date: [June 23, 2020, 2:33pm UTC](https://discuss.elastic.co/t/kibana-metrics-500-internal-server-error/238260/2 "2020-06-23T14:33:58Z")

</div>

I'm experiencing the same issue (ELK 7.8):

```auto
    {"type":"error","@timestamp":"2020-06-23T14:29:01Z","tags":[],"pid":21238,"level":"error","error":{"message":"Internal Server Error","name":"Error","stack":"Error: Internal Server Error at HapiResponseAdapter.toError (/home/ubuntu/kibana/src/core/server/http/router/response_adapter.js:130:19)
    at HapiResponseAdapter.toHapiResponse (/home/ubuntu/kibana/src/core/server/http/router/response_adapter.js:84:19)
    at HapiResponseAdapter.handle (/home/ubuntu/kibana/src/core/server/http/router/response_adapter.js:79:17)
    at Router.handle (/home/ubuntu/kibana/src/core/server/http/router/router.js:162:34)
    at process._tickCallback (internal/process/next_tick.js:68:7)"},"url":{"protocol":null,"slashes":null,"auth":null,"host":null,"port":null,"hostname":null,"hash":null,"search":null,"query":{},"pathname":"/api/metrics/snapshot","path":"/api/metrics/snapshot","href":"/api/metrics/snapshot"},"message":"Internal Server Error"}

```

---

<div class="post-metadata">

### Author: ![tvander](https://avatars.discourse-cdn.com/v4/letter/t/d6d6ee/32.png) [@tvander](https://discuss.elastic.co/u/tvander)
#### Post date: [June 25, 2020, 1:36pm UTC](https://discuss.elastic.co/t/kibana-metrics-500-internal-server-error/238260/3 "2020-06-25T13:36:40Z")

</div>

Problem solved,

This problem appears because of the index template, in my case i use logstash as intermediate between metricbeat and elasticsearch, so it seems that the existing template wasn't good,

I had to manually export the template on my metricbeat client server and then manually import it  
[https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-template.html#load-template-manually-alternate](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-template.html#load-template-manually-alternate)

```auto
metricbeat export template > metricbeat.template.json
curl -k -u elastic:mypass -XPUT -H 'Content-Type: application/json' https://PIXID-ELKMASTER1:9200/_template/metricbeat-new -d@metricbeat.template.json

```

Then i stopped logstash service, deleted the old metricbeat index template, deleted my metricbeat index,

When i started logstash the metricbeat index had correctly been created by the pipeline configuration, and i do no longer have the 500 error on the kibana metrics page.

Hope it will help

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 23, 2020, 1:36pm UTC](https://discuss.elastic.co/t/kibana-metrics-500-internal-server-error/238260/4 "2020-07-23T13:36:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
