Commit graph

246 commits

Author SHA1 Message Date
Joey Orlando
006ee4b860
Decrease outgoing webhook timeouts from 10secs to 4secs (#3639)
# Which issue(s) this PR fixes

See all the context
[here](https://raintank-corp.slack.com/archives/C025VMT6SPK/p1704802171131009?thread_ts=1704762857.043879&cid=C025VMT6SPK)

<img width="690" alt="Screenshot 2024-01-09 at 15 26 33"
src="https://github.com/grafana/oncall/assets/9406895/e4c794a3-508d-4f24-af22-0f800828271d">


## Checklist

- [ ] 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)
2024-01-09 19:55:39 -05:00
Michael Derynck
96d3e18eb6 Fix docs 2023-12-14 15:30:14 -07:00
Michael Derynck
1b9e79fdc6 Docs lint 2023-12-14 15:08:49 -07:00
devinrcheevers
166d567d28
Added images to oncall migration guide for alert manager (#3572)
# What this PR does
Added images to oncall migration guide for alert manager
See slack thread (https://raintank-corp.slack.com/archives/C01LJ5F8NRX/p1702576170563749)
## 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)
2023-12-14 14:46:59 -07:00
Matias Bordese
b73da8e2a4
Minor update to schedules API docs (#3488) 2023-12-04 16:01:56 -03:00
jorgeav
4df8985283
Jinja2 template helper filter datetimeformat_as_timezone (#3426)
# What this PR does
Add an additional jinja2 template helper filter to convert a timezone
aware datetime to a different timezone.

## Which issue(s) this PR fixes
Alert payloads that originate from different time zones may include
timestamps having a local time offset. This filter enables
standardization of timestamp timezones.

## 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-12-04 13:39:04 -05:00
github-actions[bot]
64d8bed0eb
Update make docs procedure (#3462)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-11-30 09:58:59 +00:00
Innokentii Konstantinov
fb4bad21d2
Document tojson jinja filter (#3432)
# What this PR does
Document tojson jinja filter
2023-11-28 20:47:57 +08:00
Ildar Iskhakov
393c8e06a7
Merge branch 'main' into dev 2023-11-28 09:59:07 +08:00
Innokentii Konstantinov
85f9b0f168
Log slack bot_id and bot_user_it (#3429)
Log slack bot id and bot user id to check if we can avoid request to
slack api
2023-11-27 18:36:53 +08:00
n3x14
92ed22645c
[Docs] add details inbound email integration setup (#3198)
# What this PR does

This PR adds some more depth to the documentation regarding the setup of
the "Inbound Email" integration.
In particular it references the setup requirement in the integration
documentation and also outlines the requirements for the secret syntax
and usage in the process.

## Which issue(s) this PR fixes

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

## Checklist

- [x] 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-21 13:54:25 -05:00
Joey Orlando
4254f82ead
v1.3.58 2023-11-14 15:17:29 -05:00
Vadim Stepanov
792cf61e78
Mention shift swaps in schedule quality docs (#3337) 2023-11-14 15:36:38 +00:00
Isabel
c9846130f4
Docs: Typo fix (#3210)
# What this PR does
Fixes a typo
## Which issue(s) this PR fixes
N/A
## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] 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-10 15:40:38 -05:00
vivekkoya
6fe741b516
docs: remove stray bullet point & organize subtopic "Possible transit… (#3135)
…ions" in _index.md

---------

Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-11-10 15:40:04 -05:00
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