From 0e5f28d560ee03b9e28727f65e151eeced9dade8 Mon Sep 17 00:00:00 2001 From: Bastian Date: Thu, 2 Feb 2023 16:06:16 +0100 Subject: [PATCH] Add carp_status.sh helper for telegraf --- carp_status.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 carp_status.sh diff --git a/carp_status.sh b/carp_status.sh new file mode 100755 index 0000000..7a66ded --- /dev/null +++ b/carp_status.sh @@ -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/'`\"