Micronaut metrics to elastic search - elasticsearch

I am looking for an example how on how to send Micronaut's metric to elastic search, it does not look like it is supported out of the box ?
Thank you, kindly
Luis Oscar Trigueiros

Micronaut 1.2.0 will include support for Elastic as a backend for the metrics using Micrometer.
From https://docs.micronaut.io/snapshot/guide/index.html#_micronaut_micrometer_1_2_update
Meter registry support for AppOptics, Azure Monitor, Datadog, Dynatrace, Elastic, Ganglia, Humio, Influx, Jmx, Kairos, New Relic, SignalFX, Stackdriver and Wavefront
Keep in mind that this is not included in 1.2.0.RC1 but it will be available in 1.2.0.RC2.

Related

Micrometer vs metricbeats

Looking to send metrics to elastic search. I have a number of docker services running in Springboot.
What is the difference between using micrometer and metric beats?
There's a nice example in the official observability documentation on how both Metricbeat and Micrometer can be complimentary.
Micrometer provides metrics in a vendor-neutral way. Those metrics are then pulled by Prometheus and Metricbeat (with the prometheus module) is used to forward those metrics to Elasticsearch.
It is also possible to remove Prometheus from the picture and simply configure Micrometer to push metrics directly to Elasticsearch.

How to monitor Apache Kafka metrics?

How can I build a microservice to monitor Kafka metrics?
I don't want to use the confluent control center or any other tool.
Before building anything like a microservice, I would explore the kafka exporter for Prometheus to expose Kafka metrics in prometheus format. You could then use Prometheus server to scrape these metrics and Grafana for dashboarding/visualisations. There's other tools you could use for scraping instead of Prometheus/Grafana, e.g. Elastic Metricbeat (which I mention because you've tagged the question with 'elasticsearch'), but the Prometheus/Grafana combination is quite easy to get up and running - there's also out-of-the-box Grafana dashboards that you can install without having to set this up manually e.g. this one.

How do I pull Elastic-search metrics into Prometheus using the Elasticseacrh_exporter

I have installed Prometheus into a Kubernetes cluster using the helm stable chart. We run Elastic Search and I want to scrape metrics from this and then create Alerts based on events.
I have installed the elasticsearch exporter via helm but no where can I find how I then import these metrics into Prometheus ?
There is some config I am missing such as creating a scraping job or something. Anyone can help much appreciated.
I connected to the elasticsearch exporter and can see it pulling metrics.
If you're using an elasticsearch exporter it should contain some documentation. There are more than just one solution out there and you didn't specify which one you're using. In my opinion it would be best for you to start from a tutorial like this one which explains step by step the whole process. As you can read there:
Metrics collection of Prometheus follows the pull model. That means,
Prometheus is responsible for getting metrics from the services that
it monitors. This process introduced as scraping. Prometheus server
scrapes the defined service endpoints, collect the matrixes and store
in local database.
which means you need to configure Prometheus to scrape metrics exposed by the elasticsearch exporter you chose.
Official Prometheus documentation will be also a great source of knowledge and good starting point.
EDIT:
If you run your Elasticsearch instance on Kubernetes cluster, you should rather use the Service Discovery mechanism than static configs. More on <kubernetes_sd_config> you can find here.
There are five different types of Kubernetes service discoveries you can use with Prometheus: node, endpoints, service, pod, and ingress. The one which you most probably need in your case is endpoints. Prometheus uses the Kubernetes API to discover targets. Below you have some examples:
https://blog.sebastian-daschner.com/entries/prometheus-kubernetes-discovery
https://raw.githubusercontent.com/prometheus/prometheus/master/documentation/examples/prometheus-kubernetes.yml

Jaeger with ElasticSearch

I have created a microservice based architecture using Spring Boot and deployed the application on Kubernetes/Istio platform.
The different microservices communicate with each other using either JMS (ActiveMQ) or REST API.
I am getting the tracing of REST communication on Istio's Jaeger but the JMS based communication is missing in Jaeger.
I am using ElasticSearch to store my application logs.
Is it possible to use the same ElasticSearch as a backend(DB) of Jaeger?
If yes then I will store tracing specific logs in ElasticSearch and query them on Jaeger UI.
I believe you can reuse Elasticsearch for multiple purposes - each would use a different set of indices, so separation is good.
from: https://www.jaegertracing.io/docs/1.11/deployment/ :
Collectors require a persistent storage backend. Cassandra and Elasticsearch are the primary supported storage backends
Tying the networking all together, a docker-compose example:
How to configure Jaeger with elasticsearch?
While this isn't exactly what you asked, it sounds like what you're trying to achieve is seeing tracing for your JMS calls in Jaegar. If that is the case, you could use an OpenTracing tracing solution for JMS or ActiveMQ to report tracing data directly to Jaegar. Here's one potential solution I found with a quick google. There may be others.
https://github.com/opentracing-contrib/java-jms

Metricbeat Jolokia jmx mapping

I am currently experimenting with Metricbeat with Jolokia using ELK 7.2.0 using docker-compose, and I was able to get JMX metrics to display in Kibana.
My issue is that I need to configure per JMX metric the mapping in the jmx.mappings section of the metricbeat configuration YML the metrics that I would like to have send to ELK.
Question is it possible to pass some sort of wildcard configuration so that metricbeat simply pulls all the jmx metrics and sends it to ELK ?
Thank you, kindly
Luis Oscar Trigueiros
I think you'll have to wait for https://github.com/elastic/beats/issues/8168, which will hopefully make some progress soon.

Resources