Logging and Monitoring with Prometheus

Ways of Monitoring Docker Containers using Prometheus

1. Logfile monitoring ([grok_exporter]),

2. Blackbox monitoring ([blackbox_exporter])

3. JMX ([jmx_exporter])

4.Write your own Java agent ([promagent.io])

For monitoring of logs do we use Prometheus or ElasticStack.

Prometheus can be used for finding the numb

Elastic Search is a full cluster search engine which has programmes called BEATS. Those BEATS takes the log lines and ship them to ES cluster where the log content is indexed. And we can use Kibana to aggregation and median and create dashboards.

But if we are using ELK do we need to use prometheus?

Yes, because of the error messages. Prometheus is only a time series database which can have counters or gauges to find the number of logs or requests and it has nothing to do with full text search or text. Prometheus is all about numbers.

Another reason is we send all the data(logs) to ES and when we are doing aggregation and when we expect a median or aggregation ES will accumulate all the data between the time period specified to get the required results. These aggregated data will be sent to prometheus.

BlackBox exporter:

When an end point is provided the blackbox exporter will return '1' on success and '0' on failures.

JMX- Like a remote procedure call.

(Jave Visual VM tool will be part of the idk) which can provide the details of the JMX in GUI

DIY Java Agent:

https://www.youtube.com/watch?v=BjyI93c8ltA

LINKS: https://labs.consol.de/tags/prometheusio/