2022-12-01 14:26:54 +01:00
# Grafana OnCall
2022-06-09 16:35:04 +03:00
< img width = "400px" src = "docs/img/logo.png" >
2022-06-03 08:09:47 -06:00
2022-06-14 11:58:02 -06:00
[](https://github.com/grafana/oncall/releases)
[](https://github.com/grafana/oncall/blob/dev/LICENSE)
[](https://hub.docker.com/r/grafana/oncall/tags)
2022-06-15 12:24:44 +03:00
[](https://slack.grafana.com/)
2022-06-14 11:58:02 -06:00
[](https://github.com/grafana/oncall/discussions)
[](https://drone.grafana.net/grafana/oncall)
2022-06-14 09:14:45 -06:00
Developer-friendly incident response with brilliant Slack integration.
2022-06-09 16:29:14 +03:00
2023-04-11 18:36:46 +02:00
<!-- markdownlint - disable MD013 MD033 -->
2023-04-11 15:43:52 +03:00
< table >
< tbody >
< tr >
2023-04-20 13:26:12 +08:00
< td width = "75%" > < img src = "screenshot.png" > < / td >
< td > < div align = "center" > < a href = "https://grafana.com/docs/oncall/latest/mobile-app/" > Android & iOS< / a > :< br > < img src = "screenshot_mobile.png" > < / div > < / td >
2023-04-11 15:43:52 +03:00
< / tr >
< / tbody >
< / table >
2023-04-11 18:36:46 +02:00
<!-- markdownlint - enable MD013 MD033 -->
2022-06-09 15:58:10 +03:00
- Collect and analyze alerts from multiple monitoring systems
- On-call rotations based on schedules
- Automatic escalations
- Phone calls, SMS, Slack, Telegram notifications
2022-06-03 08:09:47 -06:00
## Getting Started
2022-11-07 16:34:43 +01:00
We prepared multiple environments:
2023-04-19 14:42:16 +05:30
- [production ](https://grafana.com/docs/oncall/latest/open-source/#production-environment )
2022-11-07 16:34:43 +01:00
- [developer ](./dev/README.md )
- hobby (described in the following steps)
2022-06-09 15:49:14 +03:00
2022-10-24 14:08:40 +01:00
1. Download [`docker-compose.yml` ](docker-compose.yml ):
2022-09-27 17:31:25 +02:00
2022-12-01 14:26:54 +01:00
```bash
curl -fsSL https://raw.githubusercontent.com/grafana/oncall/dev/docker-compose.yml -o docker-compose.yml
```
2022-06-03 08:09:47 -06:00
2022-06-09 17:47:33 +03:00
2. Set variables:
2022-09-27 17:31:25 +02:00
2022-12-01 14:26:54 +01:00
```bash
echo "DOMAIN=http://localhost:8080
2023-06-12 10:04:07 -03:00
# Remove 'with_grafana' below if you want to use existing grafana
# Add 'with_prometheus' below to optionally enable a local prometheus for oncall metrics
# e.g. COMPOSE_PROFILES=with_grafana,with_prometheus
COMPOSE_PROFILES=with_grafana
# to setup an auth token for prometheus exporter metrics:
# PROMETHEUS_EXPORTER_SECRET=my_random_prometheus_secret
# also, make sure to enable the /metrics endpoint:
# FEATURE_PROMETHEUS_EXPORTER_ENABLED=True
2022-12-01 14:26:54 +01:00
SECRET_KEY=my_random_secret_must_be_more_than_32_characters_long" > .env
```
2022-06-03 08:09:47 -06:00
2023-06-12 10:04:07 -03:00
3. (Optional) If you want to enable/setup the prometheus metrics exporter
(besides the changes above), create a `prometheus.yml` file (replacing
`my_random_prometheus_secret` accordingly), next to your `docker-compose.yml` :
```bash
echo "global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: prometheus
metrics_path: /metrics/
authorization:
2023-06-26 21:44:33 +08:00
credentials: my_random_prometheus_secret
2023-06-12 10:04:07 -03:00
static_configs:
- targets: [\"host.docker.internal:8080\"]" > prometheus.yml
```
NOTE: you will need to setup a Prometheus datasource using `http://prometheus:9090`
as the URL in the Grafana UI.
4. Launch services:
2022-09-27 17:31:25 +02:00
2022-12-01 14:26:54 +01:00
```bash
2022-12-01 16:00:19 +00:00
docker-compose pull & & docker-compose up -d
2022-12-01 14:26:54 +01:00
```
2022-06-03 08:09:47 -06:00
2023-06-12 10:04:07 -03:00
5. Go to [OnCall Plugin Configuration ](http://localhost:3000/plugins/grafana-oncall-app ), using log in credentials
2022-12-01 14:26:54 +01:00
as defined above: `admin` /`admin` (or find OnCall plugin in configuration->plugins) and connect OnCall _plugin_
with OnCall _backend_ :
2022-09-27 17:31:25 +02:00
2022-12-01 14:26:54 +01:00
```text
OnCall backend URL: http://engine:8080
```
2022-06-09 19:52:09 +03:00
2023-06-12 10:04:07 -03:00
6. Enjoy! Check our [OSS docs ](https://grafana.com/docs/oncall/latest/open-source/ ) if you want to set up
2022-12-01 14:26:54 +01:00
Slack, Telegram, Twilio or SMS/calls through Grafana Cloud.
2022-06-09 19:52:09 +03:00
2022-07-18 14:05:03 +01:00
## Update version
2022-09-27 17:31:25 +02:00
2022-07-18 14:05:03 +01:00
To update your Grafana OnCall hobby environment:
```shell
2022-09-29 13:06:33 +01:00
# Update Docker image
docker-compose pull engine
2022-07-18 14:05:03 +01:00
# Re-deploy
2022-09-29 13:06:33 +01:00
docker-compose up -d
2022-07-18 14:05:03 +01:00
```
After updating the engine, you'll also need to click the "Update" button on the [plugin version page ](http://localhost:3000/plugins/grafana-oncall-app?page=version-history ).
2022-12-01 14:26:54 +01:00
See [Grafana docs ](https://grafana.com/docs/grafana/latest/administration/plugin-management/#update-a-plugin ) for more
info on updating Grafana plugins.
2022-07-18 14:05:03 +01:00
2022-06-09 17:48:26 +03:00
## Join community
2022-12-01 14:26:54 +01:00
[<img width="200px" src="docs/img/community_call.png"> ](https://github.com/grafana/oncall/discussions/categories/community-calls )
[<img width="200px" src="docs/img/GH_discussions.png"> ](https://github.com/grafana/oncall/discussions )
[<img width="200px" src="docs/img/slack.png"> ](https://slack.grafana.com/ )
2022-06-09 17:48:26 +03:00
2022-08-09 18:18:17 +03:00
## Stargazers over time
[](https://starchart.cc/grafana/oncall)
2022-06-03 08:09:47 -06:00
## Further Reading
2022-09-27 17:31:25 +02:00
2022-11-11 13:40:43 +00:00
- _Migration from PagerDuty_ - [Migrator ](https://github.com/grafana/oncall/tree/dev/tools/pagerduty-migrator )
2023-04-19 14:42:16 +05:30
- _Documentation_ - [Grafana OnCall ](https://grafana.com/docs/oncall/latest/ )
2022-11-09 12:48:15 +02:00
- _Overview Webinar_ - [YouTube ](https://www.youtube.com/watch?v=7uSe1pulgs8 )
2022-11-02 16:58:47 +02:00
- _How To Add Integration_ - [How to Add Integration ](https://github.com/grafana/oncall/tree/dev/engine/config_integrations/README.md )
2022-09-27 17:31:25 +02:00
- _Blog Post_ - [Announcing Grafana OnCall, the easiest way to do on-call management ](https://grafana.com/blog/2021/11/09/announcing-grafana-oncall/ )
- _Presentation_ - [Deep dive into the Grafana, Prometheus, and Alertmanager stack for alerting and on-call management ](https://grafana.com/go/observabilitycon/2021/alerting/?pg=blog )