prometheus-metric-pusher

command module
v0.0.0-...-545dda9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2023 License: MIT Imports: 13 Imported by: 0

README

Prometheus Metric Pusher

Simple program that pushes metrics directly to Prometheus over remote write protocol.

Build

You need to have Go installed locally.

git clone https://github.com/kshcherban/prometheus-metric-pusher
cd prometheus-metric-pusher
go build

Usage

Start Prometheus server with special flag:

docker run --rm -ti -p 9090:9090 quay.io/prometheus/prometheus \
  --web.enable-remote-write-receiver --config.file=/etc/prometheus/prometheus.yml

Run prometheus-metric-pusher:

./prometheus-metric-pusher -metric mymetric -value 3 -label instance=my-host1 -label foo=bar

To see all available CLI options run with -h option.

In Prometheus you will see you metric as follow:

screen

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL