-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.config.yaml
116 lines (106 loc) · 2.75 KB
/
sample.config.yaml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
targets:
- name: "Test Server"
ip: "127.0.0.1"
cron: "*/5 * * * *"
strategy: status-code
https: false
ports:
- port: 8000
notify:
- via: telegram
chat: go-alive-test-group
from: go-alive-test-bot
template: ""
- port: 8010
notify:
rules:
- failures: ">0"
notify:
- via: telegram
chat: go-alive-test-group
from: go-alive-test-bot
template: >
IP: {{.Host}}
Scan Type: {{.Strategy}}
Scan summary:
{{range .Results}}
port: {{.Port}}
reachable: {{.IsReachable}}
------------{{end}}
- via: telegram
chat: go-alive-test-group
from: go-alive-test-bot
template: >
IP: {{.Host}}
Scan Type: {{.Strategy}}
Scan summary:
{{range .Results}}
port: {{.Port}}
reachable: {{.IsReachable}}
------------{{end}}
- via: slack
channel: go-alive-test-group
from: go-alive-test-bot
template: >
IP: {{.Host}}
Scan Type: {{.Strategy}}
Scan summary:
{{range .Results}}
port: {{.Port}}
reachable: {{.IsReachable}}
{{ if .Error }}
error:
{{ .Error }}
{{end}}
------------
{{end}}
- via: email
from: "tibebe"
to: test@gmail.com
subject: "Go-Alive Test Report"
template: >
IP: {{.Host}}
Scan Type: {{.Strategy}}
Scan summary:
{{range .Results}}
port: {{.Port}}
reachable: {{.IsReachable}}
{{ if .Error }}
error:
{{ .Error }}
{{end}}
------------
{{end}}
notifications:
telegram:
bots:
- name: "go-alive-test-bot"
token: "123456:bot-token"
chats:
- name: "go-alive-test-group"
chatid: 1123232322
- name: "tibebe"
chatid: 12345678
email:
smtp:
- name: "tibebe"
sender: "test@gmail.com"
auth:
username: "test@gmail.com"
password: "password"
server: "smtp.gmail.com"
port: 587
slack:
apps:
- name: "go-alive-test-bot"
token: "bot user token"
channels:
- name: "go-alive-test-group"
channelid: 'channel id'
webhook:
- name: "webhook api"
endpoint: "http://localhost:8000"
auth:
endpoint: "http://localhost:7000"
email: "test@gmail.com"
password: "password"