项目作者: liyinda

项目描述 :
springboot-actuator-exporter
高级语言: Go
项目地址: git://github.com/liyinda/springboot-actuator-exporter.git
创建时间: 2019-04-01T05:42:17Z
项目社区:https://github.com/liyinda/springboot-actuator-exporter

开源协议:Apache License 2.0

下载


springboot-actuator-exporter

Springboot Actuator Metrics and exports them via HTTP for Prometheus consumption

Convert JSON format to prometheus format and via HTTP standard output.

Table of Contents

Dependency

Download

Binary can be downloaded from Releases page.

Compile

build binary

  1. go build springboot_actuatorMetrics_exporter.go

build docker image

  1. make docker

Docker Hub Image

  1. DOCKER The deployment method author will add as soon as possible
  2. docker pull null:latest

run docker

  1. docker run -ti image bin/springboot-actuator-exporter

run parameter

  1. -springboot.scrape_uri string
  2. URI to stringboot metrics stub status page (default "http://localhost/management/metrics")
  3. E.g: curl http://localhost/management/metrics (springboot actuator metrics)
  4. {
  5. "mem": 458972,
  6. "processors": 24,
  7. "uptime": 16774475011,
  8. "systemload.average": 0.87,
  9. "heap.used": 184541,
  10. "threads": 39,
  11. ...
  12. }
  13. -springboot.service string
  14. springboot services (default "service")
  15. -telemetry.address string
  16. Address on which to expose metrics. (default ":9933")
  17. -telemetry.endpoint string
  18. Path under which to expose metrics. (default "/metrics")

Environment variables

This image is configurable using different env variables

Metrics

springboot_monitor_performance

Documents about exposed Prometheus metrics.

  1. # TYPE springboot_actuator_exporter_build_info gauge
  2. springboot_actuator_exporter_build_info{branch="",goversion="go1.11",revision="",version=""} 1
  3. # HELP springboot_monitor_info springboot info
  4. # TYPE springboot_monitor_info gauge
  5. springboot_monitor_info{Processors="processors"} 16
  6. # HELP springboot_monitor_performance springboot performance
  7. # TYPE springboot_monitor_performance gauge
  8. springboot_monitor_performance{hostname="$hostname",service="$service",sys="heap"} 250592
  9. springboot_monitor_performance{hostname="$hostname",service="$service",sys="memory"} 1.11207e+06
  10. springboot_monitor_performance{hostname="$hostname",service="$service",sys="systemload"} 0.06
  11. springboot_monitor_performance{hostname="$hostname",service="$service",sys="threads"} 38
  12. springboot_monitor_performance{hostname="$hostname",service="$service",sys="uptime"} 9.252913831e+09

Grafana

image