From 676b3120d5db22853e7b1203dfa3759a650d7655 Mon Sep 17 00:00:00 2001 From: stebifan Date: Sun, 18 Jun 2017 11:52:59 +0200 Subject: [PATCH] Create check_mk-dhcp.sh --- files/check_mk-dhcp.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 files/check_mk-dhcp.sh diff --git a/files/check_mk-dhcp.sh b/files/check_mk-dhcp.sh new file mode 100644 index 0000000..90a4827 --- /dev/null +++ b/files/check_mk-dhcp.sh @@ -0,0 +1,6 @@ +#!/bin/bash +datum=$(date "+%b %d") +hostname=$(hostname) +clients=$(cat /var/log/syslog | grep "$(date "+%b %d")" | grep DHCPACK | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | sort | uniq | wc -l) +echo "nc.gateways."$hostname" $clients `date +%s`" | nc -n -q 5 10.188.0.10 2003 +echo "0 Uniq-Clients count=$clients - $clients Uniq Clients heute"