@@ -23,7 +23,7 @@ func waitForTerm(sigChan <-chan os.Signal) {
23
23
<- sigChan
24
24
25
25
if config .MonitorWebhook != "" {
26
- hook := exec .Command ("curl" , "-H" , "Content-type: application/json" , "-d" , `{"content": "stopped monitoring "}` ,
26
+ hook := exec .Command ("curl" , "-H" , "Content-type: application/json" , "-d" , `{"content": "👋 "}` ,
27
27
config .MonitorWebhook )
28
28
hook .Run ()
29
29
}
@@ -88,7 +88,7 @@ func fromDownToUp(serverAddress string) {
88
88
fmt .Printf (theme .ColorGreen + "\r [conn]" + theme .ColorReset + " ⤴️: %v\n " , time .Now ().UTC ())
89
89
90
90
if config .MonitorWebhook != "" {
91
- msg := fmt .Sprintf (`{"content": "[conn] ⤴️: %s"}` , serverAddress )
91
+ msg := fmt .Sprintf (`{"content": "⤴️ %s"}` , serverAddress )
92
92
hook := exec .Command ("curl" , "-H" , "Content-type: application/json" , "-d" , msg ,
93
93
config .MonitorWebhook )
94
94
hook .Run ()
@@ -99,7 +99,7 @@ func fromUpToDown(serverAddress string) {
99
99
fmt .Printf (theme .ColorRed + "\r [down]" + theme .ColorReset + " ⤵️: %v\n " , time .Now ().UTC ())
100
100
101
101
if config .MonitorWebhook != "" {
102
- msg := fmt .Sprintf (`{"content": "[down] ⤵️: %s"}` , serverAddress )
102
+ msg := fmt .Sprintf (`{"content": "⤵️ %s"}` , serverAddress )
103
103
hook := exec .Command ("curl" , "-H" , "Content-type: application/json" , "-d" , msg ,
104
104
config .MonitorWebhook )
105
105
hook .Run ()
@@ -140,7 +140,7 @@ func Monitor(args []string) {
140
140
fmt .Printf (theme .ColorGray + "interval: " + theme .ColorYellow + "%v seconds" + theme .ColorReset + "\n " , montitorScanInterval )
141
141
142
142
if config .MonitorWebhook != "" {
143
- msg := fmt .Sprintf (`{"content": "starting monitoring: %s"}` , serverAddress )
143
+ msg := fmt .Sprintf (`{"content": "📡 %s"}` , serverAddress )
144
144
hook := exec .Command ("curl" , "-H" , "Content-type: application/json" , "-d" , msg ,
145
145
config .MonitorWebhook )
146
146
hook .Run ()
0 commit comments