mirror of
https://github.com/mii443/prometheus-android-exporter.git
synced 2025-08-22 15:15:35 +00:00
remote write prometheus demo
This commit is contained in:
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
14
local/remote_receive/docker-compose.yaml
Normal file
14
local/remote_receive/docker-compose.yaml
Normal 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
|
@ -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:
|
17
local/remote_write/prometheus.yaml
Normal file
17
local/remote_write/prometheus.yaml
Normal 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
|
Reference in New Issue
Block a user