Storing unbound(8) logs into InfluxDB

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.

Continue reading “Storing unbound(8) logs into InfluxDB”

Highlight your logs

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] TLSv1 AES256-SHA "POST /wp-login.php HTTP/1.1" 5
Jan 20 17:04:08 bagheera httpd[17951]: [error] ALERT - script tried to increase memory_limit to 268435456 bytes which is above the allowed value (attacker '', file '/', line 96)
Jan 20 17:04:10 bagheera httpd: [20/Jan/2011:17:04:10 +0100] TLSv1 AES256-SHA "GET /wp-admin/ HTTP/1.1" 49959

Continue reading “Highlight your logs”