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 e4fec5dd4e
4 changed files with 34 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={{ ntfy_password }}
- 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

@ -0,0 +1,8 @@
ntfy_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
36333232393635383732336630626463633038353862333430396437333733376239343531663339
6364643930636566326463393963316263323061613032350a383930376537373437633333623639
66613439636531393761366534333134383231303637643063633537393535356536636530666665
6537653731666130610a346135373562333931646237396233613065353165623336373935386137
36313830623931313238333430346238626562353661616465333736346230396162386137363435
3362636565336639643832626165613236643466633537633236

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({