not able to use jxm exporter

65 views
Skip to first unread message

bsus...@athenahealth.com

unread,
Nov 16, 2017, 10:32:24 AM11/16/17
to Prometheus Users

I'm using docker for running my server.
So earlier I used to run like this :

CMD ["/usr/bin/java", \
	"-Xms256M", \
	"-Xmx256M", \
	"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044", \
	"-jar", "gateway-service.jar"]

and then I added jmx exporter jar file and a yml file.
so running it like this :

CMD ["/usr/bin/java", \
	"-Xms256M", \
	"-Xmx256M", \
	"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044", \
        "-javaagent:./prometheus/jmx_prometheus_javaagent-0.1.0.jar=8888:/prometheus/jmx_prom.yaml", \
	"-jar", "gateway-service.jar"]

My prometheus.yml file:

my global config

global:
  scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.

scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'hystrix'
    scrape_interval: 90s
    scrape_timeout: 90s
    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.
    metrics_path: '/hystrix.stream'
    static_configs:
      - targets: ['localhost:18888']

still I'm not able to get the hystrix jmx metrics in prometheus format, but getting some error instead.
Can you please help ?

aswi...@gmail.com

unread,
Jan 5, 2018, 6:25:33 PM1/5/18
to Prometheus Users
@sushant, I have the same issue. How did you resolve it ?

bsus...@athenahealth.com

unread,
Jan 6, 2018, 1:10:58 AM1/6/18
to Prometheus Users
I tried this 
CMD ["/usr/bin/java", \
"-Xms256M", \
"-Xmx256M", \
   "-javaagent:./usr/local/temp/prometheus/jmx_prometheus_javaagent-0.1.0.jar=1044:/usr/local/temp/prometheus/jmx_prom.yaml", \
"-Xdebug -Xrunjdwp:=transport=dt_socket,server=y,suspend=n,address=1044", \
"-jar", "/usr/local/temp/gateway-service.jar"]
Reply all
Reply to author
Forward
0 new messages