expected_metric_segment

Diagnostic `nanook::expr::expected_metric_segment`

Summary

expected metric name segment

Help

metric paths look like cpu.usage or disk.io.read

Details

When this fires

The parser saw a . in a metric path but the next token wasn't an identifier. Metric paths look like cpu.usage or disk.io.read, so a trailing dot or a digit after the dot trips this.

What to check

Segments must start with an ASCII letter or underscore, and reserved words (and, or, in, ...) can't appear here.

# broken
expr = "cpu. > 50"
# fixed
expr = "cpu.usage > 50"

Caught by nanook check. Run nanook discover to list valid metric paths on the host.