Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect telegram account and send notification not Admin user #1617

Closed
artem-shestakov opened this issue Mar 24, 2023 · 7 comments · Fixed by #2075
Closed

Can't connect telegram account and send notification not Admin user #1617

artem-shestakov opened this issue Mar 24, 2023 · 7 comments · Fixed by #2075

Comments

@artem-shestakov
Copy link

artem-shestakov commented Mar 24, 2023

Hi 👋!

  • Open Source OnCall.
  • Plugins version v1.1.40

Can't connect Telegram account and send notification not Admin user (Organization role). If user's role is Viewer or Editor, thare now connection options in profile. If click connect in profile telegram section there are messge You do not have permission to perform this action. Ask an admin to upgrade your permissions. on Telegram Connection tab.

If user with Admin role and witch connected Telegram account will change role to Viewer or Editor, onCall will not send notification in Telegram. Logs:

2023-03-24 13:01:29,047 source=engine:celery worker=ForkPoolWorker-4 task_id=bf48a7e2-b3e1-4169-b6e9-146fde38739b task_name=apps.alerts.tasks.escalate_alert_group.escalate_alert_group name=apps.alerts.tasks.task_logger level=DEBUG Start escalate_alert_group for alert_group 381
2023-03-24 13:01:29,062 source=engine:celery worker=ForkPoolWorker-4 task_id=bf48a7e2-b3e1-4169-b6e9-146fde38739b task_name=apps.alerts.tasks.escalate_alert_group.escalate_alert_group name=apps.alerts.escalation_snapshot.snapshot_classes.escalation_snapshot level=DEBUG Starting to execute escalation step Notify multiple Users with order 0
2023-03-24 13:01:29,066 source=engine:celery worker=ForkPoolWorker-4 task_id=bf48a7e2-b3e1-4169-b6e9-146fde38739b task_name=apps.alerts.tasks.escalate_alert_group.escalate_alert_group name=apps.alerts.models.alert_group_log_record level=DEBUG send_update_log_report_signal for alert_group 381, alert group event: Escalation triggered
2023-03-24 13:01:29,068 source=engine:celery worker=MainProcess task_id=??? task_name=??? name=celery.worker.strategy level=INFO Task apps.alerts.tasks.send_update_log_report_signal.send_update_log_report_signal[579a2ffb-78f3-4b3c-abb3-bfcf1a6237aa] received
2023-03-24 13:01:29,069 source=engine:celery worker=ForkPoolWorker-4 task_id=bf48a7e2-b3e1-4169-b6e9-146fde38739b task_name=apps.alerts.tasks.escalate_alert_group.escalate_alert_group name=apps.alerts.models.alert_group_log_record level=DEBUG send_update_log_report_signal for alert_group 381, alert group event: Escalation triggered
2023-03-24 13:01:29,070 source=engine:celery worker=MainProcess task_id=??? task_name=??? name=celery.worker.strategy level=INFO Task apps.alerts.tasks.send_update_log_report_signal.send_update_log_report_signal[12c13ead-06c1-4109-b42a-8d7e6e9cd548] received
2023-03-24 13:01:29,071 source=engine:celery worker=ForkPoolWorker-4 task_id=bf48a7e2-b3e1-4169-b6e9-146fde38739b task_name=apps.alerts.tasks.escalate_alert_group.escalate_alert_group name=apps.alerts.escalation_snapshot.snapshot_classes.escalation_snapshot level=DEBUG Finished to execute escalation step Notify multiple Users with order 0, next escalation policy snapshot order 1
2023-03-24 13:01:29,076 source=engine:celery worker=ForkPoolWorker-4 task_id=bf48a7e2-b3e1-4169-b6e9-146fde38739b task_name=apps.alerts.tasks.escalate_alert_group.escalate_alert_group name=apps.alerts.tasks.task_logger level=DEBUG end of transaction in escalate_alert_group for alert_group 381
2023-03-24 13:01:29,080 source=engine:celery worker=MainProcess task_id=??? task_name=??? name=celery.worker.strategy level=INFO Task apps.alerts.tasks.notify_user.notify_user_task[36e0906a-c6ed-4ae7-acbb-c8fe2b07d4e3] received
2023-03-24 13:01:29,081 source=engine:celery worker=ForkPoolWorker-4 task_id=bf48a7e2-b3e1-4169-b6e9-146fde38739b task_name=apps.alerts.tasks.escalate_alert_group.escalate_alert_group name=apps.alerts.tasks.task_logger level=DEBUG Finish escalate_alert_group for alert_group 381
2023-03-24 13:01:29,081 source=engine:celery worker=ForkPoolWorker-4 task_id=bf48a7e2-b3e1-4169-b6e9-146fde38739b task_name=apps.alerts.tasks.escalate_alert_group.escalate_alert_group name=celery.app.trace level=INFO Task apps.alerts.tasks.escalate_alert_group.escalate_alert_group[bf48a7e2-b3e1-4169-b6e9-146fde38739b] succeeded in 0.03355519287288189s: 'Next escalation poked, id: 3a5dcd59-79ff-4e0d-bc1e-7470e5fb431d Escalation executed.'
2023-03-24 13:01:29,082 source=engine:celery worker=MainProcess task_id=??? task_name=??? name=celery.worker.strategy level=INFO Task apps.alerts.tasks.escalate_alert_group.escalate_alert_group[3a5dcd59-79ff-4e0d-bc1e-7470e5fb431d] received
2023-03-24 13:01:29,103 source=engine:celery worker=ForkPoolWorker-4 task_id=36e0906a-c6ed-4ae7-acbb-c8fe2b07d4e3 task_name=apps.alerts.tasks.notify_user.notify_user_task name=apps.alerts.tasks.task_logger level=INFO notify_user_task: user 4 notification is not allowed
2023-03-24 13:01:29,105 source=engine:celery worker=ForkPoolWorker-4 task_id=36e0906a-c6ed-4ae7-acbb-c8fe2b07d4e3 task_name=apps.alerts.tasks.notify_user.notify_user_task name=apps.base.models.user_notification_policy_log_record level=DEBUG send_update_log_report_signal for alert_group 381, user notification event: Personal notification failed

notification is not allowed in log and in Alert group log (2s)

Alert group log:
0s: alert group registered
0s: alert group assigned to route "default" with escalation chain "Default"
2s: triggered step "Notify multiple Users"
2s: failed to notify ds_ott, not allowed
5m7s: triggered step "Notify multiple Users"
5m7s: sent telegram message to ashestakov
5m12s: triggered step "Continue escalation if >1 alerts per 5 minutes"
46m3s: acknowledged by ashestakov
@Matvey-Kuk
Copy link
Contributor

Hi! That's expected for Viewer, that shouldn't be like that for Editor. Marking as a bug

@nikitaspitsky
Copy link

I have the same problem, up

@akimrx
Copy link

akimrx commented Apr 18, 2023

Same issue. Editors can't link telegram account.
Grafana OnCall Cloud

@chronocross92
Copy link

+1, up

@joeyorlando
Copy link
Contributor

joeyorlando commented Jun 1, 2023

If user with Admin role and witch connected Telegram account will change role to Viewer or Editor, onCall will not send notification in Telegram. Logs:

👋 @artem-shestakov the logs you shared here, are these logs from when your user was assigned as a Viewer, or Editor? It is expected that notifications will not be sent to Viewers.

@artem-shestakov
Copy link
Author

artem-shestakov commented Jun 1, 2023

@joeyorlando all users have Admin role.
May be that error was when user was created and had Editor/Viewer role.
Now I Can't connect telegram to Editor/Viewer role. Version grafana/oncall:v1.2.34

@artem-shestakov
Copy link
Author

If role not Admin I get message You do not have permission to perform this action. Ask an admin to upgrade your permissions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants