skinning nagios – nagios doesn't have to be ugly!

Nagios can be pretty, and several people I’ve told this too seemed surprised, so I thought I’d put a quick note here. Here is a nice theme for nagios….

http://new.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F1723.html;d=1

Unfortunately, the underlying UI is still the same horrible interface, but…. this does make a big difference to the aesthetics 🙂

Review of the N95 and the Forerunner 305

I’ve had a Forerunner 305 for a while now. On the rare occasion I go running, I find it really useful. At first, I thought t would be a great geeky toy that I’d get bored of – I honestly expected it would find its way into a draw and never be used again after the first couple of uses.

However, it’s actually a great running accessory, and I advise this kinda hardware to all by the most casual of joggers. It’s far too easy to run too fast when you’re out running – you can set the forerunner up to beep at you when you go too fast or too slow – obviously you configure these speeds yourself. Recently I ran a half marathon, I did virtually no training for it, and without the forerunner on my wrist making sure I didn’t run too fast or too slow, I’m not sure I’d have finished!

Continue reading “Review of the N95 and the Forerunner 305”

Dell PERC 6/i and RAID monitoring

A few pointers for people trying to get Dell’s PERC 6/i RAID monitoring working under Ubuntu, and any other linux for that matter. It also applies to PERC 5/i too, and… other stuff 🙂

First, visit Dells Linux site. Have a poke about, see what’s there.

Next, we need to download a tool to get information from your array. Download LSI’s MegaRAID CLI tool for linux. It comes as a .RPM, so if you’re an ubuntu user, you can convert it to a .deb using alien, or convert it to a .tar.gz.


# alien --to-tgz MegaCli-1.01.39-0.i386.rpm

You then have a CLI tool you can use to get all your data now! For example:


# ./opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL | grep State
State: Optimal

One thing I spent a while figuring out was how to get the rebuild progress, so here’s how:


# ./opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg -PhysDrv [32:1] -aALL

There’s also a really useful cheat sheet for common tasks

Don’t forget to actually monitor this output with nagios, or your favorite monitoring tool!

phplondon08 – the 'crazy guy' mail

As you’ll know from my previous post, I was ‘heckled’ during the Q&A of the framework talk I did. This wasn’t aimed at me, but rather at all 3 of us on the panel, and more importantly, at ‘MVC’ frameworks as we commonly see them today. Marcus Boniton also mentions this incident on his blog.

Personally, I don’t think he’s a crazy guy, I just like the title and find it quite amusing 😉

I pointed the ‘crazy guy’ to my previous blog entry, where he replied to an author of one of the comments, and CCed me in. I thought it was a very interesting mail, so it’s included below. I put this here with full permissions from Mike.

Continue reading “phplondon08 – the 'crazy guy' mail”

phplondon08 – My symfony talk

I talked at PHPLondon Conference 08 yesterday. I’m putting my slides online, here they are!

My phplondon08 symfony Presentation

I got slightly heckled, and was amazingly nervous because it was my first time talking, but I think it went well! Apparently the audio recordings will be available at some point, I’ll update this post when they are.

Nokia Liveblog Image Uploading – Part 1

I’m calling this part 1, because I hope to follow it up at some point, although… who knows!

I wanted to be able to upload my photos from my N95 directly to my website, and notice that S60 phones appear to have an option to upload to Flickr and Vox using the ‘online services’ system, so I figured adding my own shouldn’t be too hard. After a bit of googling, I found this:

lifeblog_posting_protocol_specification_1.0.pdf

Continue reading “Nokia Liveblog Image Uploading – Part 1”

Stateless password reset system

It’s pretty common for sites to have a password reset system on websites, which allow you to enter your email address, and have the site email you a link you can use to reset your password.

I had a specification that demanded this kind of system, however it needed to be stateless – in that I could not store any extra information. Also, the hash could only be used once, and it was required that it needed to time out after a configurable time period. Also, the URL must be short enough such that it can be easily copied and pasted into the address bar from an email, and doesn’t wrap in the email.

Continue reading “Stateless password reset system”

Getting PHP4 to work along side PHP5 in Ubuntu Gutsy

I got PHP4, compiled it as CGI.. here’s how.

Install required packages

  apt-get install make libmysqlclient15-dev libmcrypt-dev libxpm-dev libpng12-dev 
libjpeg62-dev libcurl4-openssl-dev apache2-dev  gcc bison flex

configured as follows.

./configure --enable-force-cgi-redirect --disable-cli --enable-discard-path  
 '--prefix=/home/pookey/php/' '--with-xml'  '--enable-bcmath' '--enable-calendar' 
 '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' 
  '--with-xpm-dir=/usr/X11R6' '--with-mcrypt' '--enable-magic-quotes' 
 '--with-mysqli' '--with-mysql=/usr' '--with-openssl' 
  '--enable-discard-path' '--with-pear' '--enable-sockets' 
 '--enable-track-vars' '--enable-versioning' '--with-zlib'

This installed it into /home/pookey/php

Enabled per vhost using the following syntax

  SetEnv PHPRC /home/pookey/php/lib/stage
  ScriptAlias /php4-cgi /home/pookey/php/bin/php

  <Location />
    Action php4-script /php4-cgi
    AddHandler php4-script .php
  </Location>

For some stupid reason I failed to figure out, doc_root needs to be set to the document root for each vhost, and can only be done in php.ini (setting PHP_DOCUMENTATION_ROOT with SetEnv failed). This means each vhost needs it’s own php.ini, which is placed wherever you set PHPRC to.

Using this system, you can have PHP4 and PHP5 mixed even on the same vhost

Trac and googlebot, a crafty trick!

I noticed that google was going crazy indexing trac for doctrine. Today it downloaded over 90000 pages, transfering 3 gig of data! It was causing quite a bit of load on the server (not huge amounts, but enough to show in my graphs!)

Eventaully , I came up with a nice little trick for reducing the number of hits google will make against a trac install. Google have extended robots.txt to allow some slightly improved pattern matching. Here’s my snippet, if you don’t understand it, please don’t use it.

User-Agent: Googlebot
Disallow: /*?rev*