From 81063601a26e1b291fcc901d1a7b84e653cd4a50 Mon Sep 17 00:00:00 2001 From: David Wagner Date: Fri, 19 Jan 2024 11:47:48 +0100 Subject: [PATCH] Add two test script: listen-mqtt.sh and test-alert.sh --- scripts/listen-mqtt.sh | 3 +++ scripts/test-alert.sh | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100755 scripts/listen-mqtt.sh create mode 100755 scripts/test-alert.sh diff --git a/scripts/listen-mqtt.sh b/scripts/listen-mqtt.sh new file mode 100755 index 0000000..5b31aa9 --- /dev/null +++ b/scripts/listen-mqtt.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +nix shell nixpkgs#mosquitto --command mosquitto_sub -h nuc -p 1883 -t '#' -v diff --git a/scripts/test-alert.sh b/scripts/test-alert.sh new file mode 100755 index 0000000..de8a993 --- /dev/null +++ b/scripts/test-alert.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +nix shell nixpkgs#prometheus-alertmanager --command amtool \ + --alertmanager.url http://nuc:9093 \ + alert add \ + --annotation=summary="Test alert" \ + --annotation=description="This is a test alert sent from $(hostname) by $USER" \ + instance="$(hostname)"