I recently started playing around with OpenHAB, which is an excellent home automation application. During my "playing" with the system, I decided to try and run it on a Raspberry Pi 3 Model B. I figured that it's a fast enough computer to handle the load of the OpenHAB. One thing that I've read somewhere was that someone managed to kill 3 SD cards due to extensive logging (completely configurable). So, I thought... What if I could completely bypass writing my logs to local filesystem and go straight to ElasticSearch (via Logstash)?
Lately I've been hooked on the ELK Stack and I'm trying to monitor all my logs via Kibana web interface. Currently, my apache logs folder looks like this:
and, if you are like me, you don't like to type a lot! So, you would construct your logstash config file something close to this:
This is a quick Logstash configuration share to parse CouchPotato logs for display in Kibana interface. This guide assumes that you already have an ELK stack installed. If you don't, check out my guide on how to get up and running with ELK Stack here
Creating Pattern Variables
Pattern variables are basically regular expressions that have been given a name recognized by grok. To define a pattern all you need to do is create a text file and tell Logstash where to find extra patterns (but that's later).
Recently I started having some problems with my DD-WRT router. I was having some connection problems and occasional reboots. So, to deal with the problem, I wanted to collect some data from the router in the form of logs. Luckily for me, DD-WRT has a syslogd service which is could send logs to a syslog server on another machine over TCP (or UDP?) connection. Since I know close to nothing in that area, I went to the next best trusted source - Google!