ansible.fftdf.supernode/files/check_mk-dhcp.sh

7 lines
354 B
Bash
Raw Normal View History

2017-06-18 09:52:59 +00:00
#!/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"