Centralized Apache Logs with Syslogd

One of the projects I have for this year is the centralization of all Apache logs we have scattered across all our machines.

I know this kind of guide has been done before, but here’s my implementation for our systems.

  1. Install rsyslogd: apt-get install rsyslog. Some older machines we had were still using the older sysklogd, but form what I’ve gathered, it doesn’t support UDP transmission of the logs, so I didn’t fit me.
  2. Add the following rules to /etc/rsyslogd.conf:
    local1.crit @destination-host
    local1.info @destination-host
  3. Restart rsyslogd: /etc/init.d/rsyslog restart
  4. Edit your apache settings to add the new log rules (normally /etc/apache2/sites-enabled/000-default):
    ErrorLog syslog:local1
    CustomLog “|/usr/bin/logger -p local1.info” combined
  5. Restart apache: /etc/init.d/apache2 restart
  6. On the central machine add the following rules to syslog (this part is actually recycled from a Nuno Dantas implementation of the central logs for postfix):
    source s_remote { udp(); };
    destination d_clients { file(“/destination-path/$HOST”); };
    log { source(s_remote); destination(d_clients); };
  7. Restart syslog. You should now have the apache logs coming…

After this, I implemented a AWStats central instance which parses all those nifty logs.

My new Book Blog

With the new year, came the usual New Year Resolutions. One of them I’ve already put into motion, which is blog at least once a week.

Another one is to read more. I’ve signed up for he GoodReads 2011 Reading Challenge and set myself to read 30 books this year. I though of setting the bar a little higher but then I though, small steps…

For this purpose, I’ve created a new blog, specifically for Book Reviews, called Reliant Bookwork. I took this idea from my sister, which also has a Book Reviews Blog called Sleepless Bookworm, with already a batch of interesting content. My GoodReads account is connected to the blog, so every time I write a review on GoodReads, it gets posted to that blog.

So let the reading year begin, and happy reading to myself!!

2010: a personal review

So, a full week has passed since the end of 2010. So it’s time for a personal review of the last year…

Personally, it was a somewhat good year. I changed my position at CICA, becoming a Systems Administrator at UAS, responsible for everything from Email to LDAP. I also became a permanent worker at FEUP, with a contract of indefinite duration. In the current times, that not that bad. I also (finally) got my driver’s licence is May, so you should be careful when you’re on the road!

Got to visit a new country in October, Ireland, and revisit an already visited one in December, The Netherlands. Amsterdam in the Winter is somewhat magical, as the photos and videos I took can show you…

Gadget-wise, it was also a good year. I bought my current phone, the Google Nexus One, and got offered a Kindle 3 for my birthday. Let’s just say that because of this last one, I’ve been reading like crazy

So, overall, 2010 was a good year. Let’s see what 2011 will bring…

New Year’s Resolution

So here I am preempting a New Year’s Resolution of mine for 2011. Rebooting this blog for the third time… Since this time I’ve made it into a Resolution I believe I’m going to be able to keep it up…

I’ll try make a new post once a week… So… Happy New Year, and let’s see how this goes…