leech001 / process_metrics_exporter

Prometheus process metrics exporter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prometheus process metrics exporter

MadeGitHub release versionGitHub Workflow Status GitHub Workflow Status GitHub Docker License: WTFPL

GO (golang) application for counting the number of running processes and forming the corresponding metrics for Prometheus (Alpine Linux images)

The main task is to calculate the number of running processes for a given list of processes, use it to form Gauge metrics and display them on the page with metrics

The application is launched with a command in the 'app' folder

go run main -update 5 -port 8080 test1 test2 test3

where:

  • "main" - application name;

  • "-update 5" - metrics refresh period on sec;

  • "-port 8080" - port where metrics are fed;

  • "test1...3" - names of processes.

Work with Docker (Alpine Linux images)

Download prepared image with application

docker pull leech001/process-metrics-exporter

or start it at once

docker run -d -p 8080:8080 leech001/process-metrics-exporter ./procheck -update 5 -port 8080 test1 test2 test3

metrics are available at

http://localhost:8080/metrics

About

Prometheus process metrics exporter

License:Do What The F*ck You Want To Public License


Languages

Language:Go 82.8%Language:Dockerfile 17.2%