TheGeekery

The Usual Tech Ramblings

Bookmarks for May 9th through June 2nd

These are my links for May 9th through June 2nd:

System Administrators, Automation, and Laziness

Today I was reading Matt Simmons’ post “View from the other side…” and a phrase he used in it seemed a little off to me. He wrote:

Automation is big for most sysadmins. We’re inherently lazy, so the idea of pushing a button and making programs work for us? Appealing.

I’m not entirely sure I agree with the statement that we are lazy. I’m pretty sure Matt is not lazy, in fact I’m not sure I’ve met any system administrator that was lazy. I do agree that automation is a big thing for us though. Here’s why I think it’s big…

  • Repeatable tasks leads to automation
  • Automation leads to consistency
  • Consistency reduces errors
  • Reducing errors leads to a more stable environment
  • A stable environment leads to happy customers

So while automation does reduce the amount of work we do for a task, it’s far from what I’d consider a goal of laziness. Automation brings us a stable environment, giving us more time to work on other important stuff, like planning for the next big project, or automating other tasks. It also gives us a way to “pass the buck” to a junior.

Another method of automation comes in the form of configuration management. This is a perfect example of producing a consistent, and repeatable, setup. Configuration management is one of those areas that is far from lazy, but in large environments, critical to your operations. If you have a web farm of 100 web servers, and they have to run the same packages, how do you guarantee they have those packages, and are the same version? If you were to do each one by hand, you’d be there all week, and you’d probably miss a server or three.

So on the outset, it might look like we’re being lazy, but scrape away the thin layer on the top, and we’re really doing it for the greater good of ourselves, our environment, and those around us too.

As a side note, Tom Limoncelli wrote a section in his book, Time Management for System Administrators, on automation. It boils down some very good reasons to automate. If you’re a system administrator, and you don’t have that book on your shelf, go get it.

So are we lazy? Or are we working towards a better system?

Using PowerCLI to find a specific guest IP

Today I got to play a little with some PowerCLI, VMware’s PowerShell modules. I was helping out our DBA building SQL clusters, when I hit an issue where the cluster software was telling me the IP address I was trying to assign this SQL instance was already in use. A quick ping, and it confirmed it was active. If you’ve read my post on IP conflicts, you’ll know that you can look at the ARP table, and figure out what kind of device is using the IP, and in this case, it turns out to be a VMWare MAC. Instead of going through each of our vmware guests, I jumped into PowerShell…

PowerShell, XML, and nested elements

While working on a small PowerShell script to create Windows Media Player playlist files, I stumbled across an odd occurence when working with nested elements. Using the syntax $xml.childnode.childnode2 you cannot add additional child nodes as it treats childnode2 as a string. Using the SelectSingleNode function, it’s possible to work around this.

Using Nagios to monitor webpages

After my last Nagios post I noticed an increase in hits triggered by search terms on the subject of web scraping, and using Nagios to monitor web pages. This post covers several methods of monitoring pages using Nagios, from the basic page check, to the more complicated user interaction.

GPS Data, and Photography

Usually when I do any walking around with my camera, I usually carry my GPS device in my backpack. This allows me to track how far I walked, as well as marking where I took pictures. On a recent trip to the Dallas Zoo, I forgot to transfer my GPS data to my computer before I transferred my photos, and my images were not tagged with the geolocation data.

Adding a new datasource to an RRD database

After upgrading several servers with a newer instance of nsclient++, we discovered Memory graphs were broken because of new performance metrics included in the check memory results. Well broken is subjective, the new performance data included the percentage free (as before), with the addition of the actual physical value (ie 1GB). This addition was missing from the RRDs when they were originally created, so when pnp4Nagios was updating the XML file it uses, it said it had 2 data sets, but the RRD only had one. Here’s how I fixed the issue.

Powershell, and exporting Windows Scheduled Tasks

We’ve recently been asked to upgrade a 2003 server to 2008R2. Instead of doing an upgrade, we’re planning on doing a format, and clean install. One of the issues we have with this server is the number of scheduled tasks on the server. Unfortunately the 2003 .job format isn’t compatible with the 2008 .xml job format. After poking around, I found two solutions to this.

Cron, and the failing grand children...

One of the other recent errors I noticed in my LogWatch reports, other than the spam spike, was a weird error with cron reporting the grandchild had exited with a non-zero exit code. When I first saw it, it coincided with the spike in spam, so I had assumed it was logwatch timing out within cron whilst processing the log file. Now the spam level has died down, I noticed the error persisted…