Skip to content

Commit

Permalink
Fix markdown formatting in docs (grafana#1202)
Browse files Browse the repository at this point in the history
# What this PR does

This PR adds `--fix` flag to `markdownlint` pre-commit command and fixes
existing formatting to comply with markdown formatting rules.

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [x] Documentation added
- [ ] `CHANGELOG.md` updated
  • Loading branch information
iskhakov authored Jan 24, 2023
1 parent e5643fe commit 615a2e8
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 79 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ repos:
hooks:
- id: markdownlint
name: markdownlint
entry: markdownlint --ignore grafana-plugin/node_modules --ignore grafana-plugin/dist --ignore docs **/*.md
entry: markdownlint --fix --ignore grafana-plugin/node_modules --ignore grafana-plugin/dist --ignore docs **/*.md
- id: markdownlint
name: markdownlint - docs
entry: markdownlint -c ./docs/.markdownlint.json ./docs/**/*.md
entry: markdownlint --fix -c ./docs/.markdownlint.json ./docs/**/*.md
35 changes: 24 additions & 11 deletions docs/sources/calendar-schedules/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,51 @@ weight: 1100

# On-call schedules

Grafana OnCall makes it easier to establish consistent and thoughtful on-call coverage while ensuring that alerts don’t go unnoticed. Use Grafana OnCall to:
Grafana OnCall makes it easier to establish consistent and thoughtful on-call coverage while ensuring that alerts don’t
go unnoticed. Use Grafana OnCall to:

- Define coverage needs and avoid gaps in coverage
- Automate alert escalation
- Configure on-call shift notifications
- Configure on-call shift notifications

This section provides conceptual information about Grafana OnCall schedule options.

## About on-call schedules

An on-call schedule consist of one or more rotations that contain on-call shifts. A schedule must be referenced in the corresponding escalation chain for alert notifications to be sent to an on-call user.
An on-call schedule consist of one or more rotations that contain on-call shifts. A schedule must be referenced in the
corresponding escalation chain for alert notifications to be sent to an on-call user.

A fully configured on-call schedule consists of three main components:
A fully configured on-call schedule consists of three main components:

- **Rotations**: A recurring schedule containing a set of on-call shifts that users rotate through.
- **On-call shifts**: The period of time that an individual user is on-call for a particular rotation
- **Escalation Chains**: Automated steps that determine who to notify of an alert group.

- **Escalation Chains**: Automated steps that determine who to notify of an alert group.

## Types of on-call schedules
On-call schedules look different for different organizations and even teams. Grafana OnCall offers three different options for managing your on-call schedules, so you can choose the option that best fits your needs.

On-call schedules look different for different organizations and even teams. Grafana OnCall offers three different
options for managing your on-call schedules, so you can choose the option that best fits your needs.

### Web-based schedule
Configure and manage on-call schedules directly in the Grafana OnCall plugin. Easily configure and preview rotations, see teammates' time zones, and add overrides.

Configure and manage on-call schedules directly in the Grafana OnCall plugin. Easily configure and preview rotations,
see teammates' time zones, and add overrides.

Learn more about [Web-based schedules]({{< relref "web-schedule" >}})

### iCal import
Use any calendar service that uses the iCal format to manage and customize on-call schedules - Import rotations and shifts from your calendar app to Grafana OnCall for widely accessible scheduling. iCal imports appear in Grafana OnCall as read-only schedules but can be leveraged similarly to a web-based schedule.

Use any calendar service that uses the iCal format to manage and customize on-call schedules - Import rotations and
shifts from your calendar app to Grafana OnCall for widely accessible scheduling. iCal imports appear in Grafana
OnCall as read-only schedules but can be leveraged similarly to a web-based schedule.

Learn more about [iCal import schedules]({{< relref "ical-schedules" >}})

### Terraform
Use the Grafana OnCall Terraform provider to manage schedules within your “as-code” workflow. Rotations configured via Terraform are automatically added to your schedules in Grafana OnCall. Similar to the iCal import, these schedules are read-only and cannot be edited from the UI.

To learn more, read our [Get started with Grafana OnCall and Terraform](https://grafana.com/blog/2022/08/29/get-started-with-grafana-oncall-and-terraform/) blog post.
Use the Grafana OnCall Terraform provider to manage schedules within your “as-code” workflow. Rotations configured
via Terraform are automatically added to your schedules in Grafana OnCall. Similar to the iCal import, these schedules
read-only and cannot be edited from the UI.

To learn more, read our [Get started with Grafana OnCall and Terraform](
https://grafana.com/blog/2022/08/29/get-started-with-grafana-oncall-and-terraform/) blog post.
54 changes: 36 additions & 18 deletions docs/sources/calendar-schedules/ical-schedules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,63 @@ weight: 300

# Import on-call schedules

Use your existing calendar app with iCal format to manage and customize on-call schedules — import rotations and shifts from your calendar app to Grafana OnCall for widely accessible scheduling. iCal imported schedules appear in Grafana OnCall as read-only schedules but can be leveraged similarly to a web-based schedule.
Use your existing calendar app with iCal format to manage and customize on-call schedules — import rotations and shifts
from your calendar app to Grafana OnCall for widely accessible scheduling. iCal imported schedules appear in Grafana
OnCall as read-only schedules but can be leveraged similarly to a web-based schedule.

## Before you begin

- Verify that your calendar app supports iCal format
- Verify that your calendar app supports iCal format
- Ensure you have the proper permissions in Grafana OnCall

## Configure an on-call schedule from iCal import

There are three key parts to configuring on-call schedules using iCal import:

1. Create a primary on-call calendar and an optional override calendar in your calendar app.
1. Import the calendars into Grafana OnCall and configure additional schedule settings.
1. Link your schedule to corresponding escalation chains for alert notifications to be sent to the proper on-call user.

### Create your on-call schedule calendar

Create a dedicated calendar to map out your on-call coverage using calendar events. Be sure to take advantage of the features of your calendar app to configure event recurrence, duplicate events, etc.
Create a dedicated calendar to map out your on-call coverage using calendar events. Be sure to take advantage of the
features of your calendar app to configure event recurrence, duplicate events, etc.

>**Note:** The exact steps in this section will vary based on your calendar.
To create an on-call schedule calendar:

1. Create a new calendar in your calendar app, then review and adjust default settings as needed.
1. In your new calendar, create events that represent on-call shifts. You must use Grafana usernames as the event title to associate users with each shift.
1. Once your on-call calendar is complete, go to your calendar settings to locate the secret iCal URL. For example, in a Google calendar, this URL can be found in **Settings** > **Settings for my calendars** > **Integrate calendar** > **Secret address in iCal format**.
1. Create a new calendar in your calendar app, then review and adjust default settings as needed.
2. In your new calendar, create events that represent on-call shifts. You must use Grafana usernames as the event title
3. to associate users with each shift.
4. Once your on-call calendar is complete, go to your calendar settings to locate the secret iCal URL. For example, in
5. a Google calendar, this URL can be found in **Settings** > **Settings for my calendars** > **Integrate calendar** >
6. **Secret address in iCal format**.

To learn more about how to configure your calendar events, refer to Calendar events.

### Import calendar to Grafana On-Call

Once you’ve configured on-call schedules in your calendar app, you can import them via iCal URL to your Grafana OnCall instance.
Once you’ve configured on-call schedules in your calendar app, you can import them via iCal URL to your Grafana OnCall
instance.

>**Note:** Use the secret iCal URL to avoid making the calendar public. If you use the public iCal URL, the calendar and event details must be public for Grafana OnCall to read your calendar.
>**Note:** Use the secret iCal URL to avoid making the calendar public. If you use the public iCal URL, the calendar
> and event details must be public for Grafana OnCall to read your calendar.
To import an on-call schedule:

1. In Grafana OnCall, navigate to the **Schedules** tab and click **+ New schedule**.
1. Navigate to **Import schedule from iCal URL** and click **+ Create**.
1. Copy the secret iCal URL from your calendar and paste it the **Primary schedule iCal URL** field. Repeat this step for the **Override schedule iCal URL** field if you have an override calendar.
1. Provide a name and review available schedule settings.
1. When you’re done, click **Create Schedule**.

2. Navigate to **Import schedule from iCal URL** and click **+ Create**.
3. Copy the secret iCal URL from your calendar and paste it the **Primary schedule iCal URL** field. Repeat this step
4. for the **Override schedule iCal URL** field if you have an override calendar.
5. Provide a name and review available schedule settings.
6. When you’re done, click **Create Schedule**.

### Create an override calendar (Optional)

An override calendar allows for on-call flexibility without modifying the primary schedule. You can use an override calendar to enable users to schedule on-call shifts that will override the primary schedule. Events scheduled on the override calendar will always override overlapping events on the primary calendar.
An override calendar allows for on-call flexibility without modifying the primary schedule. You can use an override
calendar to enable users to schedule on-call shifts that will override the primary schedule. Events scheduled on the
override calendar will always override overlapping events on the primary calendar.

1. Create a new calendar using the same calendar service you used to create the primary calendar.
1. Be sure to set permissions that allow team members to edit the calendar.
Expand All @@ -68,12 +79,19 @@ An override calendar allows for on-call flexibility without modifying the primar

## Calendar events

Whether your schedule is basic or complex, consider how your on-call coverage is structured before configuring your calendar events. To minimize the number of calendar events you need to create, try leveraging recurrence settings and event duplication.
Whether your schedule is basic or complex, consider how your on-call coverage is structured before configuring your
calendar events. To minimize the number of calendar events you need to create, try leveraging recurrence settings and
event duplication.

> **Note:** Each calendar event represents one on-call shift for a specific user. For Grafana OnCall to associate a calendar event with the intended on-call user, you must use their Grafana username as the event title.
> **Note:** Each calendar event represents one on-call shift for a specific user. For Grafana OnCall to associate a
> calendar event with the intended on-call user, you must use their Grafana username as the event title.
### Create overlapping schedules (optional)

If you create schedules that overlap, you can prioritize a schedule by adding a level marker to the calendar event title. You can prioritize schedule overlaps using [L0] - [L9] prioritization. Overlapping calendar events that do not contain a level marker result in all overlapping users receiving notifications.
If you create schedules that overlap, you can prioritize a schedule by adding a level marker to the calendar event
title. You can prioritize schedule overlaps using [L0] - [L9] prioritization. Overlapping calendar events that do not
contain a level marker result in all overlapping users receiving notifications.

For example, users AliceGrafana and BobGrafana have overlapping schedules but BobGrafana is the intended primary contact. The calendar events titles would be `[L1] BobGrafana` and `[L0] AliceGrafana` - In this case AliceGrafana maintains the default [L0] status, and would not receive notifications during the overlapping time with BobGrafana.
For example, users AliceGrafana and BobGrafana have overlapping schedules but BobGrafana is the intended primary
contact. The calendar events titles would be `[L1] BobGrafana` and `[L0] AliceGrafana` - In this case AliceGrafana
maintains the default [L0] status, and would not receive notifications during the overlapping time with BobGrafana.
28 changes: 18 additions & 10 deletions docs/sources/calendar-schedules/web-schedule/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,50 @@ keywords:
weight: 100
---

# About web-based schedules
# About web-based schedules

Grafana OnCall allows you to map out recurring on-call coverage and automate the escalation of alert notifications to on-call users. Configure and manage on-call schedules directly in the Grafana OnCall plugin to easily customize rotations with a live schedule preview, reference teammates' time zones, and add overrides.
Grafana OnCall allows you to map out recurring on-call coverage and automate the escalation of alert notifications to
on-call users. Configure and manage on-call schedules directly in the Grafana OnCall plugin to easily customize
rotations with a live schedule preview, reference teammates' time zones, and add overrides.

This topic provides an overview of key components and features.

For information on how to create a schedule in Grafana OnCall, refer to [Create an on-call schedule]({{< relref "create-schedule" >}})
For information on how to create a schedule in Grafana OnCall, refer to
[Create an on-call schedule]({{< relref "create-schedule" >}})

>**Note**: User permissions determine which components of Grafana OnCall are available to you.

## Schedule settings

Schedule settings are initially configured when a new schedule is created and can be updated at any time by clicking the gear icon next to an existing schedule.
Schedule settings are initially configured when a new schedule is created and can be updated at any time by clicking
the gear icon next to an existing schedule.

Available schedule settings:

- **Slack channel:** Choose a primary Slack channel to send notifications about on-call shifts, such as unassigned on-call shifts.
- **Slack channel:** Choose a primary Slack channel to send notifications about on-call shifts, such as unassigned
- on-call shifts.
- **Slack user group:** Choose a Slack user group to receive current on-call updates.
- **Notification frequency:** Specify whether or not to send shift notifications to scheduled team members.
- **Action for slot when no one is on-call:** Define how your team is notified when an empty shift causes a gap in on-call coverage.
- **Action for slot when no one is on-call:** Define how your team is notified when an empty shift causes a gap in
- on-call coverage.
- **Current shift notification settings:** Select how users are notified when their on-call shift begins.
- **Next shift notification settings:** Specify how users are notified of upcoming shifts.

## Schedule view

The schedule view is a detailed calendar representation of your on-call schedule. It contains three interactive weekly calendars and a 24-hour on-call status bar for visualizing who’s on-call and what time it is for your teammates.
The schedule view is a detailed calendar representation of your on-call schedule. It contains three interactive weekly
calendars and a 24-hour on-call status bar for visualizing who’s on-call and what time it is for your teammates.

Understand your schedule view:

- **Final schedule:** The final schedule provides a combined view of rotations and overrides
- **Rotations:** The rotations calendar represents all recurring on-call rotations for a given schedule.
- **Overrides:** The override calendar represents temporary adjustments to the recurring on-call schedule. Any events on this calendar will take precedence over the rotations calendar.
- **Overrides:** The override calendar represents temporary adjustments to the recurring on-call schedule. Any events
- on this calendar will take precedence over the rotations calendar.

## Schedule export

Export on-call schedules from Grafana OnCall to your preferred calendar app with a one-time secret iCal URL. The schedule export allows you to view on-call shifts alongside the rest of your schedule.
Export on-call schedules from Grafana OnCall to your preferred calendar app with a one-time secret iCal URL. The
schedule export allows you to view on-call shifts alongside the rest of your schedule.

For more information, refer to [Export on-call schedules]({{< relref "calendar-export" >}})
Loading

0 comments on commit 615a2e8

Please sign in to comment.