add support for diskfree
add sidecar for ntfy alerts for grafana
This commit is contained in:
parent
cfa1a623c0
commit
e4fec5dd4e
4 changed files with 34 additions and 1 deletions
|
@ -4,6 +4,7 @@ version: "3.8"
|
||||||
networks:
|
networks:
|
||||||
traefik:
|
traefik:
|
||||||
external: true
|
external: true
|
||||||
|
grafana:
|
||||||
|
|
||||||
configs:
|
configs:
|
||||||
esdatasource:
|
esdatasource:
|
||||||
|
@ -80,6 +81,7 @@ services:
|
||||||
image: grafana/grafana-oss
|
image: grafana/grafana-oss
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- traefik
|
||||||
|
- grafana
|
||||||
deploy:
|
deploy:
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
|
@ -100,6 +102,21 @@ services:
|
||||||
- source: esdatasource
|
- source: esdatasource
|
||||||
target: /etc/grafana/provisioning/datasources/elasticsearch.yaml
|
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:
|
fluentd:
|
||||||
image: git.kun.is/pim/fluentd:1.0.1
|
image: git.kun.is/pim/fluentd:1.0.1
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -17,3 +17,11 @@ datasources:
|
||||||
jsonData:
|
jsonData:
|
||||||
index: 'fluentd.memory-*'
|
index: 'fluentd.memory-*'
|
||||||
timeField: '@timestamp'
|
timeField: '@timestamp'
|
||||||
|
|
||||||
|
- name: diskfree
|
||||||
|
type: elasticsearch
|
||||||
|
access: proxy
|
||||||
|
url: http://maestro.dmz:{{ elasticsearch_port }}
|
||||||
|
jsonData:
|
||||||
|
index: 'fluentd.diskfree-*'
|
||||||
|
timeField: '@timestamp'
|
||||||
|
|
8
ansible/roles/monitoring/vars/main.yml
Normal file
8
ansible/roles/monitoring/vars/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
ntfy_password: !vault |
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
36333232393635383732336630626463633038353862333430396437333733376239343531663339
|
||||||
|
6364643930636566326463393963316263323061613032350a383930376537373437633333623639
|
||||||
|
66613439636531393761366534333134383231303637643063633537393535356536636530666665
|
||||||
|
6537653731666130610a346135373562333931646237396233613065353165623336373935386137
|
||||||
|
36313830623931313238333430346238626562353661616465333736346230396162386137363435
|
||||||
|
3362636565336639643832626165613236643466633537633236
|
|
@ -30,7 +30,7 @@ resource "elasticstack_elasticsearch_index_template" "metrics_template" {
|
||||||
name = "metrics_template"
|
name = "metrics_template"
|
||||||
|
|
||||||
priority = 42
|
priority = 42
|
||||||
index_patterns = ["fluentd.cpu*", "fluentd.memory*"]
|
index_patterns = ["fluentd.cpu-*", "fluentd.memory-*", "fluentd.diskfree-*"]
|
||||||
|
|
||||||
template {
|
template {
|
||||||
settings = jsonencode({
|
settings = jsonencode({
|
||||||
|
|
Reference in a new issue