9.1.2.11. GeoHealthCheck.notifications

9.1.2.11.1. Module Contents

9.1.2.11.1.1. Functions

do_email(config, resource, run, status_changed, result)

_parse_line(_line)

_parse_webhook_location(value)

Parse Recipient.location and returns tuple of url and params

do_webhook(config, resource, run, status_changed, result)

Process webhook recipients for resource

notify(config, resource, run, last_run_success)

execute a notification

9.1.2.11.1.2. Attributes

LOGGER

GeoHealthCheck.notifications.LOGGER
GeoHealthCheck.notifications.do_email(config, resource, run, status_changed, result)
GeoHealthCheck.notifications._parse_line(_line)
GeoHealthCheck.notifications._parse_webhook_location(value)

Parse Recipient.location and returns tuple of url and params

location should be in form

URL

PAYLOAD

where PAYLOAD is a list of fields and values in form

FIELD_NAME=FIELD_VALUE

alternatively, it can be dictionary serialized as json

GeoHealthCheck.notifications.do_webhook(config, resource, run, status_changed, result)

Process webhook recipients for resource

location should be in format:

URL

[PAYLOAD]

There’s blank line between URL and PAYLOAD. PAYLOAD should be either json or list of field=value items in each line.

Webhook’s request is POST send to url with payload containing PAYLOAD and fields:

ghc.result=(result of test) ghc.resource.url=(url of resource) ghc.resource.title=(title of resource)

GeoHealthCheck.notifications.notify(config, resource, run, last_run_success)

execute a notification