{% extends "base.html" %} {% load compress humanize static hc_extras %} {% block title %}Add Webhook - {% site_name %}{% endblock %} {% block content %}

Webhook

Runs a HTTP GET or HTTP POST to your specified URL when a check goes up or down. Uses GET by default, and uses POST if you specify any POST data.

You can use the following variables in webhook URLs:

Variable Will be replaced with…
$CODE The UUID code of the check
$NAME Name of the check
$NOW Current UTC time in ISO8601 format. Example: "{{ now }}"
$STATUS Check's current status ("up" or "down")
$TAG1, $TAG2, … Value of the first tag, the second tag, …

For example, a callback URL using variables might look like so:

http://requestb.in/1hhct291?message=$NAME:$STATUS

After encoding and replacing the variables, {% site_name %} would then call:

http://requestb.in/1hhct291?message=My%20Check:down

Integration Settings

{% csrf_token %}
{% if form.url_down.errors %}
{{ form.url_down.errors|join:"" }}
{% endif %}
{% if form.url_up.errors %}
{{ form.url_up.errors|join:"" }}
{% endif %}
{% if form.post_data.errors %}
{{ form.post_data.errors|join:"" }}
{% endif %}
{% for k, v in form.headers.items %}
{% endfor %}
{% if form.invalid_header_names %}
Please use valid HTTP header names.
{% endif %}
{% endblock %} {% block scripts %} {% compress js %} {% endcompress %} {% endblock %}