grafana / oncall

Developer-friendly incident response with brilliant Slack integration
GNU Affero General Public License v3.0
3.46k stars 279 forks source link

Cannot connect Google Ical to oncall #3002

Closed yasharne closed 6 months ago

yasharne commented 1 year ago

What went wrong?

What happened: When I try to add a Google Ical link, I get the below error:

Ical URL primary: Ical parse failed

I checked the code and realized grafana oncall inside the fetch_ical_file function is expecting text/calendar but in the oncall logs I see the response code is still text/html:

grafana-oncall-engine-1  | 2023-09-11 11:43:23 source=engine:app google_trace_id=none logger=apps.schedules.ical_utils fetch_ical_file: content-type=text/html; charset=utf-8
grafana-oncall-engine-1  | 2023-09-11 11:43:23 source=engine:app google_trace_id=none logger=root inbound latency=2.671229 status=400 method=POST path=/api/internal/v1/schedules user_agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 content-length=248 slow=1 user_id=21 org_id=1 org_slug=self_hosted_org
grafana-oncall-engine-1  | 2023-09-11 11:43:23 source=engine:app google_trace_id=none logger=django.request Bad Request: /api/internal/v1/schedules
grafana-oncall-engine-1  | 2023-09-11 11:43:23 source=engine:uwsgi status=400 method=POST path=/api/internal/v1/schedules latency=2.693945 google_trace_id=- protocol=HTTP/1.1 resp_size=255 req_body_size=248

How do we reproduce it?

try to import Ical calendar

Grafana OnCall Version

v1.3.36

Product Area

Schedules

Grafana OnCall Platform?

Docker

User's Browser?

No response

Anything else to add?

No response

matiasb commented 12 months ago

Hi,

To be sure, are you using the secret iCal URL from Google Calendar? Otherwise your calendar needs to be public for OnCall to be able to import it [1].

[1] https://grafana.com/docs/grafana-cloud/alerting-and-irm/oncall/on-call-schedules/ical-schedules/#import-calendar-to-grafana-on-call

yasharne commented 12 months ago

Hi @matiasb Yes, we are using the address which is inside the Public address in iCal format

iskhakov commented 6 months ago

Please use private link

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.