Create check_mk_dhcp.sh
This commit is contained in:
		
							parent
							
								
									df2c3c8fa3
								
							
						
					
					
						commit
						10827541b4
					
				
							
								
								
									
										6
									
								
								check_mk_dhcp.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								check_mk_dhcp.sh
									
									
									
									
									
										Normal file
									
								
							@ -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"
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user