-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystem_watchdog.cfg
75 lines (68 loc) · 2.08 KB
/
system_watchdog.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
; Config file for app_watchdog
; Warning: semicolons comment only at the beginning of a line
[general]
; This is the version of the config file syntax. This has to be
; the same as the major version of the script
version = 1
; Decides which actions are actually executed
; "unprimed" or 0 - no action
; "check" or 1 - only check action
; "repair" or 2 - check and repair action
; "fully primed" or 3 - all actions
primed = 1
; The loglevel determines the number of log entries. Available are:
; CRITICAL, ERROR, WARNING, INFO, DEBUG
loglevel = DEBUG
; This is the fallback action that is executed if repairing
; was unsuccessful. Can be overwritten in specific configurations
fallback action = sudo reboot
; The daemon sleeps between checks for this time in seconds
sleep time = 20
; The default timeout for determining whether repair is necessary.
; Can be overwritten in individual configurations.
timeout = 60
;[cmd]
;type = command
;command = /bin/ping -c 1 -t 10 8.8.8.8
;repair = sudo systemctl restart networking
;fallback action = ls -l
;sleep time = 5
;timeout = 30
;[template]
;type = template
;template = sensible command
;repair = touch repair
;fallback = touch fallback
[mqtt]
type = mqtt
mqtt = timeout
server = home
; port = 1883
topic = og/wohnzimmer/sensor/tele/STATE, og/wohnzimmer/sensor/tele/LWT
repair = sudo systemctl restart networking
fallback action = ls -l
;credentials = credentials.txt
;user = user
;password = passwd
sleep time = 60
timeout = 120
;[network]
;type = network
;network = eth0 wlan0
;repair = sudo systemctl restart networking
;[connect]
;type = connectivity
;connectivity = 1.2.3.4
;repair = sudo systemctl restart networking
;fallback action = ls -l
;untested
;[nodered]
;type = command
;command = /usr/bin/pgrep node-red
;repair = sudo systemctl restart nodered.service
;fallback action = ls -l
;[docker]
;type = command
;command = /usr/bin/docker inspect --format="{{.State.Running}}" "zigbee2mqtt"
;repair = /usr/local/bin/docker-compose -f ~/IOTstack/docker-compose.yml up -d zigbee2mqtt
;fallback action = /usr/local/bin/docker-compose -f ~/IOTstack/docker-compose.yml restart