[Feature] Adding Prometheus and needed configurations

This commit is contained in:
DUMAX-VORZET Mathieu 2020-03-13 16:06:24 +01:00
parent 7336071193
commit 74aab5fd84
5 changed files with 81 additions and 0 deletions

View File

@ -16,3 +16,14 @@ public_host="chirpstack-application-server:8001"
[application_server.external_api]
bind="0.0.0.0:8080"
jwt_secret="verysecret"
# Metrics collection settings.
[metrics]
timezone="Local"
[metrics.prometheus]
bind="chirpstack-application-server:9324"
endpoint_enabled=true
APITimingHistogram=true

View File

@ -5,3 +5,13 @@
servers=["tcp://mosquitto:1883"]
username=""
password=""
# Metrics collection settings.
[metrics]
timezone="Local"
[metrics.prometheus]
bind="chirpstack-gateway-bridge:9325"
endpoint_enabled=true
APITimingHistogram=true

View File

@ -51,3 +51,13 @@ server="http://chirpstack-application-server:8003"
[geolocation_server]
server="chirpstack-geolocation-server:8005"
# Metrics collection settings.
[metrics]
timezone="Local"
[metrics.prometheus]
bind="chirpstack-network-server:9323"
endpoint_enabled=true
APITimingHistogram=true

View File

@ -0,0 +1,43 @@
# my global config
global:
scrape_interval: 15s # 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_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
scrape_configs:
- job_name: 'Prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'Chirpstack network server'
static_configs:
- targets: ['chirpstack-network-server:9323']
- job_name: 'Chirpstack application server'
static_configs:
- targets: ['chirpstack-application-server:9324']
- job_name: 'Chirpstack gateway bridge'
static_configs:
- targets: ['chirpstack-gateway-bridge:9325']

View File

@ -43,6 +43,13 @@ services:
ports:
- 1883:1883
prometheus:
image: prom/prometheus:v2.16.0
ports:
- 9090:9090
volumes:
- ./configuration/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
volumes:
postgresqldata:
redisdata: