cortex-tools
cortex-tools copied to clipboard
Confusing parse error messages when using loki backend
trafficstars
Given bug.yaml:
namespace: bug
groups:
- name: bug
rules:
- alert: AlwaysFire
expr: vector(1)
cortextool rules lint --backend=loki bug.yaml gives:
ERRO[0000] unable parse rules file error="could not parse expression: parse error at line 1, col 1: syntax error: unexpected IDENTIFIER" file=bug.yaml
cortextool: error: prepare operation unsuccessful, unable to parse rules files: file read error, try --help
There's nothing obviously wrong at line 1, col 1. I have an invalid logQL expression and cortextool should tell me that directly.
cortextool 0.3.2
Hi, any updates ?
Still seeing this in Nov 2022 with grafana/cortex-tools:v0.10.7.
also see'ing this with metric rules.
cortextool rules lint metrics_namespace.yaml
cortextool: error: prepare operation unsuccessful, unable to parse rules files: file read error, try --help```
Same here.. still have this error with cortex-tools:v0.10.7.