fix(yaml): promql injections block

This commit is contained in:
Christian Segundo 2023-09-15 12:22:26 +02:00 committed by Christian Clason
parent 48b237fd3f
commit 831dbb619e
2 changed files with 9 additions and 2 deletions

View file

@ -49,7 +49,7 @@
value: (block_node
(block_scalar) @injection.content
(#set! injection.language "promql")
(#offset! @injection.content 0 2 0 0)))
(#offset! @injection.content 0 1 0 0)))
(block_mapping_pair
key: (flow_node) @_expr (#eq? @_expr "expr")
@ -69,4 +69,4 @@
(block_node
(block_scalar) @injection.content
(#set! injection.language "promql")
(#offset! @injection.content 0 2 0 0))))))
(#offset! @injection.content 0 1 0 0))))))

View file

@ -10,3 +10,10 @@ groups:
annotations:
title: Node {{ $labels.instance }} is down
description: Failed to scrape {{ $labels.job }} on {{ $labels.instance }} for more than 3 minutes. Node seems down.
- alert: Node down
expr: |
up{job="node_exporter"} == 0
# ^ promql
for: 3m
labels:
severity: warning