This is an exporter for prometheus, written as a cobra applicationto export the data collected by the spring metrics actuator.
There is an automatically build docker image out there: scalify/spring_exporter
The exporter is configured using command line flags and arguments. Usage is as follows:
$ ./spring_exporter export --help
Exports spring actuator metrics from given endpoint
Usage:
spring_exporter export <spring-endpoint> [flags]
Flags:
--basic-auth-password string HTTP Basic auth password for authentication on the spring endpoint
--basic-auth-user string HTTP Basic auth user for authentication on the spring endpoint
-e, --endpoint string Path the exporter should listen listen on (default "/metrics")
-h, --help help for export
-i, --insecure Whether to use insecure https mode, i.e. skip ssl cert validation (only useful with https endpoint)
-l, --listen string Host/Port the exporter should listen listen on (default ":9321")
Global Flags:
--config string config file (default is $HOME/.spring_exporter.yaml)
Example usage in a docker-compose file:
version: "3"
services:
fixtures:
build:
context: fixtures
image: scalify/spring_exporter_test_server
ports:
- "3000:3000"
exporter:
build:
context: .
image: scalify/spring_exporter
command: [
"export", "http://fixtures:3000/manage/metrics",
"--basic-auth-user", "admin",
"--basic-auth-password", "secret",
"--insecure"
]
links:
- fixtures
ports:
- "9321:9321"
MIT License
Copyright (c) 2017 scalify GmbH