Daniel's posterous

Barracuda Health Monitoring with Nagios

Ive written a few plugins that check the health of a Barracuda SPF appliance. They're in (bad) perl but seem to do the job pretty well

The first, to check the RPM of the CPU and System Fans has been accepted into the NagiosExchange site and is listed as:

http://exchange.nagios.org/directory/Plugins/Hardware/Others/check_barracuda_fans/details 

The others, which check the 3 mail queues, and the CPU temperature have been submitted but not yet approved.
I'll update here when they are released.

Changing default editor to vim

Run the command below: 

sudo update-alternatives --config editor

Then select vim.basic or vim.tiny from the menu presented

Copy SSH Key to Server in one command

Use this technique to copy the SSH key and add it to the authorized_keys file in one command

ssh-copy-id -i .ssh/id_dsa.pub username@remotehost

Pop in your password and you're done.

Sage Payroll 2011 Won't Start

Today I encountered a problem with Sage Payroll 2011 v17.00.029, when started, the program would display the splash screen and successfully run the first run wizard (asking for Company name, Address and Tax District to be used when creating defaults etc.)

Once this completed, the application appeared to close (which I assumed was normal). On next startup, it asked me to select the company I had created and login (using the default MANAGER account and no password), selecting this and the correct date for processing using the date picker, then clicking OK, the application then crashed out.

The solution to this was to change the region that the system was running under, I had accidentally set it to US using the unattended installation disc I created, setting this to UK and rebooting solved this problem and allowed the application to run successfully.

This can be diagnosed quite easily by inspecting the date format in the date picker textbox, i.e. today it should read 21/03/2011 but instead was reading 03/21/2011. I think this might be a design flaw in the Sage application as the date picker successfully calculated the week-end number (50 in this case) but was unable to execute the program. I believe that Sage have no intention to fix this as it would require a lot of effort for little reward so be careful if you are using a non-EU cloud service for your Infrastructure as a Service or if you have multiple geographic locations.

Unprotect PDF Documents

install GhostScript then run this command to unprotect PDF

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=OUTPUT.pdf -c .setpdfwrite -f INPUT.pdf

Linux Guest VMs on Windows Server 2008 R2 Hyper-V Failover Cluster

If you are deploying any Linux VMs on a Windows Server 2008 R2 Hyper-V Failover Cluster (and I assume a Hyper-V R2 failover cluster) there is a problem I have  identified with them and their networking. I have replicated this on Debian Lenny and Red Hat so far.

If in your failover cluster, you have the node hosting the VMs fail, when they failover to another node in your cluster, you will lose networking on them. I believe that this is caused by the MAC address changing when they move over to the other node. Networking is not actually "lost" but the ethernet interface will have incremented, so eth0 will become eth1 assuming that you do not have an eth1 already, in this case I haven't tested what happens yet. To solve this (on debian) you need to edit /etc/network/interfaces and change any references to the broken interface to be set to the new interface, identifiable by running ifconfig -a
Then execute ifup eth<new>, where <new> is the new number you found from ifconfig -a and set in /etc/network/interfaces.

I believe this problem is preventable by setting the MAC address(es) to be static in either SCVMM or in Hyper-V manager. If you are using Failover Clustering and especially if you are using Cluster Shared Volumes, I *strongly* recommend that you use SCVMM or the version of SCVMM found in System Centre Essentials 2010 Plus. It makes managing them a lot easier than using Failover Cluster Manager, and a lot safer than using Hyper-V Manager.

I am carrying out further tests on this configuration to see if only static MAC addressing is required or if MAC spoofing is also needed. Multiple interfaces will also be tested.

Hope this helps someone 

Voice - Missing, Reward offered

So this morning I've woken up and discovered that I've lost my voice. I have no idea what caused this as I didn't do anything differently nor am I feeling any more unwell (I've had a bit of a cold but I don't think that would do it)


It's quite a peculiar situation for me, when I'm talking to someone I can hear my proper (or at least my perception of it via bone conduction) voice in my head but what comes out is a complete whisper, I can raise my voice but it either feels like I'm shouting through treacle or leaves me exhausted.

So, if anyone phones me today I think I might just lay on some heavy breathing and make them think that they've gotten a wrong number.

Posted July 28, 2010

Plumbing.

Things I have learned today (or why I am damp and smell a bit like the
plumbing counter at a building suppliers)

1. Some plumbing is easy.

2. I am better at plumbing than I thought.

3. Plumbing is called a wet trade for a reason.

4. Toilets are a *bastard* to work around

5. The plumber that fitted our house out is a moron who I will *drown*
in what I had to take care of today if I ever meet him.

6. B&Q staff know fuck all squared about plumbing.

7. My toilet now no longer leaks over the floor but it cost me £60 in
parts and a tool to fix.

8. The smell at a plumbing counter at a builders suppliers is
"Plumbers Mait" it's a sticky, never setting mastic compound that is
waterproof and incredibly sticky.

I am now quite pleased with myself and am having some hot tea to
celebrate. I may or may not try to consume my own weight in Jaffa
cakes.

Posted July 10, 2010

London to Paris Day 3 - The final leg

After having a very pleasant and pleasing day 2, day 3 started in a very similar manner, a bit cold but otherwise nice. 

After cycling through a very sleepy village we came back out into the countryside and another few hill climbs. 
What made this a bit special was cresting the hill and seeing a hot air balloon, no wait 2, 4, 7. 7 hot air balloons all at different heights, just rising above the peaks of some hills in the distance, the sun still quite low in the sky and some mist on the ground. It was stunningly beautiful, like a postcard.

The first rest stop came up on me very unexpectedly, it felt like I had only started and it was already time for a break. A quick stop for more bananas, water, and some raisins and I was off again. Spent a lot of the morning alone, which was incredibly pleasing and relaxing, I was truly able to relax and not think about anything, just the mileage that I was covering as the road zipped past at what several months earlier would have been impossible speeds.

As I stopped for a breather, I neglected to look ahead at the hill that was approaching, otherwise I would have just powered on up it and kept up my momentum. As I was a silly daniel, I didn't do this and had to walk for a bit after struggling with the first hundred feet or so. By stopping like this I was caught up by another rider, a girl from Italy who became a riding buddy for the next stage and a half. 
Whilst I was chatting to her I found out that I was the marker for several of the other riders and that they were trying to see who could keep up with me, I was easily spotted as for the 2nd day I had another brilliant white jersey on. The next rest stop also crept up on me and a pack formed as we waited for a few other riders that wanted to ride with us, for a bit of sport etc. I found this quite amusing and rode fairly close to the middle of the pack.
Eventually I got tired of how slowly they were actually travelling as I found it quite fatiguing compared to travelling at what I called my "natural" pace so I zipped off ahead and left them to it. I must not be a very social person as I much preferred my own company and enjoyed the cycle much more. 

The route took an unexpected turn and we ended up on very hilly terrain, I started to struggle a lot having wasted a lot of energy getting back up to speed after exerting myself by pootling along at a very inefficient (for me) pace.
The hills became daunting and at every part of the road it felt like the bike was being pulled down into the road and it took incredible exertion in order to make it move, on one hill I had to get off and push it to the top.
I thought I wasn't going to make it and that the next rest stop couldn't come soon enough. This was, as usual at the top of a hill. When I stopped here, I grabbed whatever food was available, it was getting more and more scarce as the tour was coming to an end and they had calculated it reasonably accurately.

I was egged on and left, knowing that there was an "epic" (their words, not mine) climb before lunch. This had me demoralised a bit, but a quick downhill blast on good tarmac cheered me up no end and we were soon back on the flat. I kept a lookout for anything that looked even similar to Paris but nothing appeared. 
The climb that was described as epic actually fitted the description, it was a series of alpine style hairpins that ascended about a thousand feet over the course of about 6 miles. For some reason I had no problem with this climb and the scenery was, as I am sure you are sick of hearing, beautiful. There was an almost middle eastern feel about it, lots of red rock (that I am assuming was sandstone) and an incredible heat, apparently one of the other riders clocked it at 38oC.
We arrived into a small city/large town and circled around what I am assuming was the outside of the city centre, lunch was at a golf course on the outskirts and was delicious (do you sense a recurring theme here?) and much appreciated even though the service was a bit disorganised.

During lunch there was a mini-briefing about what we were going to do that afternoon, especially with the entrance into Paris. After this, we all set off, largely as one unit and set about making it to the first stop, where we would regroup and set off again as one unit so that our entry to Paris was more condensed and organised, rather than very spread out as it had been over the previous days and rest stops.

The first hill was quite long and steep but nothing too stressful, what followed was a very steep and hairy descent through a village that must have been superglued to the side of a hill and had quite a few cobbled sections. Now as you can imagine, cobbles on a bike are bad, cobbles on a road bike, with high pressure skinny tires, no suspension and a saddle that felt like it was carved out of rock was pretty bad. Especially if your arse is already busted after a fall and 2 days of cycling on same saddle.

The regouping point was in a forest with a cycle lane through it, again very very pretty. Fruit was getting very low and had to make do with 2 scabby bananas and a half handful of the ever present raisins. Setting off together we were finally on the outskirts of Paris, this leg was a bit stressful and tougher than it could have been as there was a lot of jockeying for position nearer the front, lots and lots of traffic lights and a general uphill grind. As is usual with uphill sections, there is a downhill section that followed, made all the more interesting by the traffic, which being Paris at about 3.30 was backed up, overtaking cars on a downhill section with less than useful brakes and even less useful common sense is not to be recommended. It is however incredibly exhilarating and something you should probably do once at least (you may only get to do it once as it could be your last)

We grouped up once again at the Bois Du Boulogne, in paris traffic proper. This was to be our final stop before the Eiffel tower. This was an interesting leg navigation wise as there was a bunch of 80 tired cyclists, Parisian traffic, Parisian streets and a lack of signage. We all managed to make it through without much incident, I think one woman managed to hit a parked car and fall off but that was about it. We came down a hill and in front of us was it. The Eiffel tower, we had made it. It was an absolute site to behold and there was much ringing of the bicycle bells. It didn't quite stop there however, as we had to cycle around it, staying on the road until the entrance to the grassy area at the back. Upon arrival bicycles were promptly dumped on the grass and Champagne was distributed (well sparking wine that was quite warm)

After being chased off the grass by the park warden and interrupting someones wedding photos (very very very sorry about that) we had to get back on the bikes once more and head to the hotel. The bikes were popped into the back of a van and that was the last that we heard of them. 
And as luck may have it, that is the last that you will hear about the London to Paris cycle on this blog, unless of course I change my mind and decide to do it again.

Posted July 30, 2009

Trip To The Cinema

So last night, my wife, her nephew and myself decided to go to the cinema and catch the latest Harry Potter, it should have been a relatively painless experience but turned out to be very far from the truth.

Whilst the cinematic experience was in itself perfectly satisfactory, a good film, no interruptions in viewing by the projectionist, sound direction and levels all nicely set etc. The actual cinema experience left an awful lot to be desired.

Firstly and most importantly was the other patrons of the cinema, I was abused verbally and physically in the queue. I had to actually push someone back and basically tell them that if they didn't move their fucking heffalump arse I would move it for them. we had decent seats (i.e. not craning up or to either side to see the screen) but this had the effect of being right at the aisle, if one fucker went up and down those stairs 20 of them did. 

And what the fuck is it with the mobile phones? Do they have to have 12 million candela screens? Jesus H Christ, the guy in front of me actually answered his phone with "No I can't talk, I'm in the cinema" then proceeded to have a 5 minute conversation. Take that shit outside, you aren't that fucking important (believe me, he was no brain surgeon)
Every 30 seconds some cuntbag in my field of vision had their phone out and I was half blinded. Yes, you iPhone users as well, turn the fucking brightness down if you feel the need to use it in a very dark room. The only time I had my phone out was to make sure that it was on silent and that I had turned the vibrate off, does no one have any consideration for the other poor bastards that paid £6 for their tickets?

Secondly is the price. Last night cost about £35 all told for 3 people, a bag of sweets and a medium coke each. £35... I'm sorry but for £35 I would rather get a bluray disc, load it up into my excellent cinema system and have a few beers/ciders out of a Glass. It's no bloody wonder I don't go to the cinema anymore and paid out reasonable money for good kit at home. I'm just going to wait for stuff to hit bluray (or a HD Download :) ) and watch it there.

So all you inconsiderate cinema users, you can all go and fuck off.

Posted July 16, 2009