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
2
votes
1 answer

How to call remote write API with proper snappy format from java/python/postman application

I have been trying to call remote_write() function of Prometheus via java/python/postman. I have configured a Prometheus server with remote receiver configuration and I have another Prometheus agent running from where I am trying to make an API call…
Shane
  • 588
  • 6
  • 20
2
votes
2 answers

Is io.prometheus.client.Gauge can be used for thread safety counters

I am using io.prometheus.client.Gauge to implement a thread safety counter to calculate the number of events processed in a time frame. Now there are several threads that are processing the events. And all can update the counter when it finishes the…
2
votes
3 answers

Prometheus WAL Keeps on Growing Indefinitely

Currently, I have a Prometheus v2.20.0 running, and it has an issue that the WAL keeps on growing indefinitely and consuming disk space. Actually the disk space is not the issue now, but that the WAL folder is not getting cleaned, so if any time…
Wazery
  • 15,394
  • 19
  • 63
  • 95
2
votes
3 answers

Prometheus: Error: 404, response body: 404 page not found when trying to push metrics using PushGateway

I am trying to push metrics using PushGateway, and i get the below error while pushing the metrics: java.io.IOException: Response code from http://169.41.73.106:30000/metrics/job/pushgateway was 404, response body: 404 page not found at…
S.A.Norton Stanley
  • 1,833
  • 3
  • 23
  • 37
2
votes
1 answer

Prometheus scraping error on 'not readable' attribute

I encountered the following error, which appears to be because of a 'not readable' attribute: 2020-06-23 10:02:55,104 DEBUG -- [pool-1-thread-1] i.p.j.s.io.prometheus.jmx.JmxScraper : scrape:…
Ofir Prizat
  • 154
  • 1
  • 15
2
votes
1 answer

Prometheus TimeStamp Returns Null

I registered a Prometheus Counter using the following code segment. public static final Counter requestsReceived = Counter.build("total_request_count_proxy_serv", "Total number of requests to a proxy service").labelNames("service", "method",…
N.Chandimali
  • 799
  • 1
  • 8
  • 23
2
votes
0 answers

How to write instant queries in prometheus adapter to get custom metric value from prometheus operator?

I want to continuously monitor a custom metric(of metricType Gauge) implemented in java usinf prometheus and autoscale the kubernetes pod based on that value. The value is exposed in the prometheus dashboard and I can able to access in the rest -…
2
votes
0 answers

Java client for Prometheus APIs

Is there any java client for Prometheus, by using which I can execute queries like the below one? curl 'http://localhost:9090/api/v1/query_range?query=up&start=2019-07-01T20:10:30.781Z&end=2019-07-01T20:11:00.781Z&step=15s'
Akshay chittal
  • 189
  • 2
  • 11
2
votes
1 answer

Integration of Resilience 4j and Prometheus

How to integrate Resilience-4J and Prometheus with micro-services. I have integrated Micro-services with resilience 4j and also with Prometheus . My problem is ,in Prometheus i am not getting any resilience query,only HTTP and other which comes…
1
vote
0 answers

Generating metrics for Prometheus from Spring Boot application

I am exposing two counter metrics from my spring boot application. The metrics are getting generated and the counters increase by 1 when the requests succeed. I am facing 2 issues - 1) The name of the counter is getting appended by "_total" even…
Arnav Bose
  • 791
  • 4
  • 13
  • 27
1
vote
0 answers

How to integrate micrometer @Timed with prometheus in async service method in springboot application

Have written a springboot application, and wanted to measure the time taken to execute a method using @Timed annotation from micrometer, and display this value in prometheus. Have tried below configuration, however the execution time is not…
1
vote
1 answer

Using JMX Exporter as javaagent for a sample java application

I am trying to get the JVM metrics of an existing java application, by using the JMX exporter as an agent. While trying to get the application up i am getting the below error. Any help will be greatly appreciated. config.yaml startDelaySeconds:…
Harsha
  • 831
  • 1
  • 9
  • 16
1
vote
0 answers

how to config docker with promethuse using TLS protocal

I run prometheus with docker , but I facing an issue in promethuse targets x509: certificate is not valid for any names, but wanted to match prometheus docker-compose.yml prometheus: image: prom/prometheus volumes: -…
1
vote
1 answer

Export Prometheus Metrics for Spring Boot Application in Kubernestes using Sidecar/ Adapter Pattern

Hi All I'm working on designing a Kubernetes sidecar / Adapter pattern for the Spring Boot Application to export Prometheus metrics, I am aware that we can use maven dependency io.micrometer:micrometer-registry-prometheus to expose Prometheus…
Prakash
  • 813
  • 1
  • 8
  • 20
1
vote
0 answers

How to expose Prometheus custom metrics to specific server using Prometheus Java Client?

We have automation project which is not hosted basically and we are executing our github branches using Jenkins. So when out jobs executes through Jenkins then the execution has Prometheus instrumentation and needs to expose metrics but how…
qaWork4
  • 79
  • 1
  • 6