8 Event notification
45
8.2.4
Webhook notifications
Web hooks notifications send preconfigured POST HTTP requests to URLs.
• recipient URL — the URL to send a request to (must be an HTTP or HTTPS URL);
• content type — the type of content representation to use (must be "json" for JSON or "urlencoded" for URL-
encoded).
Recepient URLs must contain regular public IP addresses, or hostnames which resolve to them. In particular, the
following IPv4 ranges are prohibited from use due to possible security implications:
0.0.0.0/8
10.0.0.0/8
100.64.0.0/10
127.0.0.0/8
169.254.0.0/16
172.16.0.0/12
192.0.0.0/24
192.0.2.0/24
198.51.100.0/24
203.0.113.0/24
192.88.99.0/24
192.168.0.0/16
198.18.0.0/15
224.0.0.0/4
240.0.0.0/4
255.255.255.255/32
Additionally, URLs containing non-default privileged (
<
1024) ports are restricted as well.
The request payload (content) is a key-value map with the following keys:
•
type
— the
id
of the event type;
•
severity
— the severity label for the event (one of the strings "emergency", "alert", "critical", "error",
"warning", "notice", "info" or "debug");
•
message
— the human-readable message of the event type;
If present, the
properties
event property is used to populate the payload with additional items; for instance,
an action
properties={time=os.time()}
will result in a
time
key being added. Non-string values will be
JSON-encoded (regardless of the content type).
If present, the
headers
event property is used to add HTTP headers to the request being sent.
If present, the
message_short
event property is used for the message; otherwise,
message
is used.
If present, the
timeout
property can be used to specify the time limit, in seconds, for the notification operation to
complete. Consider increasing it, by specifying a higher value in the rule action, if you experience frequent timeouts.
Event properties
client_cert
and
client_key
can be used to specify a pair of client certificate/key files
if HTTPS is used. The
ca_root
event property, if present, can be used to specify the set of trusted CA root
certificates (it may point to a single file listing all of them, or to a directory containing the certificate files in OpenSSL
format, and defaults to
/etc/ssl/certs
).
DLI LPC9 User’s Guide: 1.7.24.0
Содержание LPC9
Страница 1: ...DLI LPC9 User s Guide 1 7 24 0 ...
Страница 81: ......