Posts

Showing posts from August, 2014

Automatic Inventory

Now I have four machines.  Keeping them in sync is the challenge.  Worse yet, knowing whether they are in sync or out of sync is a challenge. So the first step is to make a tool to inventory each machine.  In order to use the inventory utility in a scalable way, I want to design it to produce machine-readable results so that I can easily incorporate them into whatever I need. What I want is a representation that is both friendly to humans and to computers.  This suggests a self-describing text representation like XML or JSON.  After a little thought I picked JSON. What sorts of things do I want to know about the machine?  Well, let's start with the hardware and the operating system software plus things like the quantity of RAM and other system resources.  Some of that information is available from uname and other is availble from the sysinfo(2) function. To get the information from the sysinfo(2) function I had to do several things: Install sysinfo on each machine sudo apt-get ...

Log consolidation

Image
Well, my nice DNS service with two secondaries and a primary is all well and good, but my logs are now scattered across three machines. If I want to play with the stats or diagnose a problem or see when something went wrong, I now have to grep around on three different machines. Obviously I could consolidate the logs using syslog. That's what it's designed for, so why don't I do that. Let's see what I have to do to make that work properly: Set up rsyslogd on flapjack to properly stash the DNS messages Set up DNS on flapjack to log to syslog Set up the rsyslogd service on flapjack to receive syslog messages over the network Set up rsyslog on waffle to forward dns log messages to flapjack Set up rsyslog on pancake to forward dns log messages to flapjack Set up the DNS secondary configurations to use syslog instead of local logs Distribute the updates and restart the secondaries Test everything A side benefit of using syslog to accumulate my dns logs is tha...