https://github.com/rhobs/obsctl-reloader
Use obsctl to set rules from PrometheusRules
https://github.com/rhobs/obsctl-reloader
Last synced: about 1 year ago
JSON representation
Use obsctl to set rules from PrometheusRules
- Host: GitHub
- URL: https://github.com/rhobs/obsctl-reloader
- Owner: rhobs
- Created: 2022-07-04T18:19:51.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-05T12:46:14.000Z (about 1 year ago)
- Last Synced: 2025-05-08T04:55:59.346Z (about 1 year ago)
- Language: Go
- Size: 418 KB
- Stars: 2
- Watchers: 8
- Forks: 9
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# obsctl-reloader
This tool uses [obsctl](https://github.com/observatorium/obsctl) to sync rules from your cluster to Observatorium [Rules API](https://observatorium.io/docs/design/rules-api.md/) via prometheus-operator’s [PrometheusRule CRD](https://prometheus-operator.dev/docs/operator/design/#prometheusrule).
## Usage
The full usage documentation can be found in the [Red Hat Monitoring Group Handbook](https://rhobs-handbook.netlify.app/services/rhobs/rules-and-alerting.md/#sync-rules-from-your-cluster).
```bash mdox-exec="obsctl-reloader --help"
Usage of obsctl-reloader:
-audience string
The audience for whom the access token is intended, see https://openid.net/specs/openid-connect-core-1_0.html#IDToken.
-issuer-url string
The OIDC issuer URL, see https://openid.net/specs/openid-connect-discovery-1_0.html#IssuerDiscovery.
-kubeconfig string
Paths to a kubeconfig. Only required if out-of-cluster.
-managed-tenants string
The name of the tenants whose rules should be synced. If there are multiple tenants, ensure they are comma-separated.
-observatorium-api-url string
The URL of the Observatorium API to which rules will be synced.
-sleep-duration-seconds uint
The interval in seconds after which all PrometheusRules are synced to Observatorium API. (default 15)
```
> Note: this project is still experimental.
The tenant K8s secret must have a `tenant` metadata label and the following data fields, for it to be auto-detected by obsctl-reloader.
- `client-id` or `client_id`
- `client-secret` or `client_secret`