debian-mirror-gitlab/doc/user/incident_management/index.md

114 lines
5.5 KiB
Markdown
Raw Normal View History

2019-12-26 22:10:19 +05:30
---
2020-05-24 23:13:21 +05:30
stage: Monitor
group: Health
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
2019-12-26 22:10:19 +05:30
---
# Incident Management
GitLab offers solutions for handling incidents in your applications and services,
2020-06-23 00:09:42 +05:30
such as setting up Prometheus alerts, displaying metrics, and sending notifications.
2019-12-26 22:10:19 +05:30
2020-05-24 23:13:21 +05:30
## Configure incidents **(ULTIMATE)**
2019-12-26 22:10:19 +05:30
2020-06-23 00:09:42 +05:30
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/4925) in GitLab Ultimate 11.11.
2019-12-26 22:10:19 +05:30
2020-06-23 00:09:42 +05:30
You can enable or disable Incident Management features in the GitLab user interface
to create issues when alerts are triggered:
2019-12-26 22:10:19 +05:30
2020-06-23 00:09:42 +05:30
1. Navigate to **{settings}** **Settings > Operations > Incidents** and expand
**Incidents**:
2019-12-26 22:10:19 +05:30
2020-06-23 00:09:42 +05:30
![Incident Management Settings](img/incident_management_settings.png)
2019-12-26 22:10:19 +05:30
2020-06-23 00:09:42 +05:30
1. For GitLab versions 11.11 and greater, you can select the **Create an issue**
checkbox to create an issue based on your own
[issue templates](../project/description_templates.md#creating-issue-templates).
For more information, see
[Taking Action on Incidents](../project/integrations/prometheus.md#taking-action-on-incidents-ultimate) **(ULTIMATE)**.
1. To create issues from alerts, select the template in the **Issue Template**
select box.
1. To send [separate email notifications](#notify-developers-of-alerts) to users
with [Developer permissions](../permissions.md), select
**Send a separate email notification to Developers**.
2020-05-24 23:13:21 +05:30
1. Click **Save changes**.
2019-12-26 22:10:19 +05:30
2020-06-23 00:09:42 +05:30
Appropriately configured alerts include an
[embedded chart](../project/integrations/prometheus.md#embedding-metrics-based-on-alerts-in-incident-issues)
for the query corresponding to the alert. You can also configure GitLab to
[close issues](../project/integrations/prometheus.md#taking-action-on-incidents-ultimate)
when you receive notification that the alert is resolved.
### Notify developers of alerts
2019-12-26 22:10:19 +05:30
2020-05-24 23:13:21 +05:30
GitLab can react to the alerts triggered from your applications and services
2020-06-23 00:09:42 +05:30
by creating issues and alerting developers through email. By default, GitLab
sends these emails to [owners and maintainers](../permissions.md) of the project.
These emails contain details of the alert, and a link for more information.
To send separate email notifications to users with
[Developer permissions](../permissions.md), see [Configure incidents](#configure-incidents-ultimate).
2019-12-26 22:10:19 +05:30
2020-06-23 00:09:42 +05:30
## Configure Prometheus alerts
2020-04-08 14:13:33 +05:30
2020-05-24 23:13:21 +05:30
You can set up Prometheus alerts in:
2019-12-26 22:10:19 +05:30
2020-05-24 23:13:21 +05:30
- [GitLab-managed Prometheus](../project/integrations/prometheus.md#setting-up-alerts-for-prometheus-metrics) installations.
2019-12-26 22:10:19 +05:30
- [Self-managed Prometheus](../project/integrations/prometheus.md#external-prometheus-instances) installations.
2020-05-24 23:13:21 +05:30
Prometheus alerts are created by the special Alert Bot user. You can't remove this
user, but it does not count toward your license limit.
2019-12-26 22:10:19 +05:30
2020-06-23 00:09:42 +05:30
## Configure external generic alerts
2019-12-26 22:10:19 +05:30
2020-05-24 23:13:21 +05:30
GitLab can accept alerts from any source through a generic webhook receiver. When
[configuring the generic alerts integration](../project/integrations/generic_alerts.md),
GitLab creates a unique endpoint which receives a JSON-formatted, customizable payload.
2019-12-26 22:10:19 +05:30
2020-05-24 23:13:21 +05:30
## Embed metrics in incidents and issues
2019-12-26 22:10:19 +05:30
2020-06-23 00:09:42 +05:30
You can embed metrics anywhere [GitLab Markdown](../markdown.md) is used, such as descriptions,
2020-05-24 23:13:21 +05:30
comments on issues, and merge requests. Embedding metrics helps you share them
when discussing incidents or performance issues. You can output the dashboard directly
2020-03-13 15:44:24 +05:30
into any issue, merge request, epic, or any other Markdown text field in GitLab
2020-05-24 23:13:21 +05:30
by [copying and pasting the link to the metrics dashboard](../project/integrations/prometheus.md#embedding-gitlab-managed-kubernetes-metrics).
2019-12-26 22:10:19 +05:30
2020-05-24 23:13:21 +05:30
You can embed both
[GitLab-hosted metrics](../project/integrations/prometheus.md#embedding-metric-charts-within-gitlab-flavored-markdown) and
[Grafana metrics](../project/integrations/prometheus.md#embedding-grafana-charts)
in incidents and issue templates.
2019-12-26 22:10:19 +05:30
2020-05-24 23:13:21 +05:30
### Context menu
2020-03-13 15:44:24 +05:30
2020-06-23 00:09:42 +05:30
You can view more details about an embedded metrics panel from the context menu.
To access the context menu, click the **{ellipsis_v}** **More actions** dropdown box
above the upper right corner of the panel. The options are:
2020-03-13 15:44:24 +05:30
2020-05-24 23:13:21 +05:30
- [View logs](#view-logs-from-metrics-panel).
- **Download CSV** - Data from embedded charts can be
[downloaded as CSV](../project/integrations/prometheus.md#downloading-data-as-csv).
2020-03-13 15:44:24 +05:30
2020-05-24 23:13:21 +05:30
#### View logs from metrics panel
2020-03-13 15:44:24 +05:30
2020-06-23 00:09:42 +05:30
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/201846) in GitLab Ultimate 12.8.
2020-04-22 19:07:51 +05:30
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25455) to [GitLab Core](https://about.gitlab.com/pricing/) 12.9.
2020-03-13 15:44:24 +05:30
2020-05-24 23:13:21 +05:30
Viewing logs from a metrics panel can be useful if you're triaging an application
incident and need to [explore logs](../project/integrations/prometheus.md#view-logs-ultimate)
from across your application. These logs help you understand what is affecting
your application's performance and resolve any problems.
2019-12-26 22:10:19 +05:30
2020-06-23 00:09:42 +05:30
## Integrate incidents with Slack
2019-12-26 22:10:19 +05:30
2020-05-24 23:13:21 +05:30
Slack slash commands allow you to control GitLab and view GitLab content without leaving Slack.
2019-12-26 22:10:19 +05:30
Learn how to [set up Slack slash commands](../project/integrations/slack_slash_commands.md)
2020-05-24 23:13:21 +05:30
and how to [use the available slash commands](../../integration/slash_commands.md).
2019-12-26 22:10:19 +05:30
2020-06-23 00:09:42 +05:30
## Integrate issues with Zoom
2019-12-26 22:10:19 +05:30
2020-05-24 23:13:21 +05:30
GitLab enables you to [associate a Zoom meeting with an issue](../project/issues/associate_zoom_meeting.md)
for synchronous communication during incident management. After starting a Zoom
2020-06-23 00:09:42 +05:30
call for an incident, you can associate the conference call with an issue. Your
team members can join the Zoom call without requesting a link.