add monitoring scripts
This commit is contained in:
parent
c51e72686e
commit
8c603d6ebd
5 changed files with 87 additions and 0 deletions
16
monitor-test.sh.j2
Normal file
16
monitor-test.sh.j2
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue