Erstelle Grafana-Rolle

This commit is contained in:
phil 2022-12-27 10:43:32 +01:00
commit 9ecb9985fb
16 changed files with 258 additions and 0 deletions

View file

@ -0,0 +1,10 @@
[INCLUDES]
before = common.conf
[Definition]
failregex = ^ lvl=[a-zA-z]* msg=\"Invalid username or password\" (?:\S*=(?:\".*\"|\S*) )*remote_addr=<HOST>
ignoreregex =
[Init]
datepattern = ^t=%%Y-%%m-%%dT%%H:%%M:%%S%%z

7
files/fail2ban/jail.conf Normal file
View file

@ -0,0 +1,7 @@
[grafana]
enabled = true
findtime = 3600
bantime = 3600
port = http,https
filter = grafana
logpath = /var/log/grafana/grafana.log

8
files/grafana.monit Normal file
View file

@ -0,0 +1,8 @@
# {{ ansible_managed }}
check process grafana with pidfile /var/run/grafana/grafana-server.pid
group monitor
start program = "/bin/systemctl start grafana-server.service"
stop program = "/bin/systemctl stop grafana-server.service"
if failed host localhost port 3000 with timeout 15 seconds for 3 times within 4 cycles then restart
if 5 restarts with 5 cycles then timeout

9
files/influxdb.monit Normal file
View file

@ -0,0 +1,9 @@
# {{ ansible_managed }}
check process influxdb
matching "/usr/bin/influxd -config /etc/influxdb/influxdb.conf"
group database
start program = "/usr/sbin/service influxd start"
stop program = "/usr/sbin/service influxd stop"
if failed host localhost port 8088 with timeout 15 seconds for 3 times within 4 cycles then restart
if 5 restarts with 5 cycles then timeout