Skip to content

Commit

Permalink
docs(checks): prometheus auth
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Jun 26, 2024
1 parent f6c969c commit db906b4
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 12 deletions.
2 changes: 1 addition & 1 deletion canary-checker/docs/reference/1-http.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
]}/>
<blockquote style={{ borderLeft: "2px solid var(--ifm-color-warning-light)" }}>
<p>You can specify either the <code>ca</code> or the pair of <code>cert</code> & <code>key</code></p>
<p>You can specify either the <code>ca</code> or the pair of client <code>cert</code> & <code>key</code></p>
</blockquote>
<details summary="Example">
Expand Down
54 changes: 43 additions & 11 deletions canary-checker/docs/reference/1-prometheus.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,53 @@ sidebar_class_name: popular

The Prometheus Check connects to the Prometheus host, performs the desired query, and displays the results.


```yaml title="prometheus.yaml" file=../../../modules/canary-checker/fixtures/datasources/prometheus.yaml

```
<HealthCheck name="prometheus" connection="url" rows={[
{field: "url", description: "Prometheus instance, if not specified in installation it is required", required: true},
{field: "query", description: "PromQL query to execute", required: true},

<HealthCheck
name="prometheus"
rows={[
{
field: 'url',
description:
'Prometheus instance, if not specified in installation it is required',
required: true
},
{ field: 'query', description: 'PromQL query to execute', required: true },
{
field: 'username',
description: 'PromQL query to execute',
scheme: 'EnvVar'
},
{
field: 'password',
description: 'PromQL query to execute',
scheme: 'EnvVar'
},
{
field: 'bearer',
description: 'PromQL query to execute',
scheme: 'EnvVar'
},
{ field: 'oauth', description: 'PromQL query to execute', scheme: '[oAuth](#oauth)' },

Check failure on line 39 in canary-checker/docs/reference/1-prometheus.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] canary-checker/docs/reference/1-prometheus.mdx#L39

[Vale.Terms] Use 'OAuth' instead of 'oauth'.
Raw output
{"message": "[Vale.Terms] Use 'OAuth' instead of 'oauth'.", "location": {"path": "canary-checker/docs/reference/1-prometheus.mdx", "range": {"start": {"line": 39, "column": 15}}}, "severity": "ERROR"}

Check failure on line 39 in canary-checker/docs/reference/1-prometheus.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] canary-checker/docs/reference/1-prometheus.mdx#L39

[Vale.Terms] Use 'OAuth' instead of 'oAuth'.
Raw output
{"message": "[Vale.Terms] Use 'OAuth' instead of 'oAuth'.", "location": {"path": "canary-checker/docs/reference/1-prometheus.mdx", "range": {"start": {"line": 39, "column": 73}}}, "severity": "ERROR"}
]}
/>

## OAuth

<Fields rows={[
{field: "clientID", description: "Client ID", scheme: "EnvVar"},
{field: "clientSecret", description: "Client Secret", scheme: "EnvVar"},
{field: "scope", description: "oAuth Scopes", scheme: "`[]string`"},

Check failure on line 48 in canary-checker/docs/reference/1-prometheus.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] canary-checker/docs/reference/1-prometheus.mdx#L48

[Vale.Terms] Use 'OAuth' instead of 'oAuth'.
Raw output
{"message": "[Vale.Terms] Use 'OAuth' instead of 'oAuth'.", "location": {"path": "canary-checker/docs/reference/1-prometheus.mdx", "range": {"start": {"line": 48, "column": 34}}}, "severity": "ERROR"}
{field: "tokenURL", description: "Token URL", scheme: "string"},
{field: "params", description: "Endpoint parameters", scheme: "`map[string]string`"},
]}/>



## Result Variables

| Name | Description | Scheme |
| ------------ | ----------------------- | -------------------------- |
| `value` | | *float* |
| `firstValue` | Number of rows returned | *int* |
| `results` | A list of results | *[]map[string]interface{ }* |
| Name | Description | Scheme |
| ------------ | ----------------------- | --------------------------- |
| `value` | | _float_ |
| `firstValue` | Number of rows returned | _int_ |
| `results` | A list of results | _[]map[string]interface{ }_ |

0 comments on commit db906b4

Please sign in to comment.