Extension ckanext-push-errors


Extension Basics

Title
ckanext-push-errors
Name
ckanext-push-errors
Type
Public extension
Description
CKAN extension to push critical error to external URLs (like Slack)
CKAN versions

~2.10, ~2.11

Show details
Download-Url (zip)
Last commit
7 months ago (2025-05-22 03:12:42)
Url to repo
Category
Data Management & Quality


Background Infos

Description (long)
Show details

CKAN extension to push critical error to external URLs (like Slack).

Version
0.1.6
Version release date
2025-05-22
Contact name
(not set)
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

o install ckanext-push-errors:

pip install -e git+https://github.com/unckan/ckanext-push-errors.git@TAG-VERSION#egg=ckanext-superset pip install -r https://raw.githubusercontent.com/unckan/ckanext-push-errors/refs/tags/TAG-VERSION/requirements.txt

Then add push_errors to the ckan.plugins setting in your CKAN config file. IMPORTANT: Add the push_errors plugin as the first one in the list to ensure that all errors are captured.

Plugins to configure (ckan.ini)
push_errors
CKAN Settings (ckan.ini)
# Available settings. Many of them can be formatted with context values:
ckanext.push_errors.url=http://myserver.com: The URL to push the message
ckanext.push_errors.method=POST: The method to use (POST or GET only)
ckanext.push_errors.headers='{"Authorization": "Token 123"}': A JSON string with the headers to send
ckanext.push_errors.data='{"message": "{message}"}': A JSON string with the data to send
ckanext.push_errors.title="PUSH_ERROR v{push_errors_version} - CKAN {ckan_version}\n{now}\n\n": The title (first part) of the message
ckanext.push_errors.traceback_length=4000: The maximum length of the traceback information. Default is 4000.
ckanext.push_errors.max_messages_minute=3: The maximum number of messages to send in a minute
ckanext.push_errors.max_messages_hour=10: The maximum number of messages to send in an hour

# Config settings for known platforms

#Slack
# You can post all errors to a Slack channel. You'll need to create a webhook in Slack. Then use the following settings:
ckanext.push_errors.url=https://hooks.slack.com/services/T02XXXXXX/B061XXXXXX/GASXXXxxxXXXxxx (something like this).
ckanext.push_errors.method=POST
ckanext.push_errors.headers={}
ckanext.push_errors.data={"text": "{message}", "username": "CKAN PUSH ERRORS", "icon_url": "https://github.com/unckan/ckanext-push-errors/raw/main/icons/server-error.png"}: Slack requires the text field to be present.

# To create a webhook in Slack:
#    Create a new channel if you want to send this notifications to a new channel. If not, you can use any existing channel.
#    Good look with this incredible complex way to create a webhook: https://api.slack.com/messaging/webhooks
#    Probably going to https://api.slack.com/apps/YOUR-APP-ID/incoming-webhooks URL will help you.
DB migration to be executed
(not set)
<< back to Extensions