artemis-prometheus-metrics-plugin | metrics plugin implementation for the ActiveMQ | Analytics library
kandi X-RAY | artemis-prometheus-metrics-plugin Summary
kandi X-RAY | artemis-prometheus-metrics-plugin Summary
This is a metrics plugin implementation for the ActiveMQ Artemis message broker. It provides integration with Prometheus using two modules:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Handles GET requests
- Get metrics
artemis-prometheus-metrics-plugin Key Features
artemis-prometheus-metrics-plugin Examples and Code Snippets
Community Discussions
Trending Discussions on artemis-prometheus-metrics-plugin
QUESTION
I have a question on which I am stuck and I am not quite sure how to resolve it.
In my work project I have an ActiveMQ queue and I want to send some metrics to Prometheus which will help me to create some alerts in Grafana. I know that for ActiveMQ Artemis I can use this plugin, but I don't understand 100% how to configure it.
My application is deployed on a Kubernetes cluster and the ActiveMQ broker is there too. So I have created ActiveMQPrometheusMetricsPlugin class which implements org.apache.activemq.artemis.core.server.metrics.ActiveMQMetricsPlugin
. Now is where I get confused right now I should deploy my application and the metrics would be gather by Prometheus? I should do more configuration?
We usually do not build the application on local env. We are using a pipeline which is building and deploying the app to various envs (dev, test, prod). I should do the configuration similar with the GitHub plugin project, deploy it, and after that find those jars on Kubernetes and move them to the correct location? Also dev-ops said to me that we are using a default conf. I don't know if we have a broker.xml
file.
ANSWER
Answered 2021-Jun-03 at 16:09There are a couple of important points to understand before getting started:
- When using the Artemis Prometheus Metrics Plugin neither the broker nor the applications "send" metrics to Prometheus. Prometheus itself must retrieve or "scrape" metrics from the broker. This is why the plugin comes with a servlet. The servlet exposes an HTTP endpoint that Prometheus can use to scrape metrics.
- The Artemis Prometheus Metrics Plugin is part of the broker infrastructure. It is not to be deployed as part of an application. The plugin's jar and war files are deployed on the broker and configured in
broker.xml
andbootstrap.xml
respectively.
The Artemis Prometheus Metrics Plugin provides integration with Prometheus using two modules:
artemis-prometheus-metrics-plugin: This provides the actual implementation of
org.apache.activemq.artemis.core.server.metrics.ActiveMQMetricsPlugin
and packages it with the Micrometer and Prometheus dependencies in an "uber" jar.artemis-prometheus-metrics-plugin-servlet: This provides a war file containing a simple servlet which can be deployed to the broker's embedded web server which then Prometheus can use to scrape metrics.
Once you clone the Artemis Prometheus Metrics Plugin repository simply run mvn install
to build these two modules. The output will be in their respective target
directories.
After building the modules follow these steps to deploy and configure the Artemis Prometheus Metrics Plugin. If you have some kind of dev-ops group which manages and configures your broker then they would follow these steps.
Copy
artemis-prometheus-metrics-plugin/target/artemis-prometheus-metrics-plugin-.jar
to/lib
.Add this to your
/etc/broker.xml
:
QUESTION
I hope you have an idea.
I am working with an ActiveMQ Artemis Broker and installed a metrics plugin to use with prometheus and grafana (https://github.com/rh-messaging/artemis-prometheus-metrics-plugin/). Like the instruction says, I added to the bootstrap.xml
We're working with a vendor providing us with the Grafana dashboards as long as we are providing metrics they can work with. The problem is that the vendor wants to access the metrics page (https://activemq:port/metrics) via HTTP and not HTTPS, which is configured in the bootstrap.xml ( ) Their effort would be disproportionately high to change their system to work with HTTPS now.
Is it possible to configure the jetty-Webserver to serve the console etc. via HTTPS and the URL activemq:port/metrics via HTTP?
I tried to add another web-container in the bootstrap.xml, now binding bind="http://0.0.0.0:port/"
and adding the metrics plugin in it but the webserver wasn't happy with two web-containers :/
Thanks for your help :)
...ANSWER
Answered 2020-Aug-20 at 12:50This is not currently possible. However, the project could be enhanced to support multiple web
instances in bootstrap.xml
. Contributions are always welcome.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install artemis-prometheus-metrics-plugin
You can use artemis-prometheus-metrics-plugin like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the artemis-prometheus-metrics-plugin component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page