Monitoring, ElasticSearch and Grafana

This page demonstrates the simplest implementation that use ElasticSearch and Grafana to monitor metrics

Create Index in ElasticSearch

curl -X PUT "localhost:9200/simple?pretty" -H 'Content-Type: application/json' -d'
{ "mappings": {
"properties": {
"@timestamp": {
"type": "date"
},
"value": {
"type": "long"
}
}
}
}
'

Submit Metric to ElasticSearch

curl -X POST 'localhost:9200/simple/_doc?pretty' -H 'Content-Type: application/json' -d'
{
"value": 1045,
"@timestamp": 1593267490678
}

Add ElasticSearch as Data Source in Grafana

Query Metrics in Grafana