I’m using unbound(8) on OpenBSD to block Ads. In the logs, I can see which domains were queried and blocked ; but I like to have a more graphical overview of whats happening over weeks. So I stole a few ideas from the Pi-Hole Web Interface, routed the logs to InfluxDB via syslog-ng and rendered statistics using Grafana.
Logs are great. Logs are cool. Logs are helpful. But logs are monochrome.
Unless you ask the camel to colorize them:
# tail -f /var/log/httpd/20110120 | perl -pe 's/.*b(error)b.*/e[1;31m$&e[0m/g' Jan 20 17:04:04 bagheera httpd: [20/Jan/2011:17:04:04 +0100] 10.0.0.62 TLSv1 AES256-SHA "POST /wp-login.php HTTP/1.1" 5 Jan 20 17:04:08 bagheera httpd: [error] ALERT - script tried to increase memory_limit to 268435456 bytes which is above the allowed value (attacker '10.0.0.62', file '/www.tumfatig.net/wp-admin/admin.php', line 96) Jan 20 17:04:10 bagheera httpd: [20/Jan/2011:17:04:10 +0100] 10.0.0.62 TLSv1 AES256-SHA "GET /wp-admin/ HTTP/1.1" 49959