From 22847ae7a60130dc1799ed84f54708a610e32c3a Mon Sep 17 00:00:00 2001 From: Tran Hau Date: Sat, 9 May 2020 20:59:17 +0700 Subject: [PATCH] prom --- Development/prometheus.md | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/Development/prometheus.md b/Development/prometheus.md index 299bc42..6e0851e 100644 --- a/Development/prometheus.md +++ b/Development/prometheus.md @@ -1,21 +1,36 @@ # Prometheus -Assume you use Archlinux. - -Read [Prometheus](https://wiki.archlinux.org/index.php/Prometheus). - Read [Getting started](https://prometheus.io/docs/prometheus/latest/getting_started/). -Start/enable service: +Docker: ```sh -systemctl start prometheus.service - -systemctl enable prometheus.service +docker run -d \ + -p 9090:9090 \ + -v /path/to/config:/etc/prometheus \ + prom/prometheus ``` UI: ```txt -http://localhost:9090 +localhost:9090 +``` + +Metrics: + +```txt +localhost:9090/metrics +``` + +## Pushing metrics + +Read [Pushing metrics](https://prometheus.io/docs/instrumenting/pushing/) + +Docker: + +```sh +docker run -d \ + -p 9091:9091 \ + prom/pushgateway ```