remote write prometheus demo

This commit is contained in:
Martin Ptáček
2023-06-02 10:24:50 +02:00
parent 30b58c6227
commit 2ca432d2d2
5 changed files with 33 additions and 1 deletions

View File

@ -75,6 +75,7 @@ class PushProxClient(private val pushProxConfig: PushProxConfig) {
withContext(NonCancellable){
Log.v(TAG, "Canceling pushprox client")
client?.close()
Log.v(TAG, "PushProx http client canceled")
}
}
}

View File

@ -0,0 +1,14 @@
# Simple run of prometheus database with a configuration file on localhost
version: '3.9'
services:
prometheus:
container_name: prometheus_remote_receive
image: bitnami/prometheus:2.43.0
restart: on-failure
command: --config.file=/etc/prometheus/prometheus.yml --enable-feature=remote-write-receiver #TODO
volumes:
- ./prometheus.yaml:/etc/prometheus/prometheus.yml
ports:
- 5000:9090

View File

@ -4,7 +4,7 @@ version: '3.9'
services:
prometheus:
container_name: prometheus
container_name: prometheus_remote_write
image: bitnami/prometheus:2.43.0
restart: on-failure
volumes:

View File

@ -0,0 +1,17 @@
# Prometheus global configuration file
global:
scrape_interval: 3s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"] # scrape prometheus itself
labels:
service: 'some-service'
remote_write:
- url: "http://localhost:5000/api/v1/write" # from official documentation
remote_timeout: "30s"
send_exemplars: false
follow_redirects: true