Questions tagged [prometheus-java]

Refers to specific questions about the library for JVM applications

Prometheus instrumentation library for JVM applications

Java Doc: http://prometheus.github.io/client_java/

Source code: https://github.com/prometheus/client_java

81 questions
1
vote
0 answers

Springboot disable selected prometheus metrics

I am using springboot gateway 2.0.4.RELEASE. io.micrometer micrometer-registry-prometheus After adding this dependency, it is exposing all metrics to prometheus endpoint. I…
1
vote
1 answer

How does Prometheus labeling syntax works?

I'm new to Prometheus and I have a very basic question. What is the syntax to add a label to my Metrics? I tried the following: 1. Gauge.build().name(name).labelNames("label"="someLabel").help(helpMsg).register(registry); 2.…
Oded
  • 336
  • 1
  • 3
  • 17
1
vote
1 answer

Inject custom label into default jmx Prometheus metrics for Java client

Our system consists of multiple JAVA based microservices, each one reports its RT status leveraging io.prometheus simpleclient The integration code looks pretty straightforward // Initialize default JVM metrics for Prometheus …
Denis Voloshin
  • 768
  • 10
  • 32
1
vote
1 answer

Prometheus java client and Prometheus server compatiblity

Current latest version of Prometheus Java client is 0.9.0 and the latest version of Prometheus Server is 2.20.1. I was wondering if there is a compatibility matrix of client and server versions which I could not find via basic google search. If…
Rakesh N
  • 2,450
  • 3
  • 25
  • 32
1
vote
0 answers

How to get http_request metrics for non spring boot application

I'm trying to get metrics data using micrometer. But it's providing all JVM related metrics in the /metrics end point, but it's not providing http_request metrics. We have exposed few API's and we are not able to measure the performance of…
vasantharajan
  • 265
  • 5
  • 18
1
vote
2 answers

How to monitor JBoss EAP with Prometheus jmx-exporter

I want to monitor some JBoss EAP 7 servers with Prometheus/Grafana (as well as some Wildfly). I understand I have to use jmx_exporter. Should I use it as embedded (agent) or side-car (http)? Which configuration file?
Franklin Piat
  • 3,952
  • 3
  • 32
  • 45
1
vote
2 answers

How to collect the Prometheus metrics in a java program?

I searched most of the articles, but not found my expected solutions. I am new to Prometheus. I need to get the Prometheus metrics to collect by my java program. So, need help to read or get the Prometheus metrics by my java program. Any help or…
JDGuide
  • 6,239
  • 12
  • 46
  • 64
1
vote
1 answer

How to integrate Prometheus with ReactiveFeignClient to meter response time/hits of each status code returned from client call

I am with a Spring Boot project with WebFlux + Spring Reactor, and it calls other services with ReactiveFeignClient. How can I integrate Prometheus so that I could monitor response time (with a @Timer) and the percentage of each status code…
WesternGun
  • 11,303
  • 6
  • 88
  • 157
1
vote
0 answers

Concurrency Handling In Prometheus

I implemented a Prometheus Histogram to calculate response time and tried to send 10 concurrent requests. Here does one request close the timer opened by another request in Prometheus. request 1 enters at t1 reqest2 enters at t2 request1 finishes at…
N.Chandimali
  • 799
  • 1
  • 8
  • 23
1
vote
0 answers

micrometer prometheus : add custom host metrics?

I am using micrometer and prometheus into a spring boot 2 application : everything works like a charm. However i recently had an 'infra issue': my application generated 'too many open files' The prometheus endpoint returns the process_open_files…
Guillaume
  • 107
  • 1
  • 10
1
vote
1 answer

Prometheus Counter Inconsistency

I'm using the Prometheus Java simpleclient within a web service to keep track of how many events result in one status or another. I'm able to check within the logs that the counter is being invoked and is incrementing internally, but it seems that a…
jadler2660
  • 11
  • 3
1
vote
1 answer

Listing top K endpoints by exception count with prometheus

I'm using spring boot 2.x & using micrometer to record inbound http request metrics to PrometheusMeterRegistry. Spring boot metrics actuator endpoint displayed the metric as…
opuser1
  • 427
  • 7
  • 29
1
vote
0 answers

Get distinct values of metric

in my setup I have a java component reading data from YARN manager and exposing results of various jobs as metrics. For example I have a metrics with job duration which just holds duration of last app run. It may look like…
Milano Nicolum
  • 131
  • 1
  • 6
1
vote
1 answer

Set start-time for histogram sample

The usecase We got multiple changelogs stored in the database, and want to create a histogram monitoring the duration between changes. The problem There doesn't seem to be a way to set the start time of a Historgram.Timer, e.g we want to set it to…
atomman
  • 2,510
  • 1
  • 16
  • 27
0
votes
0 answers

Prometheus Java client manually exposing prometheus end point

I have a spring boot application where for certain legacy reasons I cannot use spring actuator. I was able to expose a prometheus end point and see a lot of default metrics. But I am not able to see the metrics that I am myself adding. The code…
developer747
  • 15,419
  • 26
  • 93
  • 147