Creating a Webhook

Webhooks are web pages developed by you that support the processing of alert information sent by Hitflow. When you create a contact that can receive alerts, you can choose to send via "Webhook". When choosing this option, you will need to specify the URL of the page that will automatically process the alert.

  • Summary

List of alerts

To date, a Webhook can receive data for the following events:

  • The availability status of a website (or server) indicating whether it has been disrupted or is functional again.
  • Information about how a server's resources are used when a threshold is exceeded.
  • The status of an SSL Certificate following a change in its validity or in an attribute of which it is composed.
  • The upcoming expiration of a domain name or the modification of the registry.

For each event, a certain amount of data is transmitted allowing you to process each type of alert.

Security of exchanges

To secure access to the page receiving the events, we recommend, on the one hand, to use the HTTPS protocol with a valid SSL certificate and, on the other hand, to limit access to this page thanks to the authentication token available in the request header.

Webhook authentication token

The contact authentication token will be generated when you register a URL for a webhook method. This 32-character string is then available in the "Alert settings" section of the contact edit form.

When sending an alert to the webhook, the authentication token will be sent in the "Hitflow-Webhook-Token" header of the request.

If you add more than one Webhook to a contact, note that the token will be the same for all of them.

How do I generate a new token?

In case you want to generate a new authentication token for the contact, you have to remove all "webhook" methods and register a first time.

Once the modification is taken into account, add a new method of type "Webhook", fill in the URL address and save the modification. A new authentication token will then be generated and available in the contact form in the "Alert settings" section.

Data sent to the webhook

Data sent to the Webhook is stored in a JSON format object. The structure of the object may vary depending on the type of event sent.

This type is defined in the attribute named "event_type" and can have the following values :

  • uptime
  • server
  • certificate
  • domain

For each event, a certain amount of data is transmitted allowing you to process each type of alert.

Uptime alerts

Following an availability test, an alert with the data below can be sent to the Webhook

Name Type Description
event_type String The value of this attribute is always "uptime"
event_status String The value is "down" for an unavailable service and "up" when access is possible again
id String Test identifier in our database
name String Name of the test defined in your manager
type String Test Type : ICMP, TCP, HTTP, HTTPS
host String IP address or domain name
port Int Connection port
status Int Numeric code indicating the status of the service
down_since Int Date and time (timestamp) from which the service was detected as unavailable
up_since Int Date and time (timestamp) at which the service is back online
message String Contains the alert message sent to the contact

Server alerts

Server alerts are sent when a server report is received and the status of the server is changed or when no report has been received for too long.

Name Type Description
event_type String The value of this attribute is always "server"
event_status String The value is "down" for an unavailable server and "up" when access is possible again
id String Server identifier in our database
name String Server name defined in your manager
os String Server operating system
remote_addr String Server IP address
status Int Numeric code indicating the status of the server
down_since Int Date and time (timestamp) at which the server was detected as being in error
up_since Int Date and time (timestamp) at which the server is operational again
message String Contains the alert message sent to the contact

SSL Certificate Alerts

In the case of a change in the status of a certificate (valid/invalid), a change in an attribute that makes up the SSL certificate is modified or the certificate is about to or has expired, an alert is then sent to the webhook.

Name Type Description
event_type String The value of this attribute is always "certificate"
event_status String The value can be :
  • invalid : when an error renders the certificate invalid
  • valide : when a certificate is revalidated
  • expired : when the validity date has passed
  • reminder : when the validity date of the SSL Certificate reaches a user-defined alert threshold
id String SSL certificate test ID in our database
name String Name of the SSL certificate test defined in your manager
url String URL with which the test is performed
status Int Numeric code indicating the status of the SSL Certificate
down_since Int Date and time (timestamp) at which the SSL Certificate was detected as an error.
up_since Int Date and time (timestamp) at which the SSL Certificate is valid again
message String Contains the alert message sent to the contact.

If "event_status" is set to "reminder", the attributes "down_since" and "up_since" do not exist and are replaced by "time_expire" indicating the date on which the domain name will expire.

Domain name alerts

An alert is sent to the webhook in cases where a domain name sees one of its attributes modified, that it is about to or has expired or that a problem relating to its resolution is detected.

Name Type Description
event_type String The value of this attribute is always "domain"
event_status String The value can be :
  • ok : when the domain name is again in a "valid" state
  • onchange : when one or more attributes of the certificate have been modified
  • reminder : when the validity date of the domain name reaches a user-defined alert threshold
id String Identifier of the domain name test in our database
name String Name of the domain name test defined in your manager
domain_name String Domain name on which the test is performed
status Int Numeric code indicating the status of the domain name
down_since Int Date and time (timestamp) from which the domain name was detected in error
up_since Int Date and time (timestamp) from which the domain name is again in an "Ok" state
message String Contains the alert message sent to the contact

If "event_status" is set to "reminder", the attributes "down_since" and "up_since" do not exist and are replaced by "time_expire" indicating the date on which the domain name will expire.