# What this PR does See [Slack discussion](https://raintank-corp.slack.com/archives/C06K1MQ07GS/p1732110700877869) for more context ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes. |
||
|---|---|---|
| .. | ||
| alertmanager.py | ||
| direct_paging.py | ||
| elastalert.py | ||
| formatted_webhook.py | ||
| grafana.py | ||
| grafana_alerting.py | ||
| inbound_email.py | ||
| kapacitor.py | ||
| legacy_alertmanager.py | ||
| legacy_grafana_alerting.py | ||
| maintenance.py | ||
| manual.py | ||
| README.md | ||
| webhook.py | ||
| zabbix.py | ||
Contribute the new Integration to OnCall
Related: DEVELOPER.md
"Integration" in OnCall is a pre-configured webhook for alert consumption from alert sources. Usually, alert sources are monitoring systems such as Grafana or Zabbix.
Integration is a set of "templates" which are dumped from the integration config once the integration is created. Further changes to "templates" don't reflect on the integration config. Read more about templates here.
This instruction is supposed to help you to build templates to integrate OnCall with a new source of alerts. If you don't want to contribute to OnCall and are looking for a help integrating with custom alert source as a user, refer to this instruction.
Files related to Integrations
- Refer to "Grafana" integration as the most complete example.
- Each integration should have a
{{integration_name_in_snake_case}}.pyfile in/engine/config_integrations. There you'll find Templates that will be copied to the Integration Templates once the integration is created by the user in the OnCall UI; Example Payload; and Tests which should match the result of the rendering of Example Payload as using Templates. The best way to build such a file is to create Webhook Integration, write & debug templates in the UI first and copy-paste them to the file after. - Each integration should be listed in the
/engine/settings/base.pyfile, sectionINSTALLED_ONCALL_INTEGRATIONS. - Each integration should have "How to connect" instruction stored as
integration_{{integration_name_in_snake_case}}.htmlin theengine/apps/integrations/htmlfolder..pyfile has aslugfield that is used to locate.htmlfile.
What do we expect from high-quality integration?
- User-friendly integration instruction.
- Proper grouping following source's logics. If source generates multiple alerts per "detection" it would be nice to provide suitable grouping & resolving configuration in the templates.
- Awesome rendering. We all love when alerts look good in Slack, SMS and all other rendering destinations.