Bruce's Blog Just another in the neverending world of blogs

24Jun/140

IMAPrunner

Here's a handy little IMAP utility people may find useful. IMAPrunner was an excuse for me to learn a little more about Python programming and to also throw together something useful at the same time.  It's a Python script that lets you associate scripts/commands with mail messages in individual mail folders.

I now have a cron job set up that checks for any e-mails I add to a "spam" folder.  If I receive any spam I just move it to that folder.  IMAPrunner will then pass the spam e-mail onto SpamAssassin, razor, pyzor, etc. and then delete the e-mail automatically. There's really no limit to what you can trigger in response to an e-mail with it.  And I already have a few thoughts for improvements to it...

30Jul/130

Instant Nagios Starter

I was recently contacted by Packt Publishing and asked to review their book Instant Nagios Starter, by Michael Guthrie.  I've actively used Nagios (and forks) for well over a decade now, and have even contributed some code development to it, so I'm intimately familiar with installing, configuring, and managing Nagios environments.

Nagios is an extremely powerful and flexible monitoring platform, and those two attributes also result in it also being a fairly complex piece of software to configure if you've never dealt with it before.  This book does an excellent job of walking you through the steps of installation and basic configuration of Nagios on a CentOS/RHEL system.

Nagios, as with just about any complex piece of software, relies on a number of system configuration settings, files in multiple locations, etc. to run properly.  Instant Nagios Starter does an excellent job of walking you through each and every dependency so that you can get a basic Nagios server up and running in no time at all.  If you're new to Nagios, or need to spin up a new Nagios server and may have only ever worked with existing Nagios setups in the past, then this guide will save you a lot of time and potential aggravation in getting started.

The title of this book is extremely accurate - it will get you started with Nagios in almost no time at all.  If you're looking for anything beyond the basics of setting up Nagios then you'll want something a bit more in depth, and Packt Publishing has you covered there as well since they also have a number of other books on the subject.

Perhaps the only thing that would make this book more valuable would be if Packt Publishing offered a download of a VMWare CentOS instance with Nagios pre-installed (or partially installed) for those who don't want to waste any time installing linux first.

6Apr/120

nagios-plugins patch to check_dig

I use Nagios (actually Icinga) at work and do a lot of tinkering with it.  I recently needed to modify the check_dig command to allow for verifying whether a response is authoritative or not.  This is apparently something that's asked for a lot according to some Google searching that I've done, so I wrote a quick patch, and I've submitted it to the Nagios Plugin project on Sourceforge.  Hopefully they'll accept it, but in the meantime I thought I'd post it here as well so others can make use of it if the have a need for it.

The patch is available two ways depending on your preference.  You can just download a patched version of nagios-plugins-1.4.15.tar.gz, build the plugins as you normally would, and be on your way.  Or you can download the official version of nagios-plugins-1.4.15.tar.gz from Sourceforge and just apply this check_dig patch.  To apply the patch:

[brucep@carbon:~/tmp] tar xvzf nagios-plugins-1.4.15.tar.gz
[brucep@carbon:~/tmp] gunzip check_dig.patch.gz
[brucep@carbon:~/tmp] patch -p0 < check_dig.patch # Note, that's a zero, not the letter o.

Assuming the patch command doesn't report any problems you should be all set.  Just rebuild the plugins and you're good to go.  This adds a '-e' option to the command line.  If you use -e then check_dig will verify that the flags header from dig contains the 'aa' flag.  If the 'aa' flag isn't found then check_dig will return a CRITICAL error.

If you'd like to keep track of the status of the patch on Sourceforge you can check it here.

 

26Feb/110

My brush with greatness (aka Penn & Teller)

Heather & I were on vacation in Las Vegas the last few days, and one of the highlights was seeing the Penn & Teller magic show at The Rio.  In fact I was picked from the audience to assist with the very first trick they performed.  Here's a rundown of what happened, first from my point of view and then a full description of what actually happened.

From my point of view

Penn started explaining that they needed somebody from the audience with a smart phone for their first trick, and that they were going to let that person use the phone to record video of the trick so they could see exactly how it was done.  I, along with hundreds of others in the audience held our phones up as Teller started walking up the isle.  He spotted my iPhone, came over, and asked if somebody else in the audience could call the phone while I was on stage.  I told him that Heather could do this, so he asked me to take my iPhone out of the case and come up on stage with him.  Penn asked me my name and also verified that somebody in the audience could call me.  I told him my girlfriend Heather could, so he asked Heather to make a quick call to verify it.  After my phone rang (and Penn made sure the audience heard it by holding it up to his microphone) they first started playing around with me a little.  They had me turn the video recorder on then held the phone up to record themselves and introduced themselves, introduced me, then panned across the audience.  They then said that as I'm on stage with some Vegas magicians that I undoubtedly wanted video of me and a famous magician.  At that point they brought out a short cardboard cutout of Kriss Angel and had me pose with it, which got lots of laughs from the audience.  After that bit of fun they had the cardboard Kriss Angel carried off stage and proceeded with the full illusion.

Penn picked up a large Starbucks coffee cup that had been sitting on the stage.  He placed my iPhone in the cup and had me look inside to verify it was there.  He put the top on the coffee cup but it fell so I bent to pick it up.  At this point I heard a loud roar of laughter from the audience but didn't know why.  I gave the top back to him, he put it on the cup, then placed it on the stage floor in front of us.  After saying one or two things he promptly stomped on the cup with all his might, crushing it into a pancake.  Obviously the phone wasn't in the cup any more.  Teller also walked up and tapped the crushed cup with his foot for good measure.

After a minute or so of vamping Penn asked Heather to call my phone, which she promptly did.  When the phone started ringing Penn asked the audience to point where the ringing was coming from.  Most of the audience was pointing towards the stage but I heard the phone back in the house somewhere so I pointed towards the audience. At that point the audience realized the ringing was coming from the house as well so they started pointing towards the center of the audience as well.  Penn drew everyone's attention to an empty seat in the middle of the center section and asked the people sitting on either side to look under the seat since that's where the ringing was coming from.  They pulled a styrofoam box  out from under the seat and passed it up through the audience to the stage and handed it to me.  Penn asked me to read the label on the box, which indicated it came from a seafood restaurant next door to the theater.  It was sealed with tape, which Penn asked me to pull off.  I opened up the box and found a fresh fish lying in a pile of ice.  Penn asked me what kind of fish it was but I didn't recognize it so I just said something like "I don't know.  A dead fish." which got a great reaction from the audience.  Penn said it was a tilapia.  As Teller showed the fish in the box to the audience Penn handed me a microphone.  Teller placed the fish on a table that had been wheeled out as Penn had Heather call my phone.  Sure enough I heard the phone ringing from inside the fish and I held the microphone up close to the fish so that the audience could hear it as well.  Teller picked up a knife, cut the head off the fish, and there inside was a sealed plastic bag with my phone inside.

Penn & Teller have named this illusion "Cell fish".

What the audience saw

The audience saw a little bit more than I did in one sense.  When Penn dropped the lid to the coffee cup he already had my iPhone inside the cup.  As I bent down to pick up the lid for him he apparently threw his hand up, causing the iPhone to fly up out of the cup behind us where Teller caught it in a big red plastic bucket.  This is what caused the audience to roar with laughter and why the phone wasn't in the cup when Penn stomped on it.  Teller took the red bucket and suspended it from a cable that was raised up over my head, so the phone was suspended ten feet or so above me inside this bucket.

When Penn prompted Heather to call my phone this is why a lot of the audience pointed at the stage, assuming that the ringing was coming from the bucket suspended over my head.  But it was obvious that the sound was coming from the empty seat in the audience, so that's the crux of the illusion as far as the audience goes - how did the phone magically move from the red bucket that was suspended above my head the entire time to inside the styrofoam box that they pulled out from underneath that seat?

I was actually able to find a couple videos on YouTube of this trick as the audience saw it.  Here are two of them - one has good video but lousy volume and the other has better volume than video so check them both out if you want:

How it worked (spoiler!)

If you don't want to know how they did it then stop reading here as this explains exactly how it was all done.

When the Kriss Angel cardboard cutout was brought out on stage both Penn & Teller pulled out some fake jewelry to add to the cutout.  As they attached this fake jewelry (a large necklace and a glittery cross) Penn apparently slipped my iPhone into a pocket on the back of the cutout.  He swapped it for a fake iPhone that I think was already attached to the back of the cutout.  When the cutout was carried off stage my iPhone went with it.  Penn put the fake iPhone into the Starbucks cup then tossed that one into the red bucket as I was misdirected by the lid that he "accidentally" dropped onto the floor in front of me.  The audience thought it was my iPhone that flew through the air into the bucket, but it was obviously just a prop.

As Penn & Teller explained what they were going to do to the audience, a stagehand off stage retrieved my iPhone from the Kriss Angel cutout, put it in a plastic bag, and then put it inside the fish, which had been slit open on one side.  I never saw that side of the fish until after Teller had cut the head off, so I wouldn't have known that the cut was already there. The fish then went into a styrofoam box, and it's a safe bet that there is a passageway under the theater to the seat where the box was "found" by the audience.  The stagehand just had to run down and slip it underneath the seat before Penn & Teller needed it to be there.

They've obviously been doing this trick for a while since there's a ton of video of it up on YouTube.  Just search for "Penn & Teller cell fish" and you'll find them all.  Well here's mine to add to the mix:

28Sep/100

August 2010 Vacation – California

The following is Heather's journal of the vacation.  All the photos I've published from the trip can be found here:

Friday, August 20 - Heading to San Francisco

We arrived at Logan and went through very little drama during check-in or the TSA screening process.  Finally, we found ourselves at the JetBlue gate waiting for our flight to take off.  As it got closer to departure there were more and more people waiting at our gate and another JetBlue flight waiting to depart at the same time.  Rumors were going around that our flight was a crew member short and we were waiting for someone to arrive from NYC.  As is customary, there was very little information announced by the gate staff to discourage these rumors.  About an hour past our departure time, we were finally called to board and as we were seated and going through the departure introductions, the captain came on the speaker and apologized for the delay.  He explained that both of the flights waiting to depart at our gate area had been a crew member short.  JetBlue had one crew member to spare down in NYC and had flown them up.  The two flights determined which flight was going to get the crew member needed by coin toss and our flight had won the toss.  With that auspicious start and explanation, we headed off to a week of sightseeing and driving the beautiful Pacific Coast Highway.  At the Hyatt Embarcadero in San Francisco they had a beautiful light sculpture that ran the full height of the lobby.  I’m not sure if it was because it was so late at night, or that I was not able to sleep on the plane, but it sure was sparkly and pretty.

Saturday, August 21 - San Francisco

On Saturday we slept in and upon waking wandered down the Embarcadero.  The weather was a bit of a shock.  There was a cold fog and slight wind that stayed with us for much of the trip down the coast.  I had read about bikes that you could rent and take for a ride over the Golden Gate Bridge.  This turned out to be a pretty popular activity for both tourists and locals alike.  We ended up renting a tandem bike and with a map and quick instruction of where we needed to head (both provided by the rental company) we took off on our adventure.  Figuring out the tandem bike was a bit of an adventure in itself.  The pedaling, balance and length were difficult to manage multiply these issues by the hills, wind and jetlag and this mode of transport wasn’t as easy breezy as advertised by the bike rental company.  Traveling by bike did afford beautiful views of San Francisco Bay, Alcatraz Island and Sausalito.

After starting out on our adventure we noticed that the exact same yacht that was in St. John during our February vacation (the “A” owned by Russian billionaire Andrey Melnichenk and designed by Phillip Stark) was now anchored just off of San Francisco.  We decided that we needed to contact Mr. Melnichenk to coordinate our next vacation destination.

The bike path to the bridge was nicely marked but we had to get off the bike several times to push it up the hills.  The Golden Gate Bridge was impressive, one side was marked off for bike traffic and the other was for pedestrian traffic.  Once on top of the bridge the views were spectacular and the wind was fierce.  The bridge is an awesome marvel of architecture and even more impressive when you are biking/walking across it.  Looking down at one point, I think I saw a seal playing in the water but it was hard to tell exactly what it was from so far up.  On the other side of the bridge the bike rental company had said it was a coast down to the town of Sausalito and then a ferry ride back with the bike to San Francisco.  They forgot to mention that there were some pretty impressive hills between the bridge and Sausalito.  We took them in stride and then headed back on the ferry to San Fran where we had already made a reservation to see Alcatraz that night.

Alcatraz cellAfter returning the bike we headed over to the pier to catch the ferry to Alcatraz.  The tour run by the national park service is pretty impressive.  Bruce had been to Alcatraz as a kid and was impressed by the improvements and renovations.  They now start the tour as if you were a prisoner entering Alcatraz.  After getting off the ferry you follow the path up the hill entering the prison via the shower room.  They had an audio tour that featured several of the prison guards, prisoner and inhabitants of the island.  You have to remember that it wasn’t just prisoners on the islands. The guards and their families also lived in accommodations provided right on the island.  The personal stories of the guards/prisoners and people who lived on the island were my favorite and really added to the experience of touring the prison.

Sunday, August 22 - Monterey

Upon wakinMuir Woodsg today, we picked up our rental car and headed over to the Exploratorium.  Both Bruce and I had been there before and wanted to see if it was as remembered.  I loved this place as a kid and have to say that I enjoyed it just as much during this visit.  After the Exploratorium, Bruce suggested heading over to Muir Woods to walk among the redwoods.  I remember doing this also as a kids and Muir provides a comfortable walk among these impressive trees.  They are so majestic you are stunned into silence as you walk around and marvel the beauty.  We were also lucky enough to see a deer rooting just off the trail, so beautiful.  Wanting to be sure we were driving during daylight hours, we headed off to Monterey and checked into Casa Munras Hotel and Spa.

Monday, August 23 - San Luis Obispo

We started our day in Monterey walking along the bay down the recreational trail to cannery row on our way to the Monterey Bay Aquarium.  There were harbor seals everywhere along the walk and the Aquarium had a really nice restaurant where we were able to sit down to lunch while enjoying a nice view of the bay.  The next portion of the Pacific Coast Highway was through Big Sur.  I wanted to drive to give Bruce a break and also to test my skills hugging the coast on the twisty road.  The vistas were breathtaking and much of the trip was just a two lane road, hill on one side and plunge down to the Pacific Ocean on the other.  There were lots of designated scenic vistas with parking areas to pull off and check out the sunset.  I enjoyed myself immensely just driving and checking out the scenery on our way to San Luis Obispo.  Just prior to arrival in San Luis Obispo, there is an Elephant Seal beach that we pulled off to check-out.  The seals were in lounge mode and moved very little while we were there.  Every once in a while we would see a flipper kick up a bit of sand, but basically they were very large lumps on a sandy beach.  We stayed at the Apple Farm Inn in San Luis Obispo and went into town for dinner and to check out the mission.  It was such a beautiful night, warm and a chance to eat under the stars and relax after the day.

Tuesday, August 24 - Santa Barbara

Today we headed out with very little planned so we went headed off to Santa Barbara with a few small side trips to check out on the way.  Pismo Beach of Bugs Bunny fame was a trip as well as checking out Solvang a small Danish settlement with windmills and lots of artisan stores and eateries.  It was so hot (it felt well over 100) that we found a quick restaurant to eat in and then headed out to Santa Barbara.  As we were checking out Santa Barbara online, we found that they had a whale watch that promised to be impressive and offer the chance to see some blue whales as well as other whales we do not see on the east coast.  We purchased tickets for the next day and checked into the Agave Inn.  We went for a walk along the boardwalk in Santa Barbara as well as the downtown commercial street that had several sections blocked off as pedestrian only with a large farmers market.

Wednesday, August 25 - Newport Beach

Today started out looking very foggy and we headed down to the whale watch.  The whales typically are feeding off a couple of miles off the coast of Newport Beach around the Channel Islands. Unfortunately, we were not there at the right time and the whales were further off in some choppy water.  On route to the feeding ground we ran into some Common and Risso’s Dolphins.  They were so cool and different in their personalities.  The Common Dolphins were playing around the boat and jumping in the wake.  The Risso’s Dolphins seemed to prefer being left alone and the boat had to chase them as they dove down and resurfaced further away from the boat.  The visibility was not good that day and ultimately the whale watch turned around before we were able to find any whales.  We stopped back at a painted cave in the Channel Islands which was pretty and an interesting looking geographical feature.  The whale watch company provided us with coupons to use at a future date.  We ate dinner in Newport Beach in the attempt to avoid rush hour traffic as we were headed through Los Angeles.  Driving through Los Angeles turned out to be fairly easy.  That night we stayed at a friend’s house in Newport Beach and we arrived there pretty late that night.

Thursday, August 26 - Newport Beach

Today we went down to check out the Sawdust Festival artisan festival.  We headed to have breakfast before the festival and had a strange run in with a guy in a power suit coming out of the local Starbucks.  We were sitting on a patio waiting for a breakfast to be delivered and he came out of the next door Starbucks.  He took a sip of his drink and said “OMG that is good!” while looking at us.  It was the strangest encounter and Bruce thought that the guy must have been talking into a Bluetooth, but we didn’t see one.  After taking a quick spin around the festival, we headed over to Huntington Beach.  It was super cold going out on the pier but there were quite a few volleyball games on the beach.  We stayed there about an hour watching the games and then headed down to the check out the dog beach.  As we got there, there was a group of 5 greyhounds being led down to the beach.  We went over to chat with them for a bit and then proceeded to marvel at the sight of all the different dogs frolicking in the waves and playing with each other.  It was such a great thing to see.  We headed back to the house and went to dinner with Marian and her son Aaron at the Cheesecake Factory.  It was nice to have a night to sit down and chat with them.  They were so generous to offer up their place to stay.

Friday, August 27 - San Diego

Today we headed out to see the San Diego Wildlife Animal park.  It was a hot day and we started our visit watching a Cheetah presentation.  They pair the Cheetah with a dog so as to help the Cheetah remain calm in situations where its initial reaction would be to run away.  The interaction between the Cheetah, and dog companion, were really cool to witness.  It is a beautiful animal and to be able to see it up so closely was impressive.  The next adventure we had there was to ride a safari vehicle through several of the gated off areas.  We were able to feed both giraffes and the rhinoceros.  The tour they do here is really informative I would absolutely recommend that you do this tour at the park.  We stayed at the Sheraton San Diego Hotel & Marina in San Diego.  After checking into our hotel that night, we headed over to Old Town to have dinner.  In a small-world coincidence, we ran into a former co-worker of mine from Boston, Corey McAveeney.  We had worked at an insurance company together several years ago. She was in town for a conference and staying at the same hotel as us.  We ended up sitting down and having dinner with both Corey and her husband Dmitry.  They were celebrating their one year anniversary and it was so fun to catch up with old friends.  Such a nice night in San Diego.

Saturday, August 28 - San Diego

Our final day in California and we planned on heading to Sea World and then to the San Diego Zoo before catching our red-eye flight back to Boston.  We ended up having such a good time at Sea World that we spent most of the day there.  I had never been to Sea World before and most of the animal enclosures seemed sad and dated.  The best part of the park for me was the various shows they put on with the animals where they demonstrated behaviors and skills.  We went to 3 different shows (Shamu Show Believe, Sea Lions Live and Blue Horizons).  My favorite was the Sea Lions Live show.  It is so amazing to see how intelligent Sea Lions are.  Their personalities really shine performing in front of an audience.  We also had the opportunity to feed some of the animals at the park.  We went to the sting ray area first and I thought I was going to have no problem feeding them.  When I got there they were so slick feeling and the fact that I had to stick my hand down under their bodies to get to the mouth freaked me out and I had to give Bruce the rest of the bait fish.  One of our last stops was to the sea lion and harbor seal area.  The behavior of these animals trying to encourage us to give up our fish was a so funny to watch.  The Sea Lions would bellow loudly shake their heads up and down in a “yes” gesture as you looked them over trying to decide which one to bestow with a fish.  The harbor seals had their own style.  They would raise a flipper and gesture wildly in what I can only describe as a wave motion trying to encourage you to toss them a fish.  What characters, they had obviously observed a multitude of visitors in perfecting their tactics.  There was one harbor seal in particular that both Bruce and I noticed immediately.  He had cataracts in his eyes and was a bit slower than the others.  If he was surrounded by the other harbor seals in the tank, he definitely was not able to get the fish thrown to him; his reactions were not as keen.  If he was able to separate himself from the pack, he could hear the fish splashing in the water and was very quick to react and get his share of the take.  None of the animals in the tank wanted for food.

After exiting the park we headed to Old Town again for a final meal and to stroll around for some exercise prior to take-off.  A nice burrito meal washed down with a margarita for good measure completed an excellent week in California with Bruce. The only thing of note during our flight back from San Diego happened while standing in line to check our bags at the airport.  We noticed about ten young men, all with crew cuts, checking in nearby us.  We noticed that the men all were escorting crates with dogs in them, and I was able to read “Lackland AFB” on some of them.  After we got home we looked Lackland up on Google and discovered that it trains military working dogs and handlers for all branches of the military. We both hope that the men and their dogs are safe and successful wherever they are deployed.

Filed under: photos No Comments