. Search in the logs for the IP.Adresses
2. if found take the 'connected' or ' disconnected' status
3. create output <IP- Adress> - <status>
Take care that the script is searcing in all logs available when it is started the first time, because only connection status changes only written in this logs.
The following time the script should take the new logs and the last information written by the script to create new status update.
The script should be stated via crontab each 5 minutes