I have used httpbeat, logstash, elasticsearch and grafana. The flow is as follows:
SpringBoot metric endpoint=> httpbeat => logstash => elasticsearch => grafana
Now the problem here is, I am not able to figure out the query to be fired to display the statistics like count of number of hits to a particular endpoint in spring boot which gets captured in the metrics.
I am able to get the field in elastic search but am not able to figure out how to get it in grafana using the queries and display on the dashboard.
Can anyone please help me with the steps to display a particular field in this json on the dashboard(For example: com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_count: 0).
This is the data that I am pulling from ElasticSearch.
{
"_index": “httpbeat-2017.05.25”,
"_type": “httpbeat”,
"_id": “AVw_Jy-REkmdVqjghygS”,
"_score": 1,
"_source": {
“request”: {
“headers”: {
“Accept”: “application/json”
},
“method”: “get”,
“url”: “http://localhost:8080/metrics”
},
"@timestamp": “2017-05-25T10:27:56.000Z”,
“response”: {
“headers”: {
“X-Application-Context”: “application”,
“Date”: “Thu, 25 May 2017 10:27:56 GMT”,
“Content-Type”: “application/json;charset=UTF-8”
},
“jsonBody”: {
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_snapshot_min”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_snapshot_75thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_snapshot_min”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_count”: 0,
“processors”: 2,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_snapshot_95thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_snapshot_95thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_snapshot_999thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_snapshot_999thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_snapshot_max”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_count”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_snapshot_999thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_snapshot_max”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_fifteenMinuteRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_fiveMinuteRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_snapshot_75thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_snapshot_75thPercentile”: 0,
“nonheap_init”: 2496,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_meanRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_snapshot_98thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_snapshot_98thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_snapshot_99thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_snapshot_99thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_oneMinuteRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_snapshot_mean”: 0,
“heap_used”: 169576,
“gc_ps_scavenge_time”: 183,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_fiveMinuteRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_snapshot_mean”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_fifteenMinuteRate”: 0,
“heap_committed”: 331776,
“gauge_response_metrics”: 7,
“classes_unloaded”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_snapshot_max”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_snapshot_stdDev”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_oneMinuteRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_oneMinuteRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_meanRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_snapshot_min”: 0,
“instance_uptime”: 3113663,
“gc_ps_scavenge_count”: 9,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_oneMinuteRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_snapshot_98thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_snapshot_99thPercentile”: 0,
“nonheap_used”: 81115,
“classes_loaded”: 10391,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_fifteenMinuteRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_snapshot_75thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_snapshot_max”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_snapshot_999thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_snapshot_median”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_snapshot_95thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_fifteenMinuteRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_snapshot_99thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_snapshot_99thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_snapshot_98thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_snapshot_min”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_count”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_snapshot_median”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_snapshot_median”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_snapshot_stdDev”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_snapshot_stdDev”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_snapshot_95thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_snapshot_98thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_snapshot_max”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_snapshot_95thPercentile”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_snapshot_median”: 0,
“nonheap”: 0,
“mem_free”: 162199,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_snapshot_75thPercentile”: 0,
“threads_totalStarted”: 31,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_meanRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_snapshot_min”: 0,
“threads_daemon”: 24,
“threads_peak”: 26,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_count”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_fiveMinuteRate”: 0,
“datasource_primary_usage”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_snapshot_stdDev”: 0,
“classes”: 10391,
“httpsessions_active”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_fiveMinuteRate”: 0,
“mem”: 412890,
“systemload_average”: -1,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_oneMinuteRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_fiveMinuteRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getAllTopics_snapshot_999thPercentile”: 0,
“heap”: 466432,
“gc_ps_marksweep_time”: 199,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_meanRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_snapshot_mean”: 0,
“httpsessions_max”: -1,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_count”: 0,
“heap_init”: 262144,
“counter_status_200_metrics”: 95,
“datasource_primary_active”: 0,
“threads”: 26,
“uptime”: 3155041,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_snapshot_median”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_updateTopic_snapshot_mean”: 0,
“gc_ps_marksweep_count”: 2,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_meanRate”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_getTopic_snapshot_mean”: 0,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_deleteTopic_snapshot_stdDev”: 0,
“nonheap_committed”: 82496,
“com_mydemoapplication_springdataapplication_mydataapplication_TopicController_addTopic_fifteenMinuteRate”: 0
},
“statusCode”: 200
},
“beat”: {
“hostname”: “BDSPIND70182685”,
“name”: “BDSPIND70182685”,
“version”: “4.0.0”
},
"@version": “1”,
“host”: “BDSPIND70182685”,
“type”: “httpbeat”,
“tags”: [
“beats_input_raw_event”
]
}
}
]
}
}