add support for diskfree

add sidecar for ntfy alerts for grafana
This commit is contained in:
Pim Kunis 2023-08-11 17:42:40 +02:00
parent cfa1a623c0
commit 77eee8b66b
3 changed files with 26 additions and 1 deletions

View file

@ -4,6 +4,7 @@ version: "3.8"
networks:
traefik:
external: true
grafana:
configs:
esdatasource:
@ -80,6 +81,7 @@ services:
image: grafana/grafana-oss
networks:
- traefik
- grafana
deploy:
labels:
- traefik.enable=true
@ -100,6 +102,21 @@ services:
- source: esdatasource
target: /etc/grafana/provisioning/datasources/elasticsearch.yaml
grafana-ntfy:
image: kittyandrew/grafana-to-ntfy:master
ports:
- 8080:8080
networks:
grafana:
aliases:
- grafana-ntfy
environment:
- NTFY_URL=https://ntfy.kun.is/alerts
- NTFY_BAUTH_USER=pim
- NTFY_BAUTH_PASS=p2UfXybMxTRtEBT4FHnXzmHnvoha9ducIrTo19rK
- BAUTH_USER=admin
- BAUTH_PASS=test
fluentd:
image: git.kun.is/pim/fluentd:1.0.1
ports:

View file

@ -17,3 +17,11 @@ datasources:
jsonData:
index: 'fluentd.memory-*'
timeField: '@timestamp'
- name: diskfree
type: elasticsearch
access: proxy
url: http://maestro.dmz:{{ elasticsearch_port }}
jsonData:
index: 'fluentd.diskfree-*'
timeField: '@timestamp'

View file

@ -30,7 +30,7 @@ resource "elasticstack_elasticsearch_index_template" "metrics_template" {
name = "metrics_template"
priority = 42
index_patterns = ["fluentd.cpu*", "fluentd.memory*"]
index_patterns = ["fluentd.cpu-*", "fluentd.memory-*", "fluentd.diskfree-*"]
template {
settings = jsonencode({