Commit graph

231 commits

Author SHA1 Message Date
Tomica-G
6ca7c441d9
Update _index.md (#3088)
# What this PR does
Fixed a typo in the line #93 (changed `doen't` to `doesn't`)

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [* ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-11-10 15:37:04 -05:00
Ravishankar
152b1b1c58
fix(3093) Return timezone field of the user via public API (#3311)
# What this PR does
Return the `timezone` field for the users GET API call
## Which issue(s) this PR fixes

Closes #3093 

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-11-10 11:47:11 -05:00
Matias Bordese
dd348f01f9 Merge branch 'main' into dev 2023-11-09 10:22:24 -03:00
Innokentii Konstantinov
e62bb14b2c
Specify new AM migration date (#3288) 2023-11-09 20:57:15 +08:00
Matias Bordese
a1703c7fdb Really fix docs lint 2023-11-09 09:52:15 -03:00
Matias Bordese
f46df97c6b
Fix lint issue 2023-11-09 09:37:39 -03:00
Matias Bordese
7945ad620c
Fix lint and extra minor update 2023-11-09 09:34:01 -03:00
Pangidoan Butar
3683f407f4
A few clarifications and updates for "Notify whole Slack channel" and "Notify Slack User Group"
https://github.com/grafana/support-escalations/issues/8169#issuecomment-1799997674
2023-11-09 09:28:32 +08:00
Dominik Broj
eeaec77fbb
Unify Grafana Cloud OnCall wording (#3279)
# What this PR does

- Unify naming in the app of Grafana Cloud / Cloud OnCall / Grafana
Cloud OnCall so that it's always **Grafana Cloud OnCall**
- Unify naming the same way in docs

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/1468

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-11-07 10:08:39 +00:00
jorgeav
80f5818850
Jinja2 template helper filter b64decode (#3242)
# What this PR does
Add an additional jinja2 template helper filter to decode base64-encoded
strings.

An example of an incoming integration payload that would benefit from
this filter is GCP's pubsub message:

https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage 

## Which issue(s) this PR fixes

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Jorge Vargas <jorge.vargas@homeprotech.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
2023-11-06 15:42:25 -05:00
github-actions[bot]
f80d035030
Update make docs procedure (#3265)
[Use versioned action to update make-docs
procedure](d9c09cce58)

[d9c09cc](d9c09cce58)

https://github.com/grafana/writers-toolkit/blob/main/update-make-docs/action.yml

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-11-06 10:09:09 +00:00
Innokentii Konstantinov
6367e3568e
Change expected migration date for alertmanager (#3250) 2023-11-02 19:01:48 +08:00
github-actions[bot]
6fbc7bebda
Update make docs procedure (#3235)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-11-01 11:05:51 +00:00
Joey Orlando
697248dc75
Add responders improvements (#3128)
# What this PR does

https://www.loom.com/share/c5e10b5ec51343d0954c6f41cfd6a5fb

## Summary of backend changes
- Add `AlertReceiveChannel.get_orgs_direct_paging_integrations` method
and `AlertReceiveChannel.is_contactable` property. These are needed to
be able to (optionally) filter down teams, in the `GET /teams` internal
API endpoint
([here](https://github.com/grafana/oncall/pull/3128/files#diff-a4bd76e557f7e11dafb28a52c1034c075028c693b3c12d702d53c07fc6f24c05R55-R63)),
to just teams that have a "contactable" Direct Paging integration
- `engine/apps/alerts/paging.py`
- update these functions to support new UX. In short `direct_paging` no
longer takes a list of `ScheduleNotifications` or an `EscalationChain`
object
  - add `user_is_oncall` helper function
- add `_construct_title` helper function. In short if no `title` is
provided, which is the case for Direct Pages originating from OnCall
(either UI or Slack), then the format is `f"{from_user.username} is
paging <team.name (if team is specified> <comma separated list of
user.usernames> to join escalation"`
- `engine/apps/api/serializers/team.py` - add
`number_of_users_currently_oncall` attribute to response schema
([code](https://github.com/grafana/oncall/pull/3128/files#diff-26af48f796c9e987a76447586dd0f92349783d6ea6a0b6039a2f0f28bd58c2ebR45-R52))
- `engine/apps/api/serializers/user.py` - add `is_currently_oncall`
attribute to response schema
([code](https://github.com/grafana/oncall/pull/3128/files#diff-6744b5544ebb120437af98a996da5ad7d48ee1139a6112c7e3904010ab98f232R157-R162))
- `engine/apps/api/views/team.py` - add support for two new optional
query params `only_include_notifiable_teams` and `include_no_team`
([code](https://github.com/grafana/oncall/pull/3128/files#diff-a4bd76e557f7e11dafb28a52c1034c075028c693b3c12d702d53c07fc6f24c05R55-R70))
- `engine/apps/api/views/user.py`
- in the `GET /users` internal API endpoint, when specifying the
`search` query param now also search on `teams__name`
([code](https://github.com/grafana/oncall/pull/3128/files#diff-30309629484ad28e6fe09816e1bd226226d652ea977b6f3b6775976c729bf4b5R223);
this is a new UX requirement)
- add support for a new optional query param, `is_currently_oncall`, to
allow filtering users based on.. whether they are currently on call or
not
([code](https://github.com/grafana/oncall/pull/3128/files#diff-30309629484ad28e6fe09816e1bd226226d652ea977b6f3b6775976c729bf4b5R272-R282))
- remove `check_availability` endpoint (no longer used with new UX; also
removed references in frontend code)
- `engine/apps/slack/scenarios/paging.py` and
`engine/apps/slack/scenarios/manage_responders.py` - update Slack
workflows to support new UX. Schedules are no longer a concept here.
When creating a new alert group via `/escalate` the user either
specifies a team and/or user(s) (they must specify at least one of the
two and validation is done here to check this). When adding responders
to an existing alert group it's simply a list of users that they can
add, no more schedules.
- add `Organization.slack_is_configured` and
`Organization.telegram_is_configured` properties. These are needed to
support [this new functionality
](https://github.com/grafana/oncall/pull/3128/files#diff-9d96504027309f2bd1e95352bac1433b09b60eb4fafb611b52a6c15ed16cbc48R271-R272)
in the `AlertReceiveChannel` model.

## Summary of frontend changes
- Refactor/rename `EscalationVariants` component to `AddResponders` +
remove `grafana-plugin/src/containers/UserWarningModal` (no longer
needed with new UX)
- Remove `grafana-plugin/src/models/user.ts` as it seemed to be a
duplicate of `grafana-plugin/src/models/user/user.types.ts`

Related to https://github.com/grafana/incident/issues/4278

- Closes #3115
- Closes #3116
- Closes #3117
- Closes #3118 
- Closes #3177 

## TODO
- [x] make frontend changes
- [x] update Slack backend functionality
- [x] update public documentation
- [x] add/update e2e tests

## Post-deploy To-dos
- [ ] update dev/ops/production Slack bots to update `/escalate` command
description (should now say "Direct page a team or user(s)")

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-10-27 12:12:07 -04:00
A.creature
a1aaf086eb
Add missing step in Zvonok (#2780)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
2023-10-25 15:13:45 -04:00
github-actions[bot]
9991c3c899
Update make docs procedure (#3190)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-10-25 09:27:43 +00:00
github-actions[bot]
66b0d163aa
Update make docs procedure (#3182)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-10-23 07:24:03 +00:00
github-actions[bot]
d3b6f574d0
Update make docs procedure (#3166)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-10-20 09:23:41 +00:00
github-actions[bot]
525c963fc6
Update make docs procedure (#3131)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-10-06 08:30:49 +00:00
Vadim Stepanov
1acb7018d0
Improve alert group deletion API (#3124)
# What this PR does

- Invalidate alert group cache on wipe
- Improve public API docs on alert group deletion
- Add / improve tests

## Which issue(s) this PR fixes

Related to https://github.com/grafana/oncall/issues/3051

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-10-05 14:32:40 +01:00
Vadim Stepanov
a727450d49
Public API: Acknowledge & Resolve actions (#3108)
# What this PR does

Makes it possible to acknowledge/unacknowledge and resolve/unresolve
alert groups via public API, and makes sure these actions are reflected
properly in the alert group timeline.

## Demo

```bash
curl --request POST \
     --header "Authorization: TOKEN" \
     http://localhost:8080/api/v1/alert_groups/IQMHLV8INB24N/resolve
```

<img width="651" alt="Screenshot 2023-10-04 at 16 05 27"
src="https://github.com/grafana/oncall/assets/20116910/d4e66868-0132-4b6b-95c7-8424fced7c0b">

## Which issue(s) this PR fixes

https://github.com/grafana/oncall/issues/3051

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-10-05 09:46:48 +01:00
Matvey Kukuy
6dcd443e89
Fixing broken links in docs (#3097)
Broken links fixes.
Closes https://github.com/grafana/oncall-private/issues/2167

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-10-05 11:41:31 +03:00
Joey Orlando
b0e0f646d8
add new 'Alert Groups Direct Paging' RBAC role (#3107)
# What this PR does

Closes #3095

https://www.loom.com/share/6c1a3e9970814f7c83d5cbd72cb5e6b5

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-10-03 19:28:26 -04:00
Matias Bordese
508c169ab4
Update labels and add note for cloud-only integrations in docs (#3075)
Related to https://github.com/grafana/oncall/issues/2616
2023-10-02 10:14:03 -03:00
Michael Derynck
b5a8b8b168
Add webhook presets (#2996)
# What this PR does
Add a system similar to how we select integrations when creating
webhooks so that the user has a description of what webhookds do and
does not have to write complex templates for common webhook use cases.
Presets allow us to create the contents of the webhooks in code and
define which fields are controlled by the preset. Some specifics:

- Newly created webhooks must choose between Simple, Advanced or another
predefined system
- Simple is always an escalation step and will post the entire payload
to the given URL
- Advanced is the same as no preset which is our current view where all
fields are available
- There are no changes for all existing webhooks with empty preset
fields
- Once a webhook is created with a preset the preset cannot be changed
- Fields in the webhook that are populated by code will give a
validation error if they are modified
- In the public API webhooks with presets are returned for viewing but
cannot be created or modified. This restriction is in place because the
Web UI provides the context for which fields to use with a preset. The
public API is for interacting with webhooks where all fields are
defined.

To define a preset create a file with metadata and an override function.
The metadata drives validation and what to display in the UI. There are
two functions one is connected to the pre_save hook of the Webhook model
for persistent changes, the other replaces parameters at execution time
for ephemeral changes. See the simple and advanced presets as an
example. The file must be listed in settings in
`INSTALLED_WEBHOOK_PRESETS` to be enabled at runtime..

## Which issue(s) this PR fixes

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-09-27 07:22:52 -06:00
Matias Bordese
9ead70a4ed
Add schedules enable_web_overrides option to public API (#3062)
Related updates (to be merged afterwards):
- https://github.com/grafana/amixr-api-go-client/pull/14
- https://github.com/grafana/terraform-provider-grafana/pull/1056
2023-09-26 14:04:53 -03:00
github-actions[bot]
2848836f6f
Update make docs procedure (#3048)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-09-20 16:02:27 +00:00
github-actions[bot]
69fcb58408
Update make docs procedure (#3033)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-09-18 09:39:26 +00:00
Matias Bordese
9c3979a712
Update escalation policies public API to handle new webhooks (#2999)
Support new webhooks when creating or updating.
Return existing information if still using previous custom button
actions.

Fixed  #2998
2023-09-11 10:50:18 -03:00
github-actions[bot]
4a53df0c9b
Update make docs procedure (#2952)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-09-04 11:47:17 +00:00
Joey Orlando
73da83274a
Update Shift Swap Request Slack message formatting (#2918)
# What this PR does

Updates Shift Swap Request Slack message formatting to be consistent
with UI mockups:

**New Request**
![Screenshot 2023-08-30 at 12 18
54](https://github.com/grafana/oncall/assets/9406895/712a13e2-b768-4be6-b066-c5daa98446eb)

**Accepted**
![Screenshot 2023-08-30 at 12 19
41](https://github.com/grafana/oncall/assets/9406895/84d14adf-bb48-4ba8-bee2-eb7931ef2d55)


**Deleted**
![Screenshot 2023-08-30 at 12 19
01](https://github.com/grafana/oncall/assets/9406895/9bda06c8-5ce7-405b-9303-b160eac4d635)


## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-09-01 07:53:27 +02:00
Simon Crute
15e02c7f30
Remove duplicate line (#2934)
remove duplicate line in first example.

# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-08-31 13:15:27 -06:00
github-actions[bot]
8bfe690b23
Update make docs procedure (#2925)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-08-31 09:20:01 +00:00
Yulya Artyukhina
26cc044390
Correct escalation policies public api documentation (#2830)
# What this PR does
Corrects escalation_policies public api docs

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/2746

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-08-25 07:59:20 +02:00
Joey Orlando
4581add17c
fix public docs iframe issue 2023-08-25 07:52:21 +02:00
Alexander Cherepanov
ec028eb9d9
Telegram long polling (#2250)
# What this PR does

Runs Telegram long polling to get updates. 
It's enabled by setting `FEATURE_TELEGRAM_LONG_POLLING_ENABLED=True`.
That will disable webhook and run separate deployment for telegram long
polling.

Telegram long polling is not very HA mode, but it does not need to
expose webhook url to internet and simplifies telegram integration.

## Which issue(s) this PR fixes

closes #561 

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-08-24 09:12:24 +02:00
Matias Bordese
2c2497e2d1
Enable shifts export endpoint for all schedule types (#2863)
Related to https://github.com/grafana/oncall/issues/2799
2023-08-23 11:07:06 -03:00
github-actions[bot]
4b86e6f737
Update make docs procedure (#2866)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-08-23 09:49:42 +00:00
Michael Derynck
7440a836da
Webhooks Public API (#2790)
# What this PR does
- Add public API for Webhooks CRUD, and GET webhook responses
- Add insight resource logs for internal and public webhook API calls
- Change public actions API to wrap Webhooks to maintain compatibility
with existing callers
 

## Which issue(s) this PR fixes

#2792 
#2793 

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-08-22 14:05:52 -06:00
Joey Orlando
b9a9cd2659
add shift swap request demo video to public docs (#2858)
# What this PR does

Adds a demo video for Shift Swaps to the public documentation.

Closes #2832 

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-08-22 15:26:08 +02:00
Matias Bordese
c9cb4328e8
Add documentation about shift swap requests (#2719)
Related to https://github.com/grafana/oncall/issues/2589

---------

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
Co-authored-by: Dieter Plaetinck <dieter@plaetinck.be>
2023-08-17 10:47:16 -03:00
github-actions[bot]
22686669c9
Update make docs procedure (#2808)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-08-17 11:46:49 +00:00
Matias Bordese
a459d8b031
Add shift swaps API docs (#2784)
API added by https://github.com/grafana/oncall/pull/2775
2023-08-16 14:16:37 -03:00
Joey Orlando
8db1ea5235
remove some references to amixr (#2698)
# What this PR does

Update references to amixr in various spots in the docs/code + some
`.md` IDE autoformatter changes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-08-01 14:22:42 -04:00
Innokentii Konstantinov
63a66cce2c Merge branch 'main' into dev
# Conflicts:
#	docs/sources/get-started/_index.md
#	docs/sources/integrations/zabbix/index.md
2023-08-01 14:19:23 +08:00
Innokentii Konstantinov
a9b311f46b Fix indentation for AM payload example 2023-08-01 12:34:08 +08:00
Innokentii Konstantinov
1ccb9d6979
AlertManager v2 (#2643)
Introduce AlertManager v2 integration with improved internal behaviour

it's using grouping from AlertManager, not trying to re-group alerts on
OnCall side.
Existing AlertManager and Grafana Alerting integrations are marked as
Legacy with options to migrate them manually now or be migrated
automatically after DEPRECATION DATE(TBD).
Integration urls and public api responses stay the same both for legacy
and new integrations.

---------

Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-08-01 12:18:52 +08:00
Matias Bordese
d90c4d9cbd
Fix docs lint issues (#2699) 2023-07-31 17:07:19 -03:00
Zach Day
655ecd3aef
Update index.md (#2513)
Add a small note about the trailing slash for the OnCall Integration
URL.

# What this PR does
A user contacted Support because they were confused by the need for a
trailing slash for the alertmanager oncall integration url. This PR is
an attempt to briefly call out the trailing slash is required in an
effort to prevent user confusion in the future.

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
Co-authored-by: mallettjared <110853992+mallettjared@users.noreply.github.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Wei-Chin Call <wei-chin.call@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
2023-07-31 11:35:40 -04:00
Vadim Stepanov
09c1b7c665
Merge pull request #2695 from grafana/dev
v1.3.20
2023-07-31 14:29:50 +01:00