Hi all,
I’m creating customer template. I use the “explore” page to verify the query. And following “Integrated Alerting Design in Percona Monitoring and Management - Percona Database Performance Blog”, to create a template. But, intersting, when post “rule template”, the page shows “failed to parse rule template”.
The is my template:
---
templates:
- name: DiskFreeSpace
version: 1
summary: Disk Free Space go to a Threshold
expr: |-
100 - ((sum(node_filesystem_avail_bytes{fstype="xfs",node_name!="pmm-server"}) by (node_name,mountpoint))*100
/ sum(node_filesystem_size_bytes{fstype="xfs",node_name!="pmm-server"}) by (node_name,mountpoint))
> [[ .threshold ]]
params:
- name: threshold
summary: A percentage from configured maxiumu
unit: "%"
type: float
range: [0,100]
value: 50
for: 5m
severity: critical
annotations:
summary: Free Space is lower
description: |-
Mount point is lower
The screenshot to show the query returns rows more than 10%.
So, I’m a little confused what cause the error.
BTW: I also tried to set [[ .threshold ]] to a fixed value, such as 10. But still see the same error.
Thanks,
Dillon