Skip to content

Commit

Permalink
Merge pull request #746 from weaveworks/prom-auth-docs
Browse files Browse the repository at this point in the history
Add Prometheus basic-auth config to docs
  • Loading branch information
stefanprodan committed Dec 9, 2020
2 parents bfb3331 + 24c61df commit eb890ef
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/gitbook/usage/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,38 @@ spec:

The above template is for gRPC services instrumented with [go-grpc-prometheus](https://github.com/grpc-ecosystem/go-grpc-prometheus).

### Prometheus authentication

If your Prometheus API requires basic authentication, you can create a secret
in the same namespace as the `MetricTemplate` with the basic-auth credentials:

```yaml
apiVersion: v1
kind: Secret
metadata:
name: prom-basic-auth
namespace: flagger
data:
username: your-user
password: your-password
```

Then reference the secret in the `MetricTemplate`:

```yaml
apiVersion: flagger.app/v1beta1
kind: MetricTemplate
metadata:
name: my-metric
namespace: flagger
spec:
provider:
type: prometheus
address: http://prometheus.monitoring:9090
secretRef:
name: prom-basic-auth
```

### Datadog

You can create custom metric checks using the Datadog provider.
Expand Down

0 comments on commit eb890ef

Please sign in to comment.