From 4312c385fb948ea38a20980b5f399a66220a2e68 Mon Sep 17 00:00:00 2001 From: Ezhil Shanmugham Date: Wed, 11 Sep 2024 20:22:20 +0530 Subject: [PATCH] chore: update query_victoriametrics --- examples/workflows/query_victoriametrics.yml | 32 +++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/examples/workflows/query_victoriametrics.yml b/examples/workflows/query_victoriametrics.yml index e47f97df2..c1cf6bc02 100644 --- a/examples/workflows/query_victoriametrics.yml +++ b/examples/workflows/query_victoriametrics.yml @@ -14,17 +14,33 @@ workflow: queryType: query actions: - - name: ntfy-action + - name: trigger-slack1 + condition: + - name: threshold-condition + type: threshold + value: "{{ steps.victoriametrics-step.results.data.result.0.value.1 }}" + compare_to: 0.0050 + alias: A + operator: ">" provider: - config: "{{ providers.ntfy }}" - type: ntfy + type: slack + config: "{{ providers.slack }}" with: - message: "Result: {{ steps.victoriametrics-step.results.data.result }}" - topic: victoriametrics + message: "Result: {{ steps.victoriametrics-step.results.data.result.0.value.1 }} is greater than 0.0040! 🚨" - - name: slack-action + - name: trigger-slack2 + if: "{{ A }}" provider: - config: "{{ providers.slack }}" type: slack + config: "{{ providers.slack }}" + with: + message: "Result: {{ steps.victoriametrics-step.results.data.result.0.value.1 }} is greater than 0.0040! 🚨" + + - name: trigger-ntfy + if: "{{ A }}" + provider: + type: ntfy + config: "{{ providers.ntfy }}" with: - message: "Result: {{ steps.victoriametrics-step.results.data.result }}" + message: "Result: {{ steps.victoriametrics-step.results.data.result.0.value.1 }} is greater than 0.0040! 🚨" + topic: ezhil \ No newline at end of file