Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting in component docs #185

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/modules/ROOT/pages/references/parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,11 @@ Configuration parameters related to influence the resulting alert rules.
type:: list
default:: https://github.com/appuio/component-openshift4-monitoring/blob/master/class/defaults.yml[See `class/defaults.yml`]

List of namespace patterns to use for alerts which have `namespace=~"(openshift-.*|kube-.*|default)"` in the upstream rule.
List of namespace patterns to use for alerts which have `namespace=~"(openshift-.\*|kube-.*|default)"` in the upstream rule.
The component generates a regex pattern from the list by concatenating all elements into a large OR-regex.
To inject the custom regex, the component searches for the exact string `namespace=~"(openshift-.*|kube-.*|default)"` in field `expr` of each alert rule and replaces it with the regex generated from the parameter.
To inject the custom regex, the component searches for the exact string `namespace=~"(openshift-.\*|kube-.*|default)"` in field `expr` of each alert rule and replaces it with the regex generated from the parameter.

The component processes the list with `com.renderArray()` to allow users to drop entries in the hierarchy.
The component processes the list with `com.renderArray()` to allow users to drop entries in the hierarchy.

IMPORTANT: The component doesn't validate that the list entries are valid regex patterns.

Expand Down Expand Up @@ -429,7 +429,7 @@ The parameter `patchRules` allows users to customize upstream alerts.
The component expects that top-level keys in the parameter correspond to values of parameter `manifests_versions`.
Additionally, the component supports special top-level key `*`.

Alert patches which are defined under top-level key `*` are applied regardless of the OpenShift 4 version specified in parameter `manifest_versions`.
Alert patches which are defined under top-level key `\*` are applied regardless of the OpenShift 4 version specified in parameter `manifest_versions`.
Additionally, the component applies all patches under the key which matches the value of parameter `manifest_versions`.
If an alert is patched in both top-level key `*` and the top-level key matching parameter `manifest_versions`, the patches are merged together, with the version-specific patch overriding the generic patch.

Expand Down Expand Up @@ -575,7 +575,7 @@ See xref:explanations/resource_management.adoc[Resource Management] for an expla
Example:

[source,yaml]
---
----
capacityAlerts:
enabled: true <1>
groupByNodeLabels: [] <2>
Expand Down Expand Up @@ -607,7 +607,7 @@ capacityAlerts:
rules:
ClusterHasUnusedNodes:
enabled: false <8>
---
----
<1> Enables capacity alerts
<2> List of node labels (as they show up in the `kube_node_labels` metric) by which alerts are grouped
<3> Changes the alert message for the pod capacity alert
Expand Down Expand Up @@ -639,7 +639,7 @@ See the Prometheus docs for supported configurations for https://prometheus.io/d
Example:

[source,yaml]
---
----
rules:
generic-rules:
"alert:ContainerOOMKilled":
Expand All @@ -650,7 +650,7 @@ rules:
labels:
source: https://git.vshn.net/swisscompks/syn-tenant-repo/-/blob/master/common.yml
severity: devnull
---
----

== Example

Expand Down
8 changes: 4 additions & 4 deletions docs/modules/ROOT/pages/references/prom.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ spec:
for: 10m
labels:
severity: warning
syn: "true" <2>
syn: "true" <1>
syn_component: foocomponent <2>
syn_team: footeam <3>
syn_team: footeam <2>
----
<2> Alerting rules are patched to match the default configuration for component `openshift4-monitoring`.
<3> If Project Syn multi-team configuration is present, label `syn_team` is added based on the component instance calling the `generateRules()` function.
<1> Alerting rules are patched to match the default configuration for component `openshift4-monitoring`.
<2> If Project Syn multi-team configuration is present, label `syn_team` is added based on the component instance calling the `generateRules()` function.

=== Arguments

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ spec:
summary: etcd cluster database is running full.
syn_component: openshift4-monitoring
expr: |
(last_over_time(etcd_mvcc_db_total_size_in_bytes[5m]) / last_over_time(etcd_server_quota_backend_bytes[5m]))*100 > 95
(last_over_time(etcd_mvcc_db_total_size_in_bytes{job=~".*etcd.*"}[5m]) / last_over_time(etcd_server_quota_backend_bytes{job=~".*etcd.*"}[5m]))*100 > 95
for: 10m
labels:
severity: critical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ spec:
summary: etcd cluster database is running full.
syn_component: openshift4-monitoring
expr: |
(last_over_time(etcd_mvcc_db_total_size_in_bytes[5m]) / last_over_time(etcd_server_quota_backend_bytes[5m]))*100 > 95
(last_over_time(etcd_mvcc_db_total_size_in_bytes{job=~".*etcd.*"}[5m]) / last_over_time(etcd_server_quota_backend_bytes{job=~".*etcd.*"}[5m]))*100 > 95
for: 10m
labels:
severity: critical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ spec:
summary: etcd cluster database is running full.
syn_component: openshift4-monitoring
expr: |
(last_over_time(etcd_mvcc_db_total_size_in_bytes[5m]) / last_over_time(etcd_server_quota_backend_bytes[5m]))*100 > 95
(last_over_time(etcd_mvcc_db_total_size_in_bytes{job=~".*etcd.*"}[5m]) / last_over_time(etcd_server_quota_backend_bytes{job=~".*etcd.*"}[5m]))*100 > 95
for: 10m
labels:
severity: critical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ spec:
summary: etcd cluster database is running full.
syn_component: openshift4-monitoring
expr: |
(last_over_time(etcd_mvcc_db_total_size_in_bytes[5m]) / last_over_time(etcd_server_quota_backend_bytes[5m]))*100 > 95
(last_over_time(etcd_mvcc_db_total_size_in_bytes{job=~".*etcd.*"}[5m]) / last_over_time(etcd_server_quota_backend_bytes{job=~".*etcd.*"}[5m]))*100 > 95
for: 10m
labels:
severity: critical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ spec:
summary: etcd cluster database is running full.
syn_component: openshift4-monitoring
expr: |
(last_over_time(etcd_mvcc_db_total_size_in_bytes[5m]) / last_over_time(etcd_server_quota_backend_bytes[5m]))*100 > 95
(last_over_time(etcd_mvcc_db_total_size_in_bytes{job=~".*etcd.*"}[5m]) / last_over_time(etcd_server_quota_backend_bytes{job=~".*etcd.*"}[5m]))*100 > 95
for: 10m
labels:
severity: critical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ spec:
summary: etcd cluster database is running full.
syn_component: openshift4-monitoring
expr: |
(last_over_time(etcd_mvcc_db_total_size_in_bytes[5m]) / last_over_time(etcd_server_quota_backend_bytes[5m]))*100 > 95
(last_over_time(etcd_mvcc_db_total_size_in_bytes{job=~".*etcd.*"}[5m]) / last_over_time(etcd_server_quota_backend_bytes{job=~".*etcd.*"}[5m]))*100 > 95
for: 10m
labels:
severity: critical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ spec:
summary: etcd cluster database is running full.
syn_component: openshift4-monitoring
expr: |
(last_over_time(etcd_mvcc_db_total_size_in_bytes[5m]) / last_over_time(etcd_server_quota_backend_bytes[5m]))*100 > 95
(last_over_time(etcd_mvcc_db_total_size_in_bytes{job=~".*etcd.*"}[5m]) / last_over_time(etcd_server_quota_backend_bytes{job=~".*etcd.*"}[5m]))*100 > 95
for: 10m
labels:
severity: critical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ spec:
summary: etcd cluster database is running full.
syn_component: openshift4-monitoring
expr: |
(last_over_time(etcd_mvcc_db_total_size_in_bytes[5m]) / last_over_time(etcd_server_quota_backend_bytes[5m]))*100 > 95
(last_over_time(etcd_mvcc_db_total_size_in_bytes{job=~".*etcd.*"}[5m]) / last_over_time(etcd_server_quota_backend_bytes{job=~".*etcd.*"}[5m]))*100 > 95
for: 10m
labels:
severity: critical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ spec:
summary: etcd cluster database is running full.
syn_component: openshift4-monitoring
expr: |
(last_over_time(etcd_mvcc_db_total_size_in_bytes[5m]) / last_over_time(etcd_server_quota_backend_bytes[5m]))*100 > 95
(last_over_time(etcd_mvcc_db_total_size_in_bytes{job=~".*etcd.*"}[5m]) / last_over_time(etcd_server_quota_backend_bytes{job=~".*etcd.*"}[5m]))*100 > 95
for: 10m
labels:
severity: critical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ spec:
summary: etcd cluster database is running full.
syn_component: openshift4-monitoring
expr: |
(last_over_time(etcd_mvcc_db_total_size_in_bytes[5m]) / last_over_time(etcd_server_quota_backend_bytes[5m]))*100 > 95
(last_over_time(etcd_mvcc_db_total_size_in_bytes{job=~".*etcd.*"}[5m]) / last_over_time(etcd_server_quota_backend_bytes{job=~".*etcd.*"}[5m]))*100 > 95
for: 10m
labels:
severity: critical
Expand Down
Loading