-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhttp-request-ntfy.yaml
30 lines (30 loc) · 986 Bytes
/
http-request-ntfy.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
# do a HTTP PUT request on the ntfy API
# parameters:
# log_text: String that will be logged
# ntfy_title: Alert title
# ntfy_priority: Message priority
# ntfy_tags: Message tags
# ntfy_body: Message body
# no retry magic for failed http requests here
- logger.log:
format: ${log_text}
level: INFO
- http_request.send:
method: PUT
url: !secret ntfy_url
verify_ssl: false
headers:
Title: ${ntfy_title}
Priority: ${ntfy_priority}
Tags: ${ntfy_tags}
message: ${ntfy_body}
Attach: "https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExZGVpb2d5ZHRpbW5ieWxlZTFnemhuNGIxdjA2NGFncWphbTZwYnBzZyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/0D502jOYTL23C33xV0/giphy.gif"
Filename: "alarm.gif"
on_response:
then:
- logger.log:
format: 'Response status: %d, Duration: %u ms'
args:
- status_code
- duration_ms
level: INFO