mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-24 02:17:00 +08:00
fix "copy" button by quoting description fields... (#182)
...in yaml output and escape quotes inside. Without this change, the YAML outputted isn't valid due to ":" characters in the description which end up throwing errors like /etc/prometheus/rules/prometheus.rules: yaml: line 88: mapping values are not allowed in this context.
This commit is contained in:
parent
af30d0f06c
commit
e090fd1569
1 changed files with 1 additions and 1 deletions
2
rules.md
2
rules.md
|
|
@ -88,7 +88,7 @@
|
||||||
severity: {{ rule.severity }}
|
severity: {{ rule.severity }}
|
||||||
annotations:
|
annotations:
|
||||||
summary: {{ rule.name }} (instance {% raw %}{{ $labels.instance }}{% endraw %})
|
summary: {{ rule.name }} (instance {% raw %}{{ $labels.instance }}{% endraw %})
|
||||||
description: {{ rule.description }}\n VALUE = {% raw %}{{ $value }}{% endraw %}\n LABELS: {% raw %}{{ $labels }}{% endraw %}
|
description: "{{ rule.description | replace: '"', '\"' }}\n VALUE = {% raw %}{{ $value }}{% endraw %}\n LABELS: {% raw %}{{ $labels }}{% endraw %}"
|
||||||
|
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue