beats-dashboards icon indicating copy to clipboard operation
beats-dashboards copied to clipboard

Fix proc.cpu.user_p value in the top processes widget

Open monicasarbu opened this issue 9 years ago • 7 comments

The proc.cpu.user_p is empty in the Top processes widget from the Topbeat dashboard in case the latest stable versions of Elastisearch and Kibana are used. Topbeat exports the right value of the proc.cpu.user_p in the JSON object.

monicasarbu avatar Oct 27 '15 17:10 monicasarbu

It would be nice to fix it for GA, but it might be a Kibana/Elasticsearch issue.

monicasarbu avatar Oct 27 '15 17:10 monicasarbu

In ES it seems that the value is correctly stored, but Kibana when calling /_msearch it gets back null as value for the proc.cpu.user_p.

curl 'http://127.0.0.1:5601/elasticsearch/_msearch?timeout=0&ignore_unavailable=true&preference=1446028671256' -H 'Origin: http://127.0.0.1:5601' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.8,ro;q=0.6,de;q=0.4' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' -H 'Referer: http://127.0.0.1:5601/' -H 'Connection: keep-alive' --data-binary $'{"index":["topbeat-2015.10.28"],"search_type":"count","ignore_unavailable":true}\n{"size":0,"aggs":{"6":{"terms":{"field":"proc.name","size":10,"order":{"1":"desc"}},"aggs":{"1":{"max":{"field":"proc.cpu.user_p"}},"2":{"max":{"field":"proc.mem.rss"}},"3":{"max":{"field":"proc.mem.rss_p"}},"5":{"max":{"field":"proc.mem.share"}}}}},"query":{"filtered":{"query":{"query_string":{"query":"type: proc","analyze_wildcard":true}},"filter":{"bool":{"must":[{"range":{"timestamp":{"gte":1446027772667,"lte":1446028672667}}}],"must_not":[]}}}},"highlight":{"pre_tags":["@kibana-highlighted-field@"],"post_tags":["@/kibana-highlighted-field@"],"fields":{"*":{}},"require_field_match":false,"fragment_size":2147483647}}\n' --compressed

This problem seems to appear only for Kibana 4.1.2 and it seems to be fixed in Kibana 4.2.x.

monicasarbu avatar Oct 28 '15 10:10 monicasarbu

I have used the beat's dashboards with the following versions but i have same issue with top process widget and proc.cpu.user_p is well stored in elasticsearch.

Versions:

  • Kibana 4.3
  • Elasticsearch 2.1
  • Topbeat 1.0.0

melck avatar Nov 28 '15 12:11 melck

Yeah unfortunately they did not fix this before it was released.

:(

damm avatar Dec 06 '15 05:12 damm

This error is caused because don't have loaded the template for elasticsearch, try Loading the Index Template in Elasticsearch

Only apply for new indexes!

gerardorochin avatar Dec 09 '15 00:12 gerardorochin

Oh but I do have the template loaded. I can see the percentages recorded; but nothing ever draws.

Maybe I will shove it through Logstash instead..

damm avatar Dec 09 '15 00:12 damm

Creating a template before starting topbeat solves this issue. Confirmed!

vineet01 avatar Jun 20 '16 11:06 vineet01