Grafana OnCall engine fork — self-hosted on-call scheduler and alert router
Find a file
Joey Orlando 7ebc9cbbf7
modify push notification settings + use fcm-django library (#998)
- swaps out `django-push-notifications` for
[`fcm-django`](https://github.com/grafana/fcm-django). Again.. this is a
fork of the parent repo for exactly the same reason.. the migrations
point to `auth_user` without letting us use our own user model, this has
been patched in the `grafana` fork. The reason why we are using
`fcm-django` vs `django-push-notifications` is that the latter does not
support the new FCM API, only the "legacy" API. The legacy FCM API does
not support certain push notification settings that we would like to
use.
- modifies the iOS/Android specific push notification settings
- adds a `flower` pod in the `docker-compose-developer.yml`, useful for
debugging tasks locally
- sets the mobile app verification token TTL to 5 minutes when
developing locally. The default of 1 minute makes working with device
emulators really tricky..

This PR also swaps out the base image in `engine/Dockerfile` from
`python:3.9-alpine3.16` to `python:3.9-slim-buster`.

As to why.. in short, with the introduction of the `fcm-django` library
there is now a peer-dependency on
[`grpcio`](https://github.com/grpc/grpc) (which is used by
`firebase_admin`.. which I am using in this PR to interact directly with
Firebase Cloud Messaging (FCM)). `grpcio` does not publish wheels (read:
compiled binaries) for the Alpine distro. It does publish wheels for
Debian and hence `pip install -r requirements.txt` does not need to
build this library from the source distribution.

This is a [known
"issue"](https://github.com/grpc/grpc/issues/22815#issuecomment-1107874367)
and the recommended solution in the community is to.. not use alpine.

These were the numbers, when building the image locally, in terms of
image size and build time:

| | Local image size (uncompressed | Build time (may differ based on
your network speed) |
| ------------------------- | -------------------------------------- |
---------- |
| `python:3.9-alpine3.16`   | 785MB  | 320s |
| `python:3.9-slim-buster` | 1.05GB  | 90s   |

Co-authored-by: Salvatore Giordano <salvatoregiordanoo@gmail.com>
2022-12-20 12:41:34 +01:00
.github modify push notification settings + use fcm-django library (#998) 2022-12-20 12:41:34 +01:00
dev modify push notification settings + use fcm-django library (#998) 2022-12-20 12:41:34 +01:00
docs add precommit rules for markdown/json files (#915) 2022-12-01 14:26:54 +01:00
engine modify push notification settings + use fcm-django library (#998) 2022-12-20 12:41:34 +01:00
examples/terraform Terraform examples 2022-08-11 14:32:39 +05:00
grafana-plugin modify push notification settings + use fcm-django library (#998) 2022-12-20 12:41:34 +01:00
helm Make job-migrate ttlSecondsAfterFinished customizable (#957) 2022-12-07 09:10:10 +01:00
tools Increasing library default timeout (#1005) 2022-12-16 13:09:04 +02:00
.drone.yml Update .drone.yml signature 2022-11-09 14:53:35 -03:00
.gitignore enterprise dev changes + few other small changes (#802) 2022-11-09 07:21:33 +01:00
.markdownlint.json add precommit rules for markdown/json files (#915) 2022-12-01 14:26:54 +01:00
.nvmrc One startup command to rule them all (#760) 2022-11-07 16:34:43 +01:00
.pre-commit-config.yaml add precommit rules for markdown/json files (#915) 2022-12-01 14:26:54 +01:00
CHANGELOG.md add make command to configure mobile app feature (#988) 2022-12-14 09:36:35 +01:00
CODE_OF_CONDUCT.md add precommit rules for markdown/json files (#915) 2022-12-01 14:26:54 +01:00
docker-compose-developer.yml modify push notification settings + use fcm-django library (#998) 2022-12-20 12:41:34 +01:00
docker-compose-mysql-rabbitmq.yml Get rid of installation token + add a bunch of tests (#624) 2022-11-21 16:26:00 +01:00
docker-compose.yml Get rid of installation token + add a bunch of tests (#624) 2022-11-21 16:26:00 +01:00
GOVERNANCE.md add precommit rules for markdown/json files (#915) 2022-12-01 14:26:54 +01:00
LICENSE World, meet OnCall! 2022-06-03 08:09:47 -06:00
LICENSING.md add precommit rules for markdown/json files (#915) 2022-12-01 14:26:54 +01:00
MAINTAINERS.md add precommit rules for markdown/json files (#915) 2022-12-01 14:26:54 +01:00
Makefile modify push notification settings + use fcm-django library (#998) 2022-12-20 12:41:34 +01:00
README.md docker-compose small fixes (#930) 2022-12-01 16:00:19 +00:00
screenshot.png Merge dev to main (#54) 2022-06-13 16:39:58 -06:00
SECURITY.md add precommit rules for markdown/json files (#915) 2022-12-01 14:26:54 +01:00

Grafana OnCall

Latest Release License Docker Pulls Slack Discussion Build Status

Developer-friendly incident response with brilliant Slack integration.

  • Collect and analyze alerts from multiple monitoring systems
  • On-call rotations based on schedules
  • Automatic escalations
  • Phone calls, SMS, Slack, Telegram notifications

Getting Started

We prepared multiple environments:

  1. Download docker-compose.yml:

    curl -fsSL https://raw.githubusercontent.com/grafana/oncall/dev/docker-compose.yml -o docker-compose.yml
    
  2. Set variables:

    echo "DOMAIN=http://localhost:8080
    COMPOSE_PROFILES=with_grafana  # Remove this line if you want to use existing grafana
    SECRET_KEY=my_random_secret_must_be_more_than_32_characters_long" > .env
    
  3. Launch services:

    docker-compose pull && docker-compose up -d
    
  4. Go to OnCall Plugin Configuration, using log in credentials as defined above: admin/admin (or find OnCall plugin in configuration->plugins) and connect OnCall plugin with OnCall backend:

    OnCall backend URL: http://engine:8080
    
  5. Enjoy! Check our OSS docs if you want to set up Slack, Telegram, Twilio or SMS/calls through Grafana Cloud.

Update version

To update your Grafana OnCall hobby environment:

# Update Docker image
docker-compose pull engine

# Re-deploy
docker-compose up -d

After updating the engine, you'll also need to click the "Update" button on the plugin version page. See Grafana docs for more info on updating Grafana plugins.

Join community

Stargazers over time

Stargazers over time

Further Reading