Prometheus metrics from collector server
See original GitHub issueHi,
I’m looking into javamelody’s collector server and I’d like to know if there’s a way to obtain prometheus metrics from the collector server, similar to how we can query http://host/monitoring?format=prometheus
. When I try to call http://collector-host/javamelody?format=prometheus
, I get a 500 error java.lang.IllegalStateException: WRITER
, (javamelody server 1.81).
The collector server is very useful when you use intermitent applications, and prometheus is a good time-series database to persist the centralized data from the collector server; if this isn’t possible, is there an alternative I could use to expose the javamelody collector server data to grafana?
Thank you for the good work!
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to collect Prometheus metrics with the OpenTelemetry ...
Here, we will look into how we can scrape Prometheus metrics with the OpenTelemetry Collector and send them to a remote write destination ......
Read more >Writing exporters - Prometheus.io
For example, the mdadm collector hand-parses a file and exposes metrics created specifically for that collector, so we may as well get the...
Read more >stolostron/metrics-collector: Prometheus push federation
Metrics Collector implements a client to "scrape" or collect data from OpenShift Promethus and performs a push fedration to a Thanos instance hosted...
Read more >OpenTelemetry Collector Prometheus [full guide with code]
You can use OpenTelemetry Collector to pull Prometheus metrics using ... It can process billions of spans and metrics on a single server...
Read more >Guide To The Prometheus Node Exporter - OpsRamp
Most Kubernetes clusters expose cluster-level server metrics and ... You can review a list of all existing collectors for the Prometheus Node Exporter...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
my testing environment:
Run as:
java -server -jar -Djavamelody.storage-directory=/home/path/to/javamelody/storage javamelody-collector-server-1.81.0.war --httpPort=8090
Two instances of Spring Boot v1.5.22 with javamelody 1.72.0(latest for spring boot 1.5), which are registering themselves under the application name “backend”, running through AdoptOpenJDK 8
URL for javamelody is being accessed as
http://localhost:8090/javamelody?format=prometheus&application=backend
Exception thrown:
In order to register my spring-boot applications with the collector server, I use the following component, which waits until the server is up and running to try to register itself(apologies for pt-BR comments):
(in this instance, javaMelodyUrl = “http://localhost:8090” and javaMelodyAppName = “backend”)
Do note that I can access other information just fine. Also, this error occurs when the javamelody collector server is of the same version as the spring-boot counterparts (ie. 1.72.0). Using Chrome v80
Is it possible that the old versions from my servers are having trouble?
Enhancement registered in the issue above. Closing this one.