-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
52 lines (51 loc) · 1.33 KB
/
config.yaml
File metadata and controls
52 lines (51 loc) · 1.33 KB
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
jobs:
- name: "Test HTTP Check"
description: "Check if a website is accessible"
schedule:
type: "frequency"
data:
daysOfWeek: [1, 1, 1, 1, 1, 1, 1]
intervalInSeconds: 10
action:
plugin: "bash_check"
script: |
echo "testing job"
if curl -s -o /dev/null -w "%{http_code}" https://httpbin.org/status/200 | grep -q "200"; then
res=`curl -s -o /dev/null -w "%{http_code}" https://httpbin.org/status/200`
echo "res " $res
exit 0
else
exit 1
fi
decision_logic: >
{
"if": [
{
"==": [{"var": "bash_check_result.exit_code"}, 0]
},
"GOOD",
"BAD"
]
}
- name: "Test Strict Schedule"
description: "Test job with strict schedule"
schedule:
type: "strict"
data:
daysOfWeek: [1, 1, 1, 1, 1, 1, 1]
atUTC: ["12:00:00", "14:00:00"]
action:
plugin: "bash_check"
script: |
echo "Running at $(date)"
exit 0
decision_logic: >
{
"if": [
{
"==": [{"var": "bash_check_result.exit_code"}, 0]
},
"GOOD",
"BAD"
]
}