Commit graph

69 commits

Author SHA1 Message Date
Vadim Stepanov
b7043277a4
Specify queue for apps.email.tasks.notify_user_async 2022-11-04 14:20:26 +00:00
Vadim Stepanov
e2456315af
Allow no-auth SMTP connection for email notifications (#759)
* DEFAULT_FROM_EMAIL -> EMAIL_FROM

* add EMAIL_FROM live setting

* EMAIL_FROM -> EMAIL_FROM_ADDRESS

* merge dev

* add test for get_from_email

* allow live settings to be null on internal API

* remove redundant tests
2022-11-03 16:18:37 +00:00
Matvey Kukuy
85d94d342e
Readme about how to add Integrations and Zabbix Integration (#653)
* Readme and zabbix

* Typos

* Linking
2022-11-02 22:58:47 +08:00
Vadim Stepanov
035584f17e
Enable email backend by default (#740)
* enable email backend by default, catch empty EMAIL_HOST

* fix tests

* fix tests

* fix tests
2022-11-01 13:48:36 +00:00
Joey Orlando
7974f32239
Revert "Revert "Remove migration-tool Django app and UI page (#708)"" 2022-10-27 15:42:21 +02:00
Joey Orlando
56c6a25dfb Revert "Remove migration-tool Django app and UI page (#708)"
This reverts commit 94934bf3e4.
2022-10-27 12:12:57 +02:00
Joey Orlando
94934bf3e4
Remove migration-tool Django app and UI page (#708)
* remove migration_tool app (#687)
* remove migration-tool page (#699)
2022-10-26 15:47:08 +02:00
Vadim Stepanov
e67d3519fe
Restore email notifications (#621)
* remove email verification related code

* remove email verification related code

* remove sendgrid callback

* remove sendgrid related code

* remove sendgrid related code

* rename sendgrid app to email

* remove email from built-in channels

* remove email from built-in channels

* remove email from built-in channels

* add email backend: https://github.com/grafana/oncall/pull/50

* add email templater

* add email templater

* convert md to html

* add email settings to live settings

* use task to send email, handle some exceptions to create logs

* remove ERROR_NOTIFICATION_MAIL_DELIVERY_FAILED usage

* add email limit logic

* fix tests

* add docs

* remove old email templates

* remove old email templates

* add template_fields to messaging backend

* add messaging backends templates to public api

* add comment for deprecated fields

* fix test

* fix tests

* disable email by default

* don't retry on SMTPException and TimeoutError

* add tests

* bring email back to public api docs

* return ERROR_NOTIFICATION_MAIL_LIMIT_EXCEEDED

* make template_fields tuple

* build_subject_and_title -> build_subject_and_message

* add one more comment about template deprecation

* use 8 as backend id

* add comment about gaierror and BadHeaderError

* add comment on importing in notify_user_async

* edit oss docs
2022-10-19 12:32:56 +01:00
Michael Derynck
5f5f427c9f Add middleware to catch exception for missing integration, reduce spamminess of logs 2022-10-13 17:18:22 -06:00
Vadim Stepanov
b84b174e20
Allow multiple database and celery broker types (#582)
* add libs for celery + redis

* move redis & cache config to settings/base.py

* move rmq & celery config to settings/base.py

* BROKER -> BROKER_TYPE

* allow multiple database types

* flake8

* add sqlite db creation to dockerfile

* fix ci

* fix ci

* debug

* remove some defaults

* remove prints

* use local memory as cache on ci

* debug

* add DATABASE_DEFAULTS

* add ci test for sqlite + redis

* add ci test for sqlite + redis

* add ci test for sqlite + redis

* debug

* add redis healthcheck

* fix sqlite

* fix dev settings

* refactor dev settings

* tweak ci settings

* clear cache properly between tests

* move db and broker types to constants

* add librabbitmq deps

* use amqp instead of librabbitmq
2022-10-04 09:25:53 +01:00
Tim Willems
516b2c446a
Changed Redis Connection String possibilities (#538)
* Update helm.py

Changed Redis Connection String possibilities
added Redis Username
added Redis Protocol

Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
2022-09-27 17:20:41 +02:00
Joey Orlando
e16064c6ba
#539 - add slack permalink to alert group public API response (#543)
* add .python-version to .gitignore

* add .nvmrc to frontend

Also update DEVELOPER.md to mention optionally using nvm

* update DEVELOPER.md to reflect running successfully locally

* markdown autoformatter styling changes

* add slack permalink to alertgroup public api http response

* update changelog

* address PR comments

- rename permalink to permalinks in alert group public api seralizer
- add permalinks property to AlertGroup model
- update public api alert groups test
- update alertgroups public documentation to include permalinks property

* add default DEBUG = True in dev.py settings
2022-09-22 15:17:17 +02:00
Michael Derynck
455321938e
Merge pull request #475 from grafana/add-organization-cleanup-task
Add task to delete organizations if their stack has been deleted in gcom
2022-09-08 10:07:44 -06:00
Michael Derynck
b79aa95d42 Tweaks from code review, add schedule and queue assignment 2022-09-07 07:58:44 -06:00
Vadim Stepanov
afe13550da
Alert group search (#488)
* use web title template to render alert group verbose name

* remove group_verbose_name from tests

* clean up group_verbose_name

* remove verbose_name from API & plugin

* verbose_name migration

* update verbose name on web title template change

* use long queue for updating verbose name

* use first alert for updating verbose name

* improve batch_ids

* fix update_verbose_name

* post-review fixes

* post-review fixes
2022-09-06 11:30:12 +01:00
Matias Bordese
c9ea6e4728 Add web_schedules feature flag 2022-09-02 15:37:33 -03:00
Vadim Stepanov
cc67d49047
Remove outdated tasks & DynamicSettingsManager (#465) 2022-09-01 17:50:17 +01:00
Ildar Iskhakov
4f6968fc4b
Bump celery version, telegram version (#454)
* Bump celery version, telegram version

* Bump kombu version
2022-09-01 11:37:52 +01:00
Innokentii Konstantinov
ba1dfd853f Fix GRAFANA_CLOUD_ONCALL_API_URL 2022-08-31 14:27:12 +05:00
Innokentii Konstantinov
b703130dcb Revert "Fix GRAFANA_CLOUD_ONCALL_API_URL"
This reverts commit fb67003f1e.
2022-08-29 17:36:27 +05:00
Innokentii Konstantinov
fb67003f1e Fix GRAFANA_CLOUD_ONCALL_API_URL 2022-08-29 17:34:27 +05:00
Innokentii Konstantinov
8730a8c7e4 use insight instead of insight_logs 2022-08-24 13:39:05 +05:00
Innokentii Konstantinov
4765c9b07c
Insight logs (#348)
* Entity events insight logs

* Insight logging

* Fix event for updating templates

* Format fixes

* Remove organization_log_type.py

* Simplify signature of chatops_insight_log

* insight logs formatting

* Add possibility to enable all insight logging via DynamicSetting

* Fixes

* Style fixes

* Add migration

* Fix migration
2022-08-24 12:04:44 +05:00
Innokentii Konstantinov
b58f32e396
Set DATA_UPLOAD_MAX_MEMORY_SIZE to 1mb (#393)
* Set DATA_UPLOAD_MAX_MEMORY_SIZE to 1mb

* Remove comment

* More clear DATA_UPLOAD_MAX_MEMORY_SIZE literal

* Add getenv_integer
2022-08-24 11:59:01 +05:00
Matias Bordese
c73df126cc
Merge pull request #359 from grafana/matiasb/messaging-backends-explicit-enum
Make messaging backends enum be defined explicitly
2022-08-22 12:14:46 -03:00
Michael Derynck
4c37e199e9
Merge pull request #369 from grafana/static-url-env-var
Make STATIC_URL configurable from env
2022-08-15 14:24:57 -06:00
Michael Derynck
0221ce612a Make STATIC_URL configurable from env 2022-08-15 12:08:53 -06:00
Matias Bordese
2a2ecb6612 Make messaging backends enum be defined explicitly 2022-08-11 17:26:45 -03:00
Matias Bordese
3b3802870a Add postgresql support for development/testing 2022-08-08 15:33:40 -03:00
Innokentii Konstantinov
819add5f2e
Add DANGEROUS_WEBHOOKS_ENABLED live setting (#286)
* Add DANGEROUS_WEBHOOKS_ENABLED live setting

* Style fix

* Fix DANGEROUS_WEBHOOKS_ENABLED check
2022-08-02 14:20:18 +04:00
Vadim Stepanov
a1b1b83fd1
Optimize alert group list view (#299)
* Revert "Revert "Alert list view & caching rework (#216)""

This reverts commit 730dccc3

* Revert "fix AlertGroupClassicMarkdownRenderer"

This reverts commit 82e53d8e0c513feb8aaef332fc1d3800e90538fc.

* optimize alert group list view

* optimize alert group list view
2022-07-27 14:14:59 +03:00
Innokentii Konstantinov
972bfd9c68 Fix propagation for the insight logger 2022-07-25 12:59:12 +04:00
Ildar Iskhakov
d08425e17d Add logger for insight logs 2022-07-22 15:09:52 +03:00
Vadim Stepanov
0985cb4cb5
Rollback alert group list rework (#269)
* Revert "Alert list view & caching rework (#216)"

This reverts commit 16bbfbbe

* fix AlertGroupClassicMarkdownRenderer
2022-07-21 15:23:02 +01:00
Ildar Iskhakov
6bf7d7d075 Fix wrong env var for mobile app settings 2022-07-20 13:56:02 +03:00
Ildar Iskhakov
035d5e99c7 Fix linter 2022-07-20 10:58:54 +03:00
Ildar Iskhakov
ee7a58b5cf Add fixes for the mobile app 2022-07-20 10:26:14 +03:00
Georgy Poputnikov
ad9ea4eefa fix: default value for vhost 2022-07-17 17:43:02 +03:00
Georgy Poputnikov
0e35991ac8 feat: allow setting vhost for rabbitmq instance 2022-07-17 17:18:06 +03:00
Vadim Stepanov
16bbfbbe73
Alert list view & caching rework (#216)
* remove cache usage in AlertGroupView

* remove CustomSearchFilter

* remove caching for alerts

* remove readonly db setup

* render templates on alert creation

* serialize only necessary fields on alert groups list

* optimize AlertGroupListSerializer

* return on-demand templating for alerts

* return on-demand templating for alert groups

* use CursorPaginator

* remove templating on alert create

* pass alert to AlertGroupWebRenderer

* alert_count -> alerts_count

* make sql joins after pagination

* add migration

* bring alert.save() back

* fix tests

* fix tests

* fix tests

* add perpage query param

* add cursor pagination to incidents page

* remove cached_render_for_web usage

* post merge fix

* keep cursor

* lint

* remove get_alert_groups_and_days_for_previous_same_period

* fix pagination on navigate

* refine search_fields on AlertGroupView

Co-authored-by: Maxim <hello.makson@gmail.com>
Co-authored-by: Maxim <maxim.mordasov@grafana.com>
2022-07-14 15:19:25 +01:00
Joshua Pare
0fd1a2146c allow rabbitmq protocol to be default amqp but configurable (for services like AmazonMQ which use amqps) 2022-06-29 09:02:19 -04:00
Matias Bordese
2a5e0dc1f1
Merge pull request #43 from grafana/remove-unused-feature-flag
Remove unused messaging backends feature flag
2022-06-15 14:29:26 -03:00
Matias Bordese
3a69ddcc70 Add missing slack settings to live settings mapping 2022-06-15 11:39:12 -03:00
Ildar Iskhakov
ff22836ec5 Edit README.md, fix linting 2022-06-14 20:47:34 +03:00
Ildar Iskhakov
7a2ebf16ab Edit settings/helm.py 2022-06-14 20:05:29 +03:00
Michael Derynck
4572131951
Merge dev to main (#73)
* Log (failed) attempt to notify a user with viewer role

* Remove old publishing workflow

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add publishing workflows for next (unreleased) and released documentation

Notable features:
- Merges are blocked by strict Hugo reference checking. However, this
only works for references that resolve within the repository. Once you
have Hugo references to website pages beyond this repository, you will
want to remove this test job.
- Pushes to main are automatically published to "next" documentation
consistent with our other OSS projects.
- Pushes of release tags publish to a versioned directory in the
website. The website uses `v<MAJOR>.<MINOR>.x` versioning and the
"Determine technical documentation version" step will make sure that a
tag such as `v0.20.7` is mapped to `v0.20.x`.
- Pushes to release branches will only be published if there is an
existing corresponding release tag. For example, pushing to a new
release branch `release-0.1000` will not trigger a publish of
documentation until there is a `v0.1000.0` release tag.

> **Note:** I have used a release branch naming convention
`release-<MAJOR>-<MINOR>` which is consistent with grafana/mimir but I
see that in the old amixr repository there are long lived release
branches for patch versions. If that is required. I can update this PR
to support that but I would recommend not including patch versions in
release branch naming unless you have a good reason to do so.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add helm chaart installation

* s/mimir/oncall/

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove https:// prefix from BASE_URL docker env var

* Fix cloud heartbeat name

* Polishing telegram

* Update docker-compose.yml

* Update plugin README  (#48)

* Update README and screenshot, remove plop for build info since version is now displayed prominently

* Sign build

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Build actions (#38)

* Drone, github action changes

* Minor version updates

* Update frontend dependencies

* Re-enable unit test

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Revert stylelint version (#52)

* Revert stylelint version

* Build plugin as well as lint

* Build in previous step

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Update screenshot (#53)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* oncall images for docs (#55)

* Fix chart

* Finalise helm chart

* Update README.md

* Top menu fix

* Fix db encoding

* Add api key docs

* Reverting utf8 fix

* bug fixes

* fix for link for OSS version

* Fixing utf8 and docker compose

* 8080 -> 8000 port for consistency

* Improve the helm chart

* makeReq

* Fixing images

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Add last moment improvements

* Fixing port

* Replace symlink with file for CHANGELOG.MD (#68)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Edit Chart.yaml

* Edit version

* Edit README.md

* Fixing port

* Update README.md

* Fix linting

* image: grafana/oncall

* Merge dev to main (#71)

* Merge dev to main (#54)

* Log (failed) attempt to notify a user with viewer role

* Remove https:// prefix from BASE_URL docker env var

* Fix cloud heartbeat name

* Polishing telegram

* Update docker-compose.yml

* Update plugin README  (#48)

* Update README and screenshot, remove plop for build info since version is now displayed prominently

* Sign build

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Build actions (#38)

* Drone, github action changes

* Minor version updates

* Update frontend dependencies

* Re-enable unit test

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Revert stylelint version (#52)

* Revert stylelint version

* Build plugin as well as lint

* Build in previous step

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Update screenshot (#53)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

Co-authored-by: Matias Bordese <mbordese@gmail.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Matvey Kukuy <matvey@amixr.io>
Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Merge dev to main (#69)

* Log (failed) attempt to notify a user with viewer role

* Remove https:// prefix from BASE_URL docker env var

* Fix cloud heartbeat name

* Polishing telegram

* Update docker-compose.yml

* Update plugin README  (#48)

* Update README and screenshot, remove plop for build info since version is now displayed prominently

* Sign build

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Build actions (#38)

* Drone, github action changes

* Minor version updates

* Update frontend dependencies

* Re-enable unit test

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Revert stylelint version (#52)

* Revert stylelint version

* Build plugin as well as lint

* Build in previous step

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Update screenshot (#53)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* oncall images for docs (#55)

* Update README.md

* Top menu fix

* Fix db encoding

* Add api key docs

* Reverting utf8 fix

* bug fixes

* fix for link for OSS version

* Fixing utf8 and docker compose

* 8080 -> 8000 port for consistency

* makeReq

* Fixing images

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Replace symlink with file for CHANGELOG.MD (#68)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

Co-authored-by: Matias Bordese <mbordese@gmail.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Matvey Kukuy <matvey@amixr.io>
Co-authored-by: Michael Derynck <michael.derynck@grafana.com>
Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com>
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>

Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Matias Bordese <mbordese@gmail.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
Co-authored-by: Matvey Kukuy <matvey@amixr.io>
Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com>
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>

Co-authored-by: Matias Bordese <mbordese@gmail.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Ildar Iskhakov <ildar.iskhakov@grafana.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Matvey Kukuy <matvey@amixr.io>
Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com>
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2022-06-14 09:54:41 -06:00
Michael Derynck
846b898bb9
Merge dev to main (#69)
* Log (failed) attempt to notify a user with viewer role

* Remove https:// prefix from BASE_URL docker env var

* Fix cloud heartbeat name

* Polishing telegram

* Update docker-compose.yml

* Update plugin README  (#48)

* Update README and screenshot, remove plop for build info since version is now displayed prominently

* Sign build

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Build actions (#38)

* Drone, github action changes

* Minor version updates

* Update frontend dependencies

* Re-enable unit test

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Revert stylelint version (#52)

* Revert stylelint version

* Build plugin as well as lint

* Build in previous step

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Update screenshot (#53)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* oncall images for docs (#55)

* Update README.md

* Top menu fix

* Fix db encoding

* Add api key docs

* Reverting utf8 fix

* bug fixes

* fix for link for OSS version

* Fixing utf8 and docker compose

* 8080 -> 8000 port for consistency

* makeReq

* Fixing images

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Fixing port

* Replace symlink with file for CHANGELOG.MD (#68)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

Co-authored-by: Matias Bordese <mbordese@gmail.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Matvey Kukuy <matvey@amixr.io>
Co-authored-by: Michael Derynck <michael.derynck@grafana.com>
Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com>
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2022-06-14 09:14:45 -06:00
Michael Derynck
66e8cf2cbc
Merge dev to main (#54)
* Log (failed) attempt to notify a user with viewer role

* Remove https:// prefix from BASE_URL docker env var

* Fix cloud heartbeat name

* Polishing telegram

* Update docker-compose.yml

* Update plugin README  (#48)

* Update README and screenshot, remove plop for build info since version is now displayed prominently

* Sign build

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Build actions (#38)

* Drone, github action changes

* Minor version updates

* Update frontend dependencies

* Re-enable unit test

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Revert stylelint version (#52)

* Revert stylelint version

* Build plugin as well as lint

* Build in previous step

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

* Update screenshot (#53)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>

Co-authored-by: Matias Bordese <mbordese@gmail.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Matvey Kukuy <matvey@amixr.io>
Co-authored-by: Michael Derynck <michael.derynck@grafana.com>
2022-06-13 16:39:58 -06:00
Matvey Kukuy
85de2f65af Removing excessive OSS_INSTALLATION from dev setting 2022-06-13 16:13:24 +03:00
Innokentii Konstantinov
48bfe86d62
Add cloud connection statuses on user page (#34)
* Add cloud connection statuses on user page

* Add fixes for oncall hobby docker-compose installation

* Fix for links and for cloud user status at User settings

* Delete cloud api token on cloud disconnect

* Merge branch 'dev' into cloud_connection_statuses_on_user_page

* Fix cloud statuses for users

* Fix usagestats service

* Fix phone verification message in users table

* added request after syncing user

* Add endpoint to create CloudHeartbeat and polish code

* Fix imports

* Check token and heartbeat setting in setup_hertbeat_integration

* Add macthed_users_count in cloud users

* Sync users on token change

* Fix query param

* Fix tests

* Heartbit button logic, tab width fix, coount users fix

* Solve problem of existent cloud heartbeat integration

* Solve problem of existent cloud heartbeat integration 2

* Solve problem of existent cloud heartbeat integration 3

* fix build

* build fix, styles for env variables description

Co-authored-by: Ildar Iskhakov <ildar.iskhakov@grafana.com>
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2022-06-13 16:29:08 +04:00