add monitoring scripts

This commit is contained in:
Peter Leurs 2025-08-15 23:09:48 +02:00
parent c51e72686e
commit 8c603d6ebd
5 changed files with 87 additions and 0 deletions

16
monitor-test.sh.j2 Normal file
View file

@ -0,0 +1,16 @@
#!/bin/bash
# Usage: ./execute_command_client.sh <command>
if [ $# -ne 1 ]; then
echo "Usage: $0 <command>"
exit 1
fi
command="$1"
# Connect to socket and send command
output=$(nc -U {{ statedir }}/{{ name }}.monitoring <<< "$command")
# Print output
echo "$output"