google / google/slo-generator

[Prometheus backend] add oauth2 to support Google Managed Prometheus GMP

Open
#234 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
564
Forks
88
PR merge metrics
No merged PRs in 30d

Description

Currently the Prometheus backend supports only [basic authentication](https://github.com/google/slo-generator/blob/master/docs/providers/prometheus.md)

GMP Google Managed Prometheus API [uses OAuth2 authentication](https://cloud.google.com/stackdriver/docs/managed-prometheus/query#api-prometheus)

Proposed implementation:
- If the Prometheus API is served from Cloud Monitoring meaning url is like `https://monitoring.googleapis.com/v1/projects/PROJECT_ID/location/global/prometheus`
- Then Authenticated with a oauth2 token from the service account used to run slo-generator

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.