diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dbcecb8..5d06fe2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,15 @@ # Change Log -## v1.0.50 (TBD) +## v1.0.51 (TBD) + - Allow use of API keys as alternative to account auth token for Twilio +## v1.0.50 (2022-11-03) + +- Updates to documentation +- Improvements to web schedules +- Bug fixes + ## v1.0.49 (2022-11-01) - Enable SMTP email backend by default diff --git a/DEVELOPER.md b/DEVELOPER.md index e65f186a..f85cf648 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -20,6 +20,8 @@ ## Developer quickstart +Related: [How to develop integrations](/engine/config_integrations/README.md) + ### Code style - [isort](https://github.com/PyCQA/isort), [black](https://github.com/psf/black) and [flake8](https://github.com/PyCQA/flake8) are used to format backend code diff --git a/README.md b/README.md index 08019328..96455f6e 100644 --- a/README.md +++ b/README.md @@ -87,5 +87,6 @@ See [Grafana docs](https://grafana.com/docs/grafana/latest/administration/plugin - _Migration from the PagerDuty_ - [Migrator](https://github.com/grafana/oncall/tree/dev/tools/pagerduty-migrator) - _Documentation_ - [Grafana OnCall](https://grafana.com/docs/grafana-cloud/oncall/) +- _How To Add Integration_ - [How to Add Integration](https://github.com/grafana/oncall/tree/dev/engine/config_integrations/README.md) - _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) diff --git a/docs/Makefile b/docs/Makefile index e66f1c1c..3762a58d 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -8,4 +8,4 @@ pull: .PHONY: docs docs: pull - docker run -v '$(shell pwd)/sources:$(CONTENT_PATH):Z' -p $(PORT) --rm -it $(IMAGE) + docker run -v '$(shell pwd)/sources:$(CONTENT_PATH):Z' -v '$(shell pwd)/sources:/jugo/content/docs/grafana-cloud/oncall:Z' -p $(PORT) --rm -it $(IMAGE) diff --git a/docs/sources/_index.md b/docs/sources/_index.md index 29928422..04026cb9 100644 --- a/docs/sources/_index.md +++ b/docs/sources/_index.md @@ -1,7 +1,7 @@ --- aliases: - - /docs/grafana-cloud/oncall/ - /docs/oncall/latest/ +canonical: https://grafana.com/docs/oncall/latest/ keywords: - Grafana Cloud - Alerts @@ -11,7 +11,6 @@ keywords: - OnCall - irm title: Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/" weight: 1000 --- @@ -22,7 +21,7 @@ weight: 1000 Grafana OnCall is an open source incident response management tool built to help teams improve their collaboration and resolve incidents faster. Some of the core strengths of Grafana OnCall include: -- **Support for a broad set of monitoring systems:** Grafana OnCall supports integrations with many monitoring systems, including Grafana, Prometheus, AlertManager, Zabbix, and more. +- **Support for a broad set of monitoring systems:** Grafana OnCall supports integrations with many monitoring systems, including Grafana, Prometheus, Alertmanager, Zabbix, and more. - **Reduce alert noise:** Automatic alert grouping helps avoid alert storms and reduce noise during incidents. Auto-resolve settings can resolve without human intervention when the resolve conditions are met, enabling you to control alert noise and reduce alert fatigue. - **Automatic escalation to on-call rotations:** Grafana OnCall’s flexible calendar integration allows you to define your on-call rotations while managing on-call schedules in your preferred calendar application with iCal format. Configurable alert escalation automatically escalates alerts to on-call team members, notifies slack channels, and more. - **ChatOps focused:** Grafana OnCall integrates closely with your slack workspace to deliver alert notifications to individuals and groups, making daily alerts more visible and easier to manage. diff --git a/docs/sources/alert-behavior/_index.md b/docs/sources/alert-behavior/_index.md new file mode 100644 index 00000000..79d01a20 --- /dev/null +++ b/docs/sources/alert-behavior/_index.md @@ -0,0 +1,20 @@ +--- +aliases: + - /docs/oncall/latest/alert-behavior/ +canonical: https://grafana.com/docs/oncall/latest/alert-behavior/ +title: Configure alert behavior for Grafana OnCall +weight: 900 +--- + +# Configure alert behavior for Grafana OnCall + +The available alert configurations in Grafana OnCall allow you to define how certain alerts are handled and ensure that alerts are routed, escalated, and grouped to fit your specific alerting needs. Grafana OnCall can receive alerts from any monitoring system that sends alerts via webhook. + + +## About alert behavior + +Once Grafana OnCall receives an alert, the following occurs, based on the alert content: + +- Default or customized alert templates are applied to deliver the most useful alert fields with the most valuable information, in a readable format. +- Alerts are grouped based on your alert grouping configurations, combining similar or related alerts to reduce alert noise. +- Alerts automatically resolve if an alert from the monitoring system matches the resolve condition for that alert. diff --git a/docs/sources/integrations/create-custom-templates.md b/docs/sources/alert-behavior/alert-templates/index.md similarity index 96% rename from docs/sources/integrations/create-custom-templates.md rename to docs/sources/alert-behavior/alert-templates/index.md index d99cce17..5bc4321c 100644 --- a/docs/sources/integrations/create-custom-templates.md +++ b/docs/sources/alert-behavior/alert-templates/index.md @@ -1,18 +1,19 @@ --- aliases: - - /docs/oncall/latest/integrations/create-custom-templates/ + - ../integrations/create-custom-templates/ + - /docs/oncall/latest/alert-behavior/alert-templates/ +canonical: https://grafana.com/docs/oncall/latest/alert-behavior/alert-templates/ keywords: - Grafana Cloud - Alerts - Notifications - on-call - Jinja -title: Configure alerts in Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/integrations/create-custom-templates/" +title: Configure alert templates weight: 300 --- -# Configure alerts in Grafana OnCall +# Configure alert templates Grafana OnCall can integrate with any monitoring systems that can send alerts using webhooks with JSON payloads. By default, webhooks deliver raw JSON payloads. When Grafana OnCall receives an alert and parses its payload, a default pre configured alert template is applied to modify the alert payload to be more human readable. These alert templates are customizable for any integration. diff --git a/docs/sources/integrations/configure-outgoing-webhooks.md b/docs/sources/alert-behavior/outgoing-webhooks/index.md similarity index 90% rename from docs/sources/integrations/configure-outgoing-webhooks.md rename to docs/sources/alert-behavior/outgoing-webhooks/index.md index bff8c74e..a88ccbf9 100644 --- a/docs/sources/integrations/configure-outgoing-webhooks.md +++ b/docs/sources/alert-behavior/outgoing-webhooks/index.md @@ -1,6 +1,8 @@ --- aliases: - - /docs/oncall/latest/integrations/configure-outgoing-webhooks/ + - ../integrations/configure-outgoing-webhooks/ + - /docs/oncall/latest/alert-behavior/outgoing-webhooks/ +canonical: https://grafana.com/docs/oncall/latest/alert-behavior/outgoing-webhooks/ keywords: - Grafana Cloud - Alerts @@ -9,7 +11,6 @@ keywords: - amixr - webhooks title: Configure outgoing webhooks for Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/integrations/configure-outgoing-webhooks/" weight: 500 --- diff --git a/docs/sources/calendar-schedules/_index.md b/docs/sources/calendar-schedules/_index.md index ca3bf92b..c4838c5d 100644 --- a/docs/sources/calendar-schedules/_index.md +++ b/docs/sources/calendar-schedules/_index.md @@ -1,6 +1,7 @@ --- aliases: - /docs/oncall/latest/calendar-schedules/ +canonical: https://grafana.com/docs/oncall/latest/calendar-schedules/ description: "" keywords: - Grafana @@ -8,7 +9,6 @@ keywords: - on-call - calendar title: Configure and manage on-call schedules -canonical: "https://grafana.com/docs/oncall/latest/calendar-schedules/" weight: 1100 --- diff --git a/docs/sources/configure-user-settings/_index.md b/docs/sources/configure-user-settings/_index.md index 287adf8e..afcefb69 100644 --- a/docs/sources/configure-user-settings/_index.md +++ b/docs/sources/configure-user-settings/_index.md @@ -1,6 +1,7 @@ --- aliases: - /docs/oncall/latest/configure-user-settings/ +canonical: https://grafana.com/docs/oncall/latest/configure-user-setting/ keywords: - Grafana Cloud - Alerts @@ -10,7 +11,6 @@ keywords: - oncall - integrations title: Manage users and teams for Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/configure-user-setting/" weight: 1300 --- diff --git a/docs/sources/escalation-policies/_index.md b/docs/sources/escalation-policies/_index.md index 99326a51..ceb70476 100644 --- a/docs/sources/escalation-policies/_index.md +++ b/docs/sources/escalation-policies/_index.md @@ -1,13 +1,12 @@ --- -title: Configure escalation chains and routes for Grafana OnCall -weight: 700 -canonical: "https://grafana.com/docs/oncall/latest/escalation-policies/" aliases: - - /docs/oncall/latest/chat-options/escalation-policies/ + - /docs/oncall/latest/escalation-policies/ +canonical: https://grafana.com/docs/oncall/latest/escalation-policies/ +title: Escalation Chains and Routes +weight: 700 --- - -# Configure escalation chains and routes for Grafana OnCall +# Escalation Chains and Routes Escalation chains and routes for Grafana OnCall diff --git a/docs/sources/escalation-policies/configure-escalation-chains.md b/docs/sources/escalation-policies/configure-escalation-chains/index.md similarity index 94% rename from docs/sources/escalation-policies/configure-escalation-chains.md rename to docs/sources/escalation-policies/configure-escalation-chains/index.md index 8c244f15..9c19414b 100644 --- a/docs/sources/escalation-policies/configure-escalation-chains.md +++ b/docs/sources/escalation-policies/configure-escalation-chains/index.md @@ -1,6 +1,7 @@ --- aliases: - /docs/oncall/latest/escalation-policies/configure-escalation-chains/ +canonical: https://grafana.com/docs/oncall/latest/escalation-policies/configure-escalation-chains/ keywords: - Grafana Cloud - Alerts @@ -10,7 +11,6 @@ keywords: - oncall - integrations title: Configure and manage Escalation Chains -canonical: "https://grafana.com/docs/oncall/latest/escalation-policies/configure-escalation-chains/" weight: 100 --- diff --git a/docs/sources/escalation-policies/configure-routes.md b/docs/sources/escalation-policies/configure-routes/index.md similarity index 96% rename from docs/sources/escalation-policies/configure-routes.md rename to docs/sources/escalation-policies/configure-routes/index.md index becaa109..5de0a1a4 100644 --- a/docs/sources/escalation-policies/configure-routes.md +++ b/docs/sources/escalation-policies/configure-routes/index.md @@ -1,6 +1,7 @@ --- aliases: - /docs/oncall/latest/escalation-policies/configure-routes/ +canonical: https://grafana.com/docs/oncall/latest/escalation-policies/configure-routes/ keywords: - Grafana Cloud - Alerts @@ -10,11 +11,10 @@ keywords: - oncall - integrations title: Configure and manage routes -canonical: "https://grafana.com/docs/oncall/latest/escalation-policies/configure-routes/" weight: 300 --- -# Configure and manage routes +# Configure and manage Routes Set up escalation chains and routes to configure escalation behavior for alert group notifications. diff --git a/docs/sources/getting-started/_index.md b/docs/sources/get-started/_index.md similarity index 94% rename from docs/sources/getting-started/_index.md rename to docs/sources/get-started/_index.md index e84ffdd2..677b203e 100644 --- a/docs/sources/getting-started/_index.md +++ b/docs/sources/get-started/_index.md @@ -1,13 +1,13 @@ --- aliases: - - /docs/grafana-cloud/oncall/getting-started/ - - /docs/oncall/latest/getting-started/ + - /docs/oncall/latest/get-started/ + - /getting-started/ +canonical: https://grafana.com/docs/oncall/latest/get-started/ keywords: - Get started - On call - Grafana Cloud title: Get started with Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/getting-started/" weight: 300 --- @@ -59,7 +59,7 @@ Regardless of where your alerts originate, you can send them to Grafana OnCall v 2. Explore the alert by clicking on the title of the alert. 3. Acknowledge and resolve the test alert. -For more information on Grafana OnCall integrations and further configuration guidance, refer to, [Connect to Grafana OnCall]({{< relref "../integrations" >}}) +For more information on Grafana OnCall integrations and further configuration guidance, refer to, [Grafana OnCall integrations]({{< relref "../integrations" >}}) ### Configure Escalation Chains @@ -105,7 +105,7 @@ To configure Slack for Grafana OnCall: 5. Click Allow to allow Grafana OnCall to access Slack. 6. Ensure users verify their Slack accounts in their user profile in Grafana OnCall. -For further instruction on connecting to your Slack workspace, refer to [Connect Slack to Grafana OnCall]({{< relref "../chat-options/configure-slack" >}}) +For further instruction on connecting to your Slack workspace, refer to [Slack integration for Grafana OnCall]({{< relref "../integrations/chatops-integrations/configure-slack/" >}}) ### Add your on-call schedule diff --git a/docs/sources/integrations/_index.md b/docs/sources/integrations/_index.md index 354257a8..a49e7496 100644 --- a/docs/sources/integrations/_index.md +++ b/docs/sources/integrations/_index.md @@ -1,7 +1,7 @@ --- aliases: - - /docs/grafana-cloud/oncall/integrations/ - /docs/oncall/latest/integrations/ +canonical: https://grafana.com/docs/oncall/latest/integrations/ keywords: - Grafana Cloud - Alerts @@ -10,12 +10,11 @@ keywords: - amixr - oncall - integrations -title: Connect to Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/integrations/" +title: Grafana OnCall integrations weight: 500 --- -# Connect to Grafana OnCall +# Grafana OnCall integrations Integrations allow you to connect monitoring systems of your choice to send alerts to Grafana OnCall. Regardless of where your alerts originate, you can configure alerts to be sent to Grafana OnCall for alert escalation and notification. Grafana OnCall receives alerts in JSON format via a POST request, OnCall then parses alert data using preconfigured alert templates to determine alert grouping, apply routes, and determine correct escalation. @@ -53,7 +52,7 @@ To customize alert grouping for an integration: 2. Select **Alert Behavior** from the dropdown menu next to **Edit template for**. 3. Edit the **grouping id**, **acknowledge condition**, and **resolve condition** templates as needed to customize your alert behavior. -For more information on alert templates, see [Configure alerts in Grafana OnCall]({{< relref "create-custom-templates/" >}}) +For more information on alert templates, see [Configure alerts templates]({{< relref "../alert-behavior/alert-templates" >}}) #### Add Routes diff --git a/docs/sources/integrations/available-integrations/_index.md b/docs/sources/integrations/available-integrations/_index.md index c3127657..3d02ba76 100644 --- a/docs/sources/integrations/available-integrations/_index.md +++ b/docs/sources/integrations/available-integrations/_index.md @@ -1,7 +1,7 @@ --- aliases: - - /docs/grafana-cloud/oncall/integrations/add-integration/ - /docs/oncall/latest/integrations/available-integrations/ +canonical: https://grafana.com/docs/oncall/latest/integrations/available-integrations/ keywords: - Grafana Cloud - Alerts @@ -10,15 +10,14 @@ keywords: - Alertmanager - Prometheus title: Currently available integrations for Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/integrations/available-integrations/" weight: 100 --- -# Currently available integrations +# Available integrations Grafana OnCall can connect directly to the monitoring services where your alerts originate. All currently available integrations are listed in the Grafana OnCall **Create Integration** section. -If the integration you're looking for isn't currently listed, see [Configure Webhook integrations for Grafana OnCall]({{< relref "../add-webhook-integration/" >}}) to integration your monitoring system with Grafana OnCall. +If the integration you're looking for isn't currently listed, see [Webhook integrations for Grafana OnCall]({{< relref "../available-integrations/configure-webhook" >}}) to integration your monitoring system with Grafana OnCall. > **Note:** Some integrations are available for Grafana Cloud instances only. See individual integration guides for more information. diff --git a/docs/sources/integrations/available-integrations/add-alertmanager.md b/docs/sources/integrations/available-integrations/configure-alertmanager/index.md similarity index 88% rename from docs/sources/integrations/available-integrations/add-alertmanager.md rename to docs/sources/integrations/available-integrations/configure-alertmanager/index.md index 74661625..e2569ed0 100644 --- a/docs/sources/integrations/available-integrations/add-alertmanager.md +++ b/docs/sources/integrations/available-integrations/configure-alertmanager/index.md @@ -1,7 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/available-integrations/add-alertmanager/ - - /docs/oncall/latest/integrations/available-integrations /add-alertmanager/ + - add-alertmanager/ + - /docs/oncall/latest/integrations/available-integrations/configure-alertmanager/ +canonical: https://grafana.com/docs/oncall/latest/integrations/available-integrations/configure-alertmanager/ keywords: - Grafana Cloud - Alerts @@ -9,12 +10,11 @@ keywords: - on-call - Alertmanager - Prometheus -title: Connect Alertmanager to Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/integrations/available-integrations/add-alertmanager/" +title: Alertmanager integration for Grafana OnCall weight: 300 --- -# Connect Alertmanager to Grafana OnCall +# Alertmanager integration for Grafana OnCall The Alertmanager integration for Grafana OnCall handles alerts sent by client applications such as the Prometheus server. diff --git a/docs/sources/integrations/available-integrations/add-grafana-alerting.md b/docs/sources/integrations/available-integrations/configure-grafana-alerting/index.md similarity index 90% rename from docs/sources/integrations/available-integrations/add-grafana-alerting.md rename to docs/sources/integrations/available-integrations/configure-grafana-alerting/index.md index e3af0a90..c3197649 100644 --- a/docs/sources/integrations/available-integrations/add-grafana-alerting.md +++ b/docs/sources/integrations/available-integrations/configure-grafana-alerting/index.md @@ -1,19 +1,19 @@ --- aliases: - - /docs/grafana-cloud/oncall/integrations/add-grafana-alerting/ - - /docs/oncall/latest/integrations/available-integrations /add-grafana-alerting/ + - add-grafana-alerting/ + - /docs/oncall/latest/integrations/available-integrations/configure-grafana-alerting/ +canonical: https://grafana.com/docs/oncall/latest/integrations/available-integrations/configure-grafana-alerting/ keywords: - Grafana Cloud - Alerts - Notifications - on-call - Prometheus -title: Connect Grafana Alerting to Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/integrations/available-integrations/add-grafana-alerting/" +title: Grafana Alerting integration for Grafana OnCall weight: 100 --- -# Connect Grafana Alerting to Grafana OnCall +# Grafana Alerting integration for Grafana OnCall Grafana Alerting for Grafana OnCall can be set up using two methods: diff --git a/docs/sources/integrations/add-webhook-integration.md b/docs/sources/integrations/available-integrations/configure-webhook/index.md similarity index 86% rename from docs/sources/integrations/add-webhook-integration.md rename to docs/sources/integrations/available-integrations/configure-webhook/index.md index f1d96eed..a762f006 100644 --- a/docs/sources/integrations/add-webhook-integration.md +++ b/docs/sources/integrations/available-integrations/configure-webhook/index.md @@ -1,6 +1,8 @@ --- aliases: - - /docs/oncall/latest/integrations/add-webhook-integration/ + - ../add-webhook-integration/ + - /docs/oncall/latest/integrations/available-integrations/configure-webhook/ +canonical: https://grafana.com/docs/oncall/latest/integrations/available-integrations/configure-webhook/ keywords: - Grafana Cloud - Alerts @@ -9,11 +11,10 @@ keywords: - Alertmanager - Prometheus title: Webhook integration for Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/integrations/add-webhook-integration/" weight: 700 --- -# Configure Webhook integrations for Grafana OnCall +# Webhook integrations for Grafana OnCall Grafana OnCall directly supports many integrations, those that aren’t currently listed in the Integrations menu can be connected using the webhook integration and configured alert templates. @@ -56,4 +57,4 @@ For example: }' ``` -To learn how to use custom alert templates for formatted webhooks, see [Configure alerts in Grafana OnCall]({{< relref "../integrations/create-custom-templates/" >}}). +To learn how to use custom alert templates for formatted webhooks, see [Configure alerts templates]({{< relref "../../../alert-behavior/alert-templates/" >}}). diff --git a/docs/sources/integrations/available-integrations/add-zabbix.md b/docs/sources/integrations/available-integrations/configure-zabbix/index.md similarity index 94% rename from docs/sources/integrations/available-integrations/add-zabbix.md rename to docs/sources/integrations/available-integrations/configure-zabbix/index.md index cfe663a1..7fc0bb8e 100644 --- a/docs/sources/integrations/available-integrations/add-zabbix.md +++ b/docs/sources/integrations/available-integrations/configure-zabbix/index.md @@ -1,18 +1,19 @@ --- aliases: - - /docs/oncall/latest/integrations/available-integrations /add-zabbix/ + - add-zabbix/ + - /docs/oncall/latest/integrations/available-integrations/configure-zabbix/ +canonical: https://grafana.com/docs/oncall/latest/integrations/available-integrations/configure-zabbix/ keywords: - Grafana Cloud - Alerts - Notifications - on-call - Zabbix -title: Connect Zabbix to Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/integrations/available-integrations/add-zabbix/" +title: Zabbix integration for Grafana OnCall weight: 500 --- -# Connect Zabbix to Grafana OnCall +# Zabbix integration for Grafana OnCall Zabbix is an open-source monitoring software tool for diverse IT components, including networks, servers, virtual machines, and cloud services. Zabbix provides monitoring for metrics such as network utilization, CPU load, and disk space consumption. diff --git a/docs/sources/chat-options/_index.md b/docs/sources/integrations/chatops-integrations/_index.md similarity index 63% rename from docs/sources/chat-options/_index.md rename to docs/sources/integrations/chatops-integrations/_index.md index ed858e62..c96e8d6e 100644 --- a/docs/sources/chat-options/_index.md +++ b/docs/sources/integrations/chatops-integrations/_index.md @@ -1,6 +1,8 @@ --- aliases: - - /docs/oncall/latest/chat-options/ + - ../chat-options/ + - /docs/oncall/latest/integrations/chatops-integrations/ +canonical: https://grafana.com/docs/oncall/latest/integrations/chatops-integrations/ keywords: - Grafana Cloud - Alerts @@ -9,14 +11,13 @@ keywords: - amixr - oncall - slack -title: Connect ChatOps to Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/chat-options/" -weight: 900 +title: Available ChatOps integrations +weight: 300 --- -# Connect ChatOps to Grafana OnCall +# Available ChatOps integrations -Grafana OnCall directly supports the export of alert notifications to some popular messaging applications like Slack and Telegram. You can use outgoing webhooks to applications that aren't directly supported. For information on configuring outgoing webhooks, see [Send alert group notifications by webhook]({{< relref "../integrations/configure-outgoing-webhooks.md" >}}). +Grafana OnCall directly supports the export of alert notifications to some popular messaging applications like Slack and Telegram. You can use outgoing webhooks to applications that aren't directly supported. For information on configuring outgoing webhooks, see [Send alert group notifications by webhook]({{< relref "../../alert-behavior/outgoing-webhooks/" >}}). To configure supported messaging apps, see the following topics: diff --git a/docs/sources/chat-options/configure-slack.md b/docs/sources/integrations/chatops-integrations/configure-slack/index.md similarity index 92% rename from docs/sources/chat-options/configure-slack.md rename to docs/sources/integrations/chatops-integrations/configure-slack/index.md index 77126bb9..33d29016 100644 --- a/docs/sources/chat-options/configure-slack.md +++ b/docs/sources/integrations/chatops-integrations/configure-slack/index.md @@ -1,6 +1,8 @@ --- aliases: - - /docs/oncall/latest/chat-options/configure-slack/ + - ../../chat-options/configure-slack/ + - /docs/oncall/latest/integrations/chatops-integrations/configure-slack/ +canonical: https://grafana.com/docs/oncall/latest/integrations/chatops-integrations/configure-slack/ keywords: - Grafana Cloud - Alerts @@ -10,7 +12,6 @@ keywords: - oncall - slack title: Slack integration for Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/chat-options/configure-slack/" weight: 100 --- @@ -25,7 +26,7 @@ Integrating your Slack workspace with Grafana OnCall allows users and teams to b To install the Slack integration, you must have Admin permissions in your Grafana instance as well as the Slack workspace that you’d like to integrate with. -For Open Source Grafana OnCall Slack installation guidance, refer to [Open Source Grafana OnCall]({{< relref "../open-source" >}}). +For Open Source Grafana OnCall Slack installation guidance, refer to [Open Source Grafana OnCall]({{< relref "../../../open-source/" >}}). ## Install Slack integration for Grafana OnCall diff --git a/docs/sources/chat-options/configure-teams.md b/docs/sources/integrations/chatops-integrations/configure-teams/index.md similarity index 94% rename from docs/sources/chat-options/configure-teams.md rename to docs/sources/integrations/chatops-integrations/configure-teams/index.md index b17ca99d..b4f42450 100644 --- a/docs/sources/chat-options/configure-teams.md +++ b/docs/sources/integrations/chatops-integrations/configure-teams/index.md @@ -1,6 +1,8 @@ --- aliases: - - /docs/oncall/latest/chat-options/configure-teams/ + - ../../chat-options/configure-teams/ + - /docs/oncall/latest/integrations/chatops-integrations/configure-teams/ +canonical: https://grafana.com/docs/oncall/latest/integrations/chatops-integrations/configure-teams/ keywords: - Grafana Cloud - Alerts @@ -11,7 +13,6 @@ keywords: - MS Team - Microsoft title: Microsoft Teams integration for Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/chat-options/configure-teams/" weight: 500 --- diff --git a/docs/sources/chat-options/configure-telegram.md b/docs/sources/integrations/chatops-integrations/configure-telegram/index.md similarity index 91% rename from docs/sources/chat-options/configure-telegram.md rename to docs/sources/integrations/chatops-integrations/configure-telegram/index.md index daef6ab6..fd510340 100644 --- a/docs/sources/chat-options/configure-telegram.md +++ b/docs/sources/integrations/chatops-integrations/configure-telegram/index.md @@ -1,6 +1,8 @@ --- aliases: - - /docs/oncall/latest/chat-options/configure-telegram/ + - ../../chat-options/configure-telegram/ + - /docs/oncall/latest/integrations/chatops-integrations/configure-telegram/ +canonical: https://grafana.com/docs/oncall/latest/integrations/chatops-integrations/configure-telegram/ keywords: - Grafana Cloud - Alerts @@ -10,7 +12,6 @@ keywords: - oncall - telegram title: Telegram integration for Grafana OnCall -canonical: "https://grafana.com/docs/oncall/latest/chat-options/configure-telegram/" weight: 300 --- diff --git a/docs/sources/oncall-api-reference/_index.md b/docs/sources/oncall-api-reference/_index.md index 9f998e59..cc453fec 100644 --- a/docs/sources/oncall-api-reference/_index.md +++ b/docs/sources/oncall-api-reference/_index.md @@ -1,8 +1,8 @@ --- aliases: - /docs/oncall/latest/oncall-api-reference/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/ title: Grafana OnCall HTTP API reference -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/" weight: 1500 --- diff --git a/docs/sources/oncall-api-reference/alertgroups.md b/docs/sources/oncall-api-reference/alertgroups.md index 8e90f6d3..e578644d 100644 --- a/docs/sources/oncall-api-reference/alertgroups.md +++ b/docs/sources/oncall-api-reference/alertgroups.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/alertgroups/ - /docs/oncall/latest/oncall-api-reference/alertgroups/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/alertgroups/ title: Alert groups HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/alertgroups/" weight: 400 --- diff --git a/docs/sources/oncall-api-reference/alerts.md b/docs/sources/oncall-api-reference/alerts.md index 8a062581..d67f8e14 100644 --- a/docs/sources/oncall-api-reference/alerts.md +++ b/docs/sources/oncall-api-reference/alerts.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/alerts/ - /docs/oncall/latest/oncall-api-reference/alerts/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/alerts/ title: Alerts HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/alerts/" weight: 100 --- diff --git a/docs/sources/oncall-api-reference/escalation_chains.md b/docs/sources/oncall-api-reference/escalation_chains.md index 8723b6a6..f88b8d71 100644 --- a/docs/sources/oncall-api-reference/escalation_chains.md +++ b/docs/sources/oncall-api-reference/escalation_chains.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/escalation_chains/ - /docs/oncall/latest/oncall-api-reference/escalation_chains/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/escalation_chains/ title: Escalation Chains HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/escalation_chains/" weight: 200 --- diff --git a/docs/sources/oncall-api-reference/escalation_policies.md b/docs/sources/oncall-api-reference/escalation_policies.md index 76d253f3..26c8a470 100644 --- a/docs/sources/oncall-api-reference/escalation_policies.md +++ b/docs/sources/oncall-api-reference/escalation_policies.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/escalation_policies/ - /docs/oncall/latest/oncall-api-reference/escalation_policies/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/escalation_policies/ title: Escalation Policies HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/escalation_policies/" weight: 300 --- diff --git a/docs/sources/oncall-api-reference/integrations.md b/docs/sources/oncall-api-reference/integrations.md index 19e3edee..282e39df 100644 --- a/docs/sources/oncall-api-reference/integrations.md +++ b/docs/sources/oncall-api-reference/integrations.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/integrations/ - /docs/oncall/latest/oncall-api-reference/integrations/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/integrations/ title: Integrations HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/integrations/" weight: 500 --- @@ -68,7 +67,7 @@ The above command returns JSON structured in the following way: ``` Integrations are sources of alerts and alert groups for Grafana OnCall. -For example, to learn how to integrate Grafana OnCall with Alertmanager see [Alertmanager]({{< relref "../integrations/available-integrations/add-alertmanager/" >}}). +For example, to learn how to integrate Grafana OnCall with Alertmanager see [Alertmanager]({{< relref "../integrations/available-integrations/configure-alertmanager/" >}}). **HTTP request** diff --git a/docs/sources/oncall-api-reference/on_call_shifts.md b/docs/sources/oncall-api-reference/on_call_shifts.md index 8f43975d..f06a8d12 100644 --- a/docs/sources/oncall-api-reference/on_call_shifts.md +++ b/docs/sources/oncall-api-reference/on_call_shifts.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/on_call_shifts/ - /docs/oncall/latest/oncall-api-reference/on_call_shifts/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/on_call_shifts/ title: OnCall shifts HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/on_call_shifts/" weight: 600 --- diff --git a/docs/sources/oncall-api-reference/outgoing_webhooks.md b/docs/sources/oncall-api-reference/outgoing_webhooks.md index 0e26f012..deb26150 100644 --- a/docs/sources/oncall-api-reference/outgoing_webhooks.md +++ b/docs/sources/oncall-api-reference/outgoing_webhooks.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/outgoing_webhooks/ - /docs/oncall/latest/oncall-api-reference/outgoing_webhooks/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/outgoing_webhooks/ title: Outgoing webhooks HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/outgoing_webhooks/" weight: 700 --- diff --git a/docs/sources/oncall-api-reference/personal_notification_rules.md b/docs/sources/oncall-api-reference/personal_notification_rules.md index dc6e8562..fdf92646 100644 --- a/docs/sources/oncall-api-reference/personal_notification_rules.md +++ b/docs/sources/oncall-api-reference/personal_notification_rules.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/personal_notification_rules/ - /docs/oncall/latest/oncall-api-reference/personal_notification_rules/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/personal_notification_rules/ title: Personal Notification Rules HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/personal_notification_rules/" weight: 800 --- diff --git a/docs/sources/oncall-api-reference/postmortem_messages.md b/docs/sources/oncall-api-reference/postmortem_messages.md index b2fefa19..f3f5aff8 100644 --- a/docs/sources/oncall-api-reference/postmortem_messages.md +++ b/docs/sources/oncall-api-reference/postmortem_messages.md @@ -1,10 +1,9 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/postmortem_messages/ - /docs/oncall/latest/oncall-api-reference/postmortem_messages/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/postmortem_messages/ draft: true title: Postmortem Messages HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/postmortem_messages/" weight: 900 --- diff --git a/docs/sources/oncall-api-reference/postmortems.md b/docs/sources/oncall-api-reference/postmortems.md index c98026ae..91797f74 100644 --- a/docs/sources/oncall-api-reference/postmortems.md +++ b/docs/sources/oncall-api-reference/postmortems.md @@ -1,10 +1,9 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/postmortems/ - /docs/oncall/latest/oncall-api-reference/postmortems/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/postmortems/ draft: true title: Postmortem HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/postmortems/" weight: 1000 --- diff --git a/docs/sources/oncall-api-reference/routes.md b/docs/sources/oncall-api-reference/routes.md index 78eb387f..5f92e79a 100644 --- a/docs/sources/oncall-api-reference/routes.md +++ b/docs/sources/oncall-api-reference/routes.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/routes/ - /docs/oncall/latest/oncall-api-reference/routes/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/routes/ title: Routes HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/routes/" weight: 1100 --- diff --git a/docs/sources/oncall-api-reference/schedules.md b/docs/sources/oncall-api-reference/schedules.md index d7ec9273..53b19f81 100644 --- a/docs/sources/oncall-api-reference/schedules.md +++ b/docs/sources/oncall-api-reference/schedules.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/schedules/ - /docs/oncall/latest/oncall-api-reference/schedules/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/schedules/ title: Schedule HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/schedules/" weight: 1200 --- diff --git a/docs/sources/oncall-api-reference/slack_channels.md b/docs/sources/oncall-api-reference/slack_channels.md index 6c7d09c3..f5516688 100644 --- a/docs/sources/oncall-api-reference/slack_channels.md +++ b/docs/sources/oncall-api-reference/slack_channels.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/slack_channels/ - /docs/oncall/latest/oncall-api-reference/slack_channels/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/slack_channels/ title: Slack Channels HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/slack_channels/" weight: 1300 --- diff --git a/docs/sources/oncall-api-reference/user_groups.md b/docs/sources/oncall-api-reference/user_groups.md index e2021770..c078eb13 100644 --- a/docs/sources/oncall-api-reference/user_groups.md +++ b/docs/sources/oncall-api-reference/user_groups.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/user_groups/ - /docs/oncall/latest/oncall-api-reference/user_groups/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/user_groups/ title: OnCall User Groups HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/user_groups/" weight: 1400 --- diff --git a/docs/sources/oncall-api-reference/users.md b/docs/sources/oncall-api-reference/users.md index ca6d01df..4c520eeb 100644 --- a/docs/sources/oncall-api-reference/users.md +++ b/docs/sources/oncall-api-reference/users.md @@ -1,9 +1,8 @@ --- aliases: - - /docs/grafana-cloud/oncall/oncall-api-reference/users/ - /docs/oncall/latest/oncall-api-reference/users/ +canonical: https://grafana.com/docs/oncall/latest/oncall-api-reference/users/ title: Grafana OnCall Users HTTP API -canonical: "https://grafana.com/docs/oncall/latest/oncall-api-reference/users/" weight: 1500 --- diff --git a/docs/sources/open-source/_index.md b/docs/sources/open-source/_index.md index fdc3a1a8..5e3f03c6 100644 --- a/docs/sources/open-source/_index.md +++ b/docs/sources/open-source/_index.md @@ -1,6 +1,5 @@ --- aliases: - - /docs/grafana-cloud/oncall/open-source/ - /docs/oncall/latest/open-source/ keywords: - Open Source @@ -195,6 +194,7 @@ Grafana OnCall is capable of sending emails using SMTP as a user notification st - `EMAIL_HOST_USER` - SMTP server user - `EMAIL_HOST_PASSWORD` - SMTP server password - `EMAIL_PORT` (default is `587`) - SMTP server port -- `EMAIL_USE_TLS` (default is `True`) - to enable/disable TLS +- `EMAIL_USE_TLS` (default is `True`) - To enable/disable TLS +- `EMAIL_FROM_ADDRESS` (optional) - Email address used to send emails. If not specified, `EMAIL_HOST_USER` will be used. After enabling the email integration, it will be possible to use the `Notify by email` notification step in user settings. diff --git a/engine/apps/api/serializers/live_setting.py b/engine/apps/api/serializers/live_setting.py index bf431341..15806b0e 100644 --- a/engine/apps/api/serializers/live_setting.py +++ b/engine/apps/api/serializers/live_setting.py @@ -5,7 +5,7 @@ from apps.base.models import LiveSetting class LiveSettingSerializer(serializers.ModelSerializer): id = serializers.CharField(read_only=True, source="public_primary_key") - value = serializers.JSONField(allow_null=False) + value = serializers.JSONField(allow_null=True) class Meta: model = LiveSetting diff --git a/engine/apps/api/views/schedule.py b/engine/apps/api/views/schedule.py index 04de4393..7ecebaf4 100644 --- a/engine/apps/api/views/schedule.py +++ b/engine/apps/api/views/schedule.py @@ -264,7 +264,13 @@ class ScheduleView( if filter_by is not None and filter_by != EVENTS_FILTER_BY_FINAL: filter_by = OnCallSchedule.PRIMARY if filter_by == EVENTS_FILTER_BY_ROTATION else OnCallSchedule.OVERRIDES events = schedule.filter_events( - user_tz, starting_date, days=days, with_empty=True, with_gap=resolve_schedule, filter_by=filter_by + user_tz, + starting_date, + days=days, + with_empty=True, + with_gap=resolve_schedule, + filter_by=filter_by, + all_day_datetime=True, ) else: # return final schedule events = schedule.final_events(user_tz, starting_date, days) diff --git a/engine/apps/base/models/live_setting.py b/engine/apps/base/models/live_setting.py index 75219a00..b5409ddc 100644 --- a/engine/apps/base/models/live_setting.py +++ b/engine/apps/base/models/live_setting.py @@ -38,6 +38,7 @@ class LiveSetting(models.Model): "EMAIL_HOST_USER", "EMAIL_HOST_PASSWORD", "EMAIL_USE_TLS", + "EMAIL_FROM_ADDRESS", "TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN", "TWILIO_API_KEY_SID", @@ -63,6 +64,7 @@ class LiveSetting(models.Model): "EMAIL_HOST_USER": "SMTP server user", "EMAIL_HOST_PASSWORD": "SMTP server password", "EMAIL_USE_TLS": "SMTP enable/disable TLS", + "EMAIL_FROM_ADDRESS": "Email address used to send emails. If not specified, EMAIL_HOST_USER will be used.", "SLACK_SIGNING_SECRET": ( "Check * via {{ integration_name }} +{% if source_link %} + (*<{{ source_link }}|source>*) +{%- endif %}""" + +slack_message = '{{ payload.get("message", "") }}' + +slack_image_url = '{{ payload.get("image_url", "") }}' + +web_title = '{{ payload.get("title", "Title undefined (check Web Title Template)") }}' + +web_message = slack_message + +web_image_url = slack_image_url + +sms_title = web_title + +phone_call_title = sms_title + +email_title = web_title + +email_message = web_message + +telegram_title = sms_title + +telegram_message = slack_message + +telegram_image_url = slack_image_url + +source_link = "{{ payload.link_to_upstream_details }}" + +grouping_id = '{{ payload.get("alert_uid", "")}}' + +resolve_condition = '{{ payload.get("state", "").upper() == "OK" }}' + +acknowledge_condition = None + +group_verbose_name = web_title + +example_payload = { + "alert_uid": "08d6891a-835c-e661-39fa-96b6a9e26552", + "title": "TestAlert: The whole system is down", + "image_url": "https://upload.wikimedia.org/wikipedia/commons/e/ee/Grumpy_Cat_by_Gage_Skidmore.jpg", + "state": "alerting", + "link_to_upstream_details": "https://en.wikipedia.org/wiki/Downtime", + "message": "This alert was sent by user for the demonstration purposes\nSmth happened. Oh no!", +} diff --git a/engine/engine/middlewares.py b/engine/engine/middlewares.py index 90c1e130..cf5878ad 100644 --- a/engine/engine/middlewares.py +++ b/engine/engine/middlewares.py @@ -23,19 +23,21 @@ class RequestTimeLoggingMiddleware(MiddlewareMixin): seconds = (dt - request._logging_start_dt).total_seconds() status_code = 0 if response is None else response.status_code content_length = request.headers.get("content-length", default=0) - integration_type = "N/A" - integration_token = "N/A" + message = ( + "inbound " + f"latency={str(seconds)} status={status_code} method={request.method} path={request.path} " + f"content-length={content_length} slow={int(seconds > settings.SLOW_THRESHOLD_SECONDS)} " + ) + if hasattr(request, "user") and request.user and request.user.id: + user_id = request.user.id + org_id = request.user.organization_id + message += f"user_id={user_id} org_id={org_id} " if request.path.startswith("/integrations/v1"): split_path = request.path.split("/") integration_type = split_path[3] integration_token = split_path[4] - logging.info( - "inbound " - f"latency={str(seconds)} status={status_code} method={request.method} path={request.path} " - f"content-length={content_length} slow={int(seconds > settings.SLOW_THRESHOLD_SECONDS)} " - f"integration_type={integration_type} " - f"integration_token={integration_token}" - ) + message += f"integration_type={integration_type} integration_token={integration_token} " + logging.info(message) def process_request(self, request): self.log_message(request, None, "request") diff --git a/engine/settings/base.py b/engine/settings/base.py index daa07700..2fd8727c 100644 --- a/engine/settings/base.py +++ b/engine/settings/base.py @@ -570,7 +570,7 @@ EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER") EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD") EMAIL_PORT = getenv_integer("EMAIL_PORT", 587) EMAIL_USE_TLS = getenv_boolean("EMAIL_USE_TLS", True) -DEFAULT_FROM_EMAIL = os.getenv("DEFAULT_FROM_EMAIL") +EMAIL_FROM_ADDRESS = os.getenv("EMAIL_FROM_ADDRESS") if FEATURE_EMAIL_INTEGRATION_ENABLED: EXTRA_MESSAGING_BACKENDS = [("apps.email.backend.EmailBackend", 8)] @@ -588,6 +588,7 @@ INSTALLED_ONCALL_INTEGRATIONS = [ "config_integrations.maintenance", "config_integrations.manual", "config_integrations.slack_channel", + "config_integrations.zabbix", ] if OSS_INSTALLATION: diff --git a/helm/oncall/Chart.yaml b/helm/oncall/Chart.yaml index fd0483fd..b1b7e18a 100644 --- a/helm/oncall/Chart.yaml +++ b/helm/oncall/Chart.yaml @@ -8,7 +8,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.7 +version: 1.0.8 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/helm/oncall/README.md b/helm/oncall/README.md index d64e6c89..92fcd911 100644 --- a/helm/oncall/README.md +++ b/helm/oncall/README.md @@ -224,6 +224,11 @@ externalRabbitmq: port: user: password: + protocol: + vhost: + existingSecret: "" + passwordKey: password + usernameKey: username ``` ### Connect external Redis diff --git a/helm/oncall/templates/_env.tpl b/helm/oncall/templates/_env.tpl index 89d1a52c..746669ec 100644 --- a/helm/oncall/templates/_env.tpl +++ b/helm/oncall/templates/_env.tpl @@ -237,13 +237,21 @@ {{- define "snippet.rabbitmq.env" -}} {{- if eq .Values.broker.type "rabbitmq" -}} +{{- if and (not .Values.rabbitmq.enabled) (not .Values.externalRabbitmq.existingSecret) (not .Values.externalRabbitmq.usernameKey) .Values.externalRabbitmq.user }} - name: RABBITMQ_USERNAME value: {{ include "snippet.rabbitmq.user" . }} +{{- else if and (not .Values.rabbitmq.enabled) .Values.externalRabbitmq.existingSecret .Values.externalRabbitmq.usernameKey (not .Values.externalRabbitmq.user) }} +- name: RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + name: {{ include "snippet.rabbitmq.password.secret.name" . }} + key: {{ .Values.externalRabbitmq.usernameKey }} +{{- end }} - name: RABBITMQ_PASSWORD valueFrom: secretKeyRef: name: {{ include "snippet.rabbitmq.password.secret.name" . }} - key: rabbitmq-password + key: {{ include "snippet.rabbitmq.password.secret.key" . }} - name: RABBITMQ_HOST value: {{ include "snippet.rabbitmq.host" . }} - name: RABBITMQ_PORT @@ -298,11 +306,21 @@ {{- define "snippet.rabbitmq.password.secret.name" -}} {{- if and (not .Values.rabbitmq.enabled) .Values.externalRabbitmq.password -}} {{ include "oncall.fullname" . }}-rabbitmq-external +{{- else if and (not .Values.rabbitmq.enabled) .Values.externalRabbitmq.existingSecret -}} +{{ .Values.externalRabbitmq.existingSecret }} {{- else -}} {{ include "oncall.rabbitmq.fullname" . }} {{- end -}} {{- end -}} +{{- define "snippet.rabbitmq.password.secret.key" -}} +{{- if and (not .Values.rabbitmq.enabled) .Values.externalRabbitmq.passwordKey -}} +{{ .Values.externalRabbitmq.passwordKey }} +{{- else -}} +rabbitmq-password +{{- end -}} +{{- end -}} + {{- define "snippet.redis.host" -}} {{- if and (not .Values.redis.enabled) .Values.externalRedis.host -}} {{- required "externalRedis.host is required if not redis.enabled" .Values.externalRedis.host | quote }} @@ -348,7 +366,7 @@ key: smtp-password - name: EMAIL_USE_TLS value: {{ .Values.oncall.smtp.tls | toString | title | quote }} -- name: DEFAULT_FROM_EMAIL +- name: EMAIL_FROM_ADDRESS value: {{ .Values.oncall.smtp.fromEmail | quote }} {{- else -}} - name: FEATURE_EMAIL_INTEGRATION_ENABLED diff --git a/helm/oncall/templates/secrets.yaml b/helm/oncall/templates/secrets.yaml index 0997c93d..dfd7cdb2 100644 --- a/helm/oncall/templates/secrets.yaml +++ b/helm/oncall/templates/secrets.yaml @@ -21,14 +21,14 @@ data: mariadb-root-password: {{ required "externalMysql.password is required if not mariadb.enabled" .Values.externalMysql.password | b64enc | quote }} {{- end }} --- -{{ if and (eq .Values.broker.type "rabbitmq") (not .Values.rabbitmq.enabled) -}} +{{ if and (eq .Values.broker.type "rabbitmq") (not .Values.rabbitmq.enabled) (not .Values.externalRabbitmq.existingSecret) -}} apiVersion: v1 kind: Secret metadata: name: {{ include "oncall.fullname" . }}-rabbitmq-external type: Opaque data: - rabbitmq-password: {{ required "externalRabbitmq.password is required if not rabbitmq.enabled" .Values.externalRabbitmq.password | b64enc | quote }} + rabbitmq-password: {{ required "externalRabbitmq.password is required if not rabbitmq.enabled and not externalRabbitmq.existingSecret" .Values.externalRabbitmq.password | b64enc | quote }} {{- end }} --- {{ if not .Values.redis.enabled -}} diff --git a/helm/oncall/values.yaml b/helm/oncall/values.yaml index 5c30878d..3de0e122 100644 --- a/helm/oncall/values.yaml +++ b/helm/oncall/values.yaml @@ -239,6 +239,12 @@ externalRabbitmq: password: protocol: vhost: + # use an existing secret for the rabbitmq password + existingSecret: "" + # the key in the secret containing the rabbitmq password + passwordKey: password + # the key in the secret containing the rabbitmq username + usernameKey: username # Redis is included into this release for the convenience. # It is recommended to host it separately from this release