sachet icon indicating copy to clipboard operation
sachet copied to clipboard

SMS does not contain expected text

Open mcf-rocks opened this issue 3 years ago • 1 comments

I have this in the alert rules:

      expr: node_disk_device_size_used_perc > 60
      for: 1m
      labels:
        severity: "warning"
      annotations:
        description: "Disk device {{ $labels.device }} on {{ $labels.instance }} at {{ $value }}% used"

What I get in my text message is:

FIRING
device=/dev/sda1
instance=bababoom
job=bababoomjob
severity=warning

I would like the text to contain the description -- do you know how ot do it?

mcf-rocks avatar Aug 30 '21 13:08 mcf-rocks

I also tried like this

rules:
      labels:
        severity: "warning"
        text: "Disk device {{ $labels.device }} on {{ $labels.instance }} at {{ $value }}% used"

and

sachet.yaml:
    text: '{{ .Labels.text }}'

Now I don't even get the text.

mcf-rocks avatar Aug 30 '21 13:08 mcf-rocks