Update defaults and add tests for them
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
check_interval = "1s"
|
||||
default_alert_down = ["log_command"]
|
||||
default_alert_after = 1
|
||||
default_alert_every = 0
|
||||
default_alert_after = 2
|
||||
|
||||
monitor "Default" {
|
||||
command = ["echo"]
|
||||
}
|
||||
|
||||
monitor "Command" {
|
||||
command = ["echo", "$PATH"]
|
||||
|
||||
@@ -8,6 +8,11 @@ alert "log_shell" {
|
||||
shell_command = "echo \"Failure on {{.MonitorName}} User is $USER\""
|
||||
}
|
||||
|
||||
monitor "Default" {
|
||||
command = ["echo"]
|
||||
alert_down = ["log_command"]
|
||||
}
|
||||
|
||||
monitor "Command" {
|
||||
command = ["echo", "$PATH"]
|
||||
alert_down = ["log_command", "log_shell"]
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
check_interval: 1s
|
||||
|
||||
monitors:
|
||||
- name: Command
|
||||
command: ["echo", "$PATH"]
|
||||
alert_down: ["log_command", "log_shell"]
|
||||
alert_every: 0
|
||||
check_interval: 10s
|
||||
- name: Shell
|
||||
command: >
|
||||
echo 'Some string with stuff';
|
||||
echo 'another line';
|
||||
echo $PATH;
|
||||
exit 1
|
||||
alert_down: ["log_command", "log_shell"]
|
||||
alert_after: 5
|
||||
alert_every: 0
|
||||
check_interval: 1m
|
||||
|
||||
alerts:
|
||||
log_command:
|
||||
command: ["echo", "regular", '"command!!!"', "{{.MonitorName}}"]
|
||||
log_shell:
|
||||
command: echo "Failure on {{.MonitorName}} User is $USER"
|
||||
Reference in New Issue
Block a user