Add carp_status.sh helper for telegraf

This commit is contained in:
2023-02-02 16:06:16 +01:00
commit 0e5f28d560

5
carp_status.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
echo carpstatus,interface=lagg0 status=\"`ifconfig lagg0 | grep carp | sed -E 's/.*(MASTER|BACKUP).*/\1/'`\"
echo carpstatus,interface=lagg1 status=\"`ifconfig lagg1 | grep carp | sed -E 's/.*(MASTER|BACKUP).*/\1/'`\"
echo carpstatus,interface=lagg2 status=\"`ifconfig lagg2 | grep carp | sed -E 's/.*(MASTER|BACKUP).*/\1/'`\"