Skip to main content

Docker Webhooks

When launching the docker image you can configure it to "callback" to a web-based URL when certain events occur. For instance, you can have it call an HTTP URI when sessions are queued or rejected.

For each URL, when the associated event happens, browserless will do a GET call on the provided URL. It doesn't listen to responses or failures, however it's a good idea to answer it back immediately to close any open connections.

Below is a list of all possible options. Be sure to check back often and see when more are added!

Queuing

Setting a QUEUE_ALERT_URL will trigger the image to call the specified URL when queuing begins to happen. You can set this to any HTTP URL as seen below:

$ docker run -d \
--restart always \
--name browserless \
-e "QUEUE_ALERT_URL=https://my.website.com/queued" \
-p 3000:3000 \
registry.browserless.io/browserless/browserless/enterprise:latest

Rejections

Setting a REJECT_ALERT_URL will trigger the image to call the specified URL when rejections begin to happen. You can set this to any HTTP URL as seen below:

$ docker run -d \
--restart always \
--name browserless \
-e "REJECT_ALERT_URL=https://my.website.com/rejected" \
-p 3000:3000 \
registry.browserless.io/browserless/browserless/enterprise:latest

Timeouts

Setting a TIMEOUT_ALERT_URL will trigger the image to call the specified URL when time-outs begin to happen. You can set this to any HTTP URL as seen below:

$ docker run -d \
--restart always \
--name browserless \
-e "TIMEOUT_ALERT_URL=https://my.website.com/time-out" \
-p 3000:3000 \
registry.browserless.io/browserless/browserless/enterprise:latest

Errors

Setting an ERROR_ALERT_URL will trigger the image to call the specified URL when unhandled errors occur during request processing. You can set this to any HTTP URL as seen below:

$ docker run -d \
--restart always \
--name browserless \
-e "ERROR_ALERT_URL=https://my.website.com/error" \
-p 3000:3000 \
registry.browserless.io/browserless/browserless/enterprise:latest

This webhook is triggered when the limiter encounters errors during job execution. The error message is passed as a parameter to the webhook URL, allowing you to track what specific errors are occurring in your browserless instance.

Health Failure

Setting a FAILED_HEALTH_URL will trigger the image to call a the specified URL when the health of the instance is critical (over 99% on CPU and memory). You can use this event to potentially restart the image or replace it.

$ docker run -d \
--restart always \
--name browserless \
-e "FAILED_HEALTH_URL=https://my.website.com/failed-health" \
-p 3000:3000 \
registry.browserless.io/browserless/browserless/enterprise:latest

If you're looking for webhooks for other events, please let us know.