Switching to Elasticsearch for Storing Metrics
Explore when to use Elasticsearch and Prometheus for storing and querying Kubernetes metrics and logs. Learn why Prometheus is preferred for metrics due to its efficiency, Kubernetes integration, and alerting, while Elasticsearch is better suited for logs. This lesson helps you choose the right tool for monitoring and logging in Kubernetes environments effectively.
Using elastic.co to store our metrics #
Now that we had Elasticsearch running in our cluster and knowing that it can handle almost any data type, a logical question could be whether we can use it to store our metrics besides logs. If you explore elastic.co, youโll see that metrics are indeed something they advertise. If it could replace Prometheus, it would undoubtedly be beneficial to have a single tool that can handle not only logs but also metrics. On top of that, we could ditch Grafana and keep Kibana as a single UI for both data types.
Right tool for the job #
Nevertheless, I would strongly advise against using Elasticsearch for metrics. It is ...