stakater / IngressMonitorController

A Kubernetes controller to watch ingresses and create liveness alerts for your apps/microservices in UptimeRobot, StatusCake, Pingdom, etc. – [✩Star] if you're using it!
https://stakater.com
Apache License 2.0
578 stars 102 forks source link

For grafana monitor, fixes bug with invalid tenant ID #567

Closed thunef closed 7 months ago

thunef commented 7 months ago

There was an issue with Grafana synthetic monitoring which resulted in these errors:

{"level":"error","ts":1704550886.2006788,"logger":"gcloud-monitor","msg":"Failed to update monitor","error":"check update request: status=\"400 Bad Request\", msg=\"Invalid tenantId for user\", err=\"bad request\"","stacktrace":"github.com/stakater/IngressMonitorController/v2/pkg/monitors/grafana.(*GrafanaMonitorService).Update\n\t/workspace/pkg/monitors/grafana/grafana-monitor.go:146\ngithub.com/stakater/IngressMonitorController/v2/pkg/monitors.(*MonitorServiceProxy).Update\n\t/workspace/pkg/monitors/monitor-proxy.go:101\ngithub.com/stakater/IngressMonitorController/v2/pkg/controllers.(*EndpointMonitorReconciler).handleUpdate\n\t/workspace/pkg/controllers/endpointmonitor_updated.go:26\ngithub.com/stakater/IngressMonitorController/v2/pkg/controllers.

The reason was that tenant was picked from config when it should be picked from the actual check

github-actions[bot] commented 7 months ago

@thunef Image is available for testing. docker pull stakater/ingressmonitorcontroller:SNAPSHOT-PR-567-2ae20043