One of my recent Citrix KB articles was about creating a Netscaler user monitor (which are Perl based) to allow for a more intelligent type of monitoring for AJP based services than a standard TCP based socket open/close check.  The AJP Protocol Reference is good enough to provide a method for doing a simple and lightweight PING/PONG request/response.  Unfortunately, the format of the packets is such that they cannot (currently) be added as a TCP-ECV monitor, essentially because of restrictions on non-printable characters being inserted into those monitors (believe me, I tried multiple ways to insert the required characters).

So, I set off to write the Perl version of such a monitor, but before I did I needed a simple script outside the Netscaler for debugging purposes – having to rely on the monitor for testing is needlessly cumbersome, better to get it functioning first and then add it to the monitor code later.  Also, because of that approach, the script is perfectly usable as a generic test and is written almost entirely as a self-contained sub-routine (anyone that has seen the user monitor structure on the Netscaler will instantly recognize that also).  Hence, I think it would be very easy to add the subroutine to a syslog or other monitoring type script.  Therefore I decided to share the more generic version here.  The full code is after the jump, if you prefer a more compressed binary version you can find it here: ajp.pl.gz

I have the acknowledgements in the code also, but to get them in before the jump, they were invaluable:

Continue reading »

 

UPDATE: 28/09/2011 – I have resolved the issues I was having with the Citrix blogging system and published an updated version of this post there:

Netscaler NITRO API 101: Logging in with Python

I’ll hopefully be an actual Citrix blogger soon, but in order to try this out, I thought I would post here first and see how it goes…..

If you are using one of the SDKs (Java or C#) then creating a NITRO session on the Netscaler is as simple as creating a new “nitro_service” object, choosing your connection method and setting your credentials appropriately. If have supplied valid credentials and your Netscaler is correctly configured then you can continue on your merry way and remain ignorant of what has just happened in the background. However, if you are looking to use another language to make use of the RESTful interface that NITRO provides, then you will need to know more.

The NITRO API Documentation is available from the Netscaler GUI, of course, but that serves as more of a functional specification than a guide to building a successful REST client in your language of choice. So, what exactly is required to take that first step and log in to a Netscaler?

The short answer is: A properly formatted POST request using appropriate credentials – easy, right?

Creating that properly formatted request, from scratch, can be more tricky that it appears. The exact requirements, along with an example, are after the break. Continue reading »

 

I decided to move off my old hosting provider and onto a new one due to a recent degradation in performance and a very poor Ruby on Rails implementation.  At the same time, my domain had come up for renewal and the registrar (ENom.cc, now owned by Demand Media) wanted a ridiculous $35 per year fee to renew.  So, off to GoDaddy I went, and got the renewal for $20 a year plus a year free since I was transferring it in, so quite the reduction in cost.

I figured I would share some of the information gleaned from the experience, as it was less than well documented on the interwebs.  The transfer process is an interesting one and my first tip is to make sure that if you are moving to a new hosting provider at the same time (as I was) that you update the DNS for the domain first – you’ll see why when I describe the rest of the process.  Once you have that done the first step  involves unlocking the domain – this is one of those things that gets mentioned a lot in guides but no one explicitly tells you what it means – for those that don’t know, that looks something like this when you do a whois lookup:

Status: CLIENT-XFER-PROHIBITED

That is normally a good thing – prevents a transfer being kicked off without your knowledge by someone with nefarious intent.  Changing it is a less than transparent task though and involves getting into the registrars admin tools and finding the correct option to un-tick (assuming they expose it at all).  Once that is done you then have to initiate the transfer – the first stage of that is a confirmation request to the registered owner of the domain (hopefully an e-mail address you still have access to) by the registrar seeking the transfer, followed by another confirmation request to the same address by the registrar that currently holds the domain.  This all takes several days, so you have to be sure you get this done long before the domain is due to expire and that any housekeeping on the domain is done in advance.

In terms of the hosting transfer, my new provider (Dreamhost) allows the use of free sub-domains (of the form name.dreamhosters.com) so that you can set up your site on their systems and test it before taking the plunge and moving everything over.  They also have a Cpanel importer to help which partially worked and saved me some time – not perfect though.  Their Rails hosting support is far better and my Redmine instance is up and running now without issue.  So far, so good – let’s hope it continues :)

 

On the front page of the blog at least – it tended to just clutter up everything and was generally unusable.  I didn’t delete them though, just moved them to a hidden category.  Whether or not I resume a regular blog or not is still up in the air – we shall see.  But at least if I do post something it won’t be drowned out by tweets……

 


DSC00274

Originally uploaded by Adam Comerford

I love this picture, so posting it properly – my little niece decided she wanted to take a nap right on my chest. This was our first visit, so she was about 2 weeks old at this point :)

I think that would put her at abut 7 pounds – felt light as a feather……

 

Sometimes you can’t fit your thoughts into a 140 character message, so time for an actual post for a change.  Not being a majorly political animal, this might seem like a strange post to jump in on, but I’ve always found it easier to look at politics from the outside – my overwhelming dearth of faith in Irish politicians also makes the goings on elsewhere more attractive.

I just watched Eddie Izzard’s tweeted video over at http://www2.labour.org.uk/eddie-izzard – as an Irishman I won’t be voting in the UK elections, but this might just have swayed me if I did.  I think though, that the current Labour leadership is the very same one (with a few minor changes) that conned the British people into the war in Iraq.

A vote for Labour now is a vote for that same leadership – I don’t buy the story that it was all Tony Blair anymore than I would believe it was all Dubya and Cheney on the US side.   Dump that leadership, start fresh, and then Labour would likely get my vote (depending on the local candidate of course), otherwise you are condoning what they did and asking for more.

Do I think the Tories are any better?  No – but a significant defeat might be needed to knock some sense into Labour and get them back on the right track.  Nice try Eddie, but maybe next time.

/rant

Now, back to work and studying for exams :/

 

While this site may not be my main outlet for ranting and rambling or even status updates at this point, it used to have a semi-decent page rank, so I’ll use it to let people know about a worthy cause/quest undertaken by a friend of mine, Reed.  Reed lives in Washington DC and after becoming unemployed for the first time in his life (something I will have to deal with myself soon enough), he decided to give away $10 a day every day for a year to people and record it all while he did it. I doubt my post-employment activities will be anywhere near as noble.

He’s been at it for 80+ days at this point and there are some great stories in there – keep up the good work Reed :)   You can find it at:

YearOfGiving.org

Technorati Tags: , , , ,

 

Well, it’s the end of an era – Facebook, Twitter and Flickr have completely sated my need to publish things to the web.  I may come back and resurrect the blog at some point, or I may try something completely different but it seems certain given my infrequent updates that the blog will be neglected for the foreseeable future, unless something changes drastically.

Speaking of which, my Aol. days are now drawing to a close.  I have chosen to accept the voluntary package and move on from what is my first real job.  I started at AOL when I was 19 years old and it’s with a mixture of sadness, fear and excitement that I leave that company over 11 years later having made great friends in several countries and learned an enormous amount.  Linked In can point you in the right direction regarding my qualification sif you are looking for someone with extensive experience in everything from dial up connectivity to web operations and Linux system administration.

Oh, and in reference to the post below, I caved and bought the iPhone.  However O2 left such a nasty taste in my mouth that I will likely switch providers as soon as I can out of principle, so I didn’t cave really, right?

:)

 

As this comparison shows, although the cost of an iPhone is reasonably subsidised, the data plan and associated call plans are very poor.  It really is a disgrace – enough to make me not use O2 at all in protest.  With that decision made, my only problem is the complete lack of a decent alternative – I have been reading up on several iPhone competitors (Nokia N95/96, Samsung Omnia, Blackberry Storm, LG Renoir) and none of them seem to be distinguishing themselves clearly.

I’ve also found the interface on the Nokia N95 I am currently using (thanks to a loan from John) to be very counter intuitive, which is sad since I used to think Nokia had a real edge when it came to UI design.  Two guesses what John traded his N95 for…..

There is not a single phone I have found so far with WiFi, GPS, a decent sized screen and a UI that gets a decent review.  If anyone can recommend one, then please let me know.  Assuming my Macbook Pro comes back to me in working order sometime in the near future I may have to look into getting an iPhone and jail breaking it to work on any network.

 

I had often wondered how the Ood came to be, something related to Hollywood Video perhaps?

© 2011 Adam's R&R Suffusion theme by Sayontan Sinha