{ Category Archives }
general
Nagios on OSX 10.6 Server
At work one the main tools we use for systems monitoring is Nagios, although OS X has its own systems monitoring tools via Server Administrator, SNMP and the LOM card monitor; these are all separate systems from Nagios and I like monitoring to come consistently from one place, that isn’t to say that I don’t like what Apple has provided but integrated with what we have elsewhere is better.
Usually installing Nagios on a Unix based system is straight forward, but on OS X there are some gotchas. Having been through other people’s guides that are on the net and found some incomplete in one way or another mainly due to subtle changes between major releases of OS X, I finally have working installation notes that I am happy with and know that work with 10.6 Server (well mine at least).
First though create a nagios user and group and set the group so that it is the primary group for the user. Note that you must use the Workgroup Manager to do this as the User tool via System Preferences is to be honest a bit rubbish. Don’t forget to set the user account so it cannot login, has no shell set etc.
Compile and Install the Nagios Plugins
tar xvf nagios-plugins-1.4.15.tar.gz
cd nagios-plugins-1.4.15
./configure
make
sudo make install
Update the permissions on the directories
sudo chown nagios:nagios /usr/local/nagios
sudo chown -R nagios:nagios /usr/local/nagios/libexec
Compile and Install the NRPE daemon
tar xvf nrpe-2.12.tar.gz
cd nrpe-2.12
You must fix up the SSL libraries line in the configure file as follows:
if test -f “$dir/libssl.so”; then
becomes:
if test -f “$dir/libssl.dylib”; then
With version 2.12 of the NRPE daemon this is on line 6673 of the configure file – naturally this may change, if I remember I will submit a patch for this.
./configure
make all
sudo make install-plugin
sudo make install-daemon
sudo make install-daemon-config
To test the NRPE daemon, you can run:
/usr/local/nagios/bin/nrpe -c path/to/config -d
Don’t forget to update the nrpe.conf file – particularly since the partition designations are set to Linux defaults and so will generate invalid information for OS X. You should now be able to configure your Nagios server to query NRPE on the OS X host appropriately. An extract from my nrpe.conf is as follows:
command[check_volosx]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p / command[check_voldata]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /Volumes/DATA
In order to get NRPE to autostart a LaunchD configuration script is needed.
Create a symbolic link to the NRPE config file from the default location to the root of the NRPE directory, this seemed odd to me, but it is tied in to the working directory settings and it does work.
ln -s /usr/local/nagios/etc/nrpe.cfg /usr/local/nagios/nrpe.cfg
Then write the following block of XML out to: /Library/LaunchDaemons/org.nagios.nrpe.plist
<code>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>NetworkState</key>
<true/>
</dict>
<key>UserName</key>
<string>nagios</string>
<key>GroupName</key>
<string>nagios</string>
<key>Program</key>
<string>/usr/local/nagios/bin/nrpe</string>
<key>WorkingDirectory</key>
<string>/usr/local/nagios/</string>
<key>ProgramArguments</key>
<array>
<string>-c</string>
<string>/usr/local/nagios/etc/nrpe.cfg</string>
<string>-i</string>
</array>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<key>SockServiceName</key>
<string>5666</string>
<key>SockType</key>
<string>stream</string>
<key>SockFamily</key>
<string>IPv4</string>
</dict>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<false/>
</dict>
<key>Label</key>
<string>nrpe</string>
</dict>
</plist>
</code>
Finally register this script with LaunchD and start the daemon off:
launchctl load /Library/LaunchDaemons/org.nagios.nrpe.plist
You should now have a working NRPE and Nagios plugins on OS X.
A tribute to Stuart
I was asked to give a tribute to Stuart for his Thanksgiving service at the weekend, for those unable to attend a copy of the text follows:
“Hello Osbornes” was how Stuart always seemed to greet me, or Sam or both of us. I don’t actually ever recall being called Paul by Stuart and I know that he had variations of names for others of us here. A greeting was where possible followed by one of his enveloping hugs that were amazingly reassuring and loving. You knew with Stuart that he was genuinely pleased to see you and spend time with you.
I don’t actually recall meeting Stuart, which I admit seems ridiculous, lets face it he wasn’t known for merging into a group of people and being inconspicuous. His height, laughter and larger than life personality made sure of that. Yet at the same time I feel as if I have known Stuart all of my life and I know that the earliest we could have met is 1998 as our social circles never previously crossed.
One of my earliest memories of Stuart is of an amateur entertainment night here at St Mary Bredin, Stuart had declared that he was going to sing, and not just sing anything. Oh no, Stuart was going to sing a duet from Les Miserables – on his own. Sadly to be honest, in his view he fluffed it, I don’t recall exactly what part of the performance was not up to his high standards but what I do recall was a distraught, almost inconsolable Stuart needing a hug, some kindness and a mug of tea. At that point I realized quite how hurt he was by not achieving his dreams of being on the stage professionally.
Stuart both hated and loved teaching, growing in himself from being in his view a failed professional reduced to teaching, to being a teacher who could share his passion and enthusiasm for literature, drama and musicals with willing eager minds. Over the years it has been a joy watching Stuart’s dreams and passion for the stage rekindled through his teaching the students at the schools he has taught in.
The pleasure that he derived from taking the students up to London to see a play was wonderful to see on the occasion I had the pleasure to join him. When it came to directing shows at one of his schools, the sheer hard work he put in and joy he took out of seeing his students realize a musical or play was really something else. I really wish that a teacher like Stuart had taught me.
More recently though Stuart has taken part in and thoroughly enjoyed local amateur dramatics events such as Tosca and Titanic and shown his friends what he is capable of when given the chance.
I think many of us have stories about being somewhere in Canterbury with Stuart declaring that various buildings would make perfect theatres, the old Café Uno being one example, the framing workshop next to the Dolphin being another. One day when he was rich he was going to buy one of these places and turn it into a theatre, so that small intimate shows could take place, which the Marlowe was completely unsuitable for. I can no longer look at any of these places without thinking of Stuart.
Stuart’s taste in Musicals was I think could best be described by those who have suffered it as variable, I am not sure that The Phantom of the Paradise will ever be seen at the West End but he loved it. The same could be said for some of his music collection, has anyone here heard: John Adams well known album: Naïve and Sentimental Music by any chance? Those are just glimpses of some the things that Stuart has shared enthusiastically with his friends who may not have been as appreciative of the subtleties as him.
As friends we could always grumble with each other about whatever was driving us mad at that particular time, Stuart though seemed to revel in grumbling and moaning, give him a mug of tea and a slice of cake and he would grumble happily for hours. Favourite topics for a while revolved around his students handing in their homework in German Gothic script and not putting their names on, except Stuart knew who had written what and always had positive things to say about them no matter how good or bad their work or how sensitively they appreciated the book or poem in hand. Stuarts housemates for a time were another source of frustration this though as Stuart knew was down to relational growing pains as they learnt to live with each other, so in the same breath as announcing that they didn’t understand him and that buying the house was a mad thing to do; he would declare that the house was brilliant and that he loved them all to bits and you knew full well that he did love them. I really hope that he grumbled about me.
A passion of Stuart’s was food, he loved creating food, he loved watching friends eating his creations whilst he sneaked quick looks out of the corner of his eye just to make sure that everything was as he hoped. He culinary creations include ginger biscuit and marmalade ice cream and quite possibly the biggest lasagna in world. He loved having people round for food, be it just randomly showing up for tea and cake or a full on three-course meal for his birthday on Christmas Eve. But no matter how much food Stuart cooked, be it scrambled eggs for one or a meal for twenty he always managed to use just about every pot, pan, colander or stirring implement in the kitchen.
On one occasion on a trip to New Wine, which involved camping he informed a friend that he would treat them to a full on cooked breakfast cooked on a single ring gas camping stove, so the friend looking forward to eggs, bacon, sausages and beans agreed to do coffee and toast and had high expectations of Stuart’s legendary culinary skills. Stuart was then seen pouring an all day breakfast in a can into a saucepan and then onto toast and then sharing it out. The following day the friend decided that it was their turn to do breakfast for Stuart and so went to the local farm shop which resulted in a large round of bacon sandwiches. Stuart though was a man who loved food. In his larder still are a couple of Pot Noodles, I gather that his housemates are fighting over them.
The Church particularly here at St Mary Bredin’s was another passion of Stuart’s, he was a member of the PCC and always wanted to do more than he was able. For many of his friends though there was nothing quite like being crept up on during the first worship song on a Sunday morning to have Stuarts wonderful oh so wonderful voice booming out from beside you singing in harmony. This usually was followed by him talking through the sermon if he found it particularly dull, I had to tell him off on one occasion – not for talking through the sermon but for keeping me awake.
Stuart like several of us here was a fan of Doctor Who, unlike most people here he comes in the same class of anorak as I do. It has been a pleasure over recent years to delight in the new stories, criticize some of the terrible scripting and declare that it’s just a kids program really. Over the years we have spent many happy hours watching old episodes, bickering about and trying to out do each other with knowledge that is really completely unimportant. You know when someone is your friend when they phone up at 9:30 of an evening asking to come round and watch Dr Who, you then spend an hour arguing over what story to watch as Stuart’s views were somewhat polarized: NO NO not Pertwee, NO Black and White it’s rubbish, Colin was silly, actually what episodes of Tom’s haven’t we watched in a while… you get the idea. Then once the DVD actually goes on with another gripping story, you then find you both wake up completely unashamedly as the final credits are rolling, promptly declare that was thoroughly enjoyable and put the extras on, only to wake up on one occasion in each others arms on the sofa and not be in the slightest embarrassed.
In all of the above it always seemed that there was tea and where possible cake, given chance unsupervised he would probably go through every cup and mug in whomever’s home he was. He was always generous with getting the kettle on, once the order went above three though Stuart could be just about guaranteed to either make an extra mug of tea or be one short.
Stuart though was a dreamer, he loved dreams and if he could not fulfill his own he would delight in watching his friends fulfill theirs. He was a lover in that he loved relationships and getting to know people with a depth and authenticity out of genuine love. He was honest, sometimes painfully so and expected the same in return and that was the thing; you could be honest with Stuart because you were friends.
I could go on and on, there is so much that I and others could say and the memories recounted here are not just my own but also those of friends.
Stuart was truly my friend.
Stuart was truly our friend and we loved him.
“Not now, maybe later.”
My friend Stuart died on Saturday. Cancer. Enough said.
He was a gastronaut (of experimental cookery), a lover of music (of dubious taste), musicals (of even more dubious taste), Doctor Who (almost as big an anorak as me) and he loved to sing (with a wonderful voice). There was nothing quite like being crept up on and having him burst into song on a Sunday morning. He also loved to moan and then seconds later after he moaned about someone would promptly add that he loved them to bits, and he did; he really did. I hope that he moaned about me.
What has really hit me over the last few days is the realisation that the feeling that one is indestructible is actually myth, a dream, a ridiculous hope. I have had friends and family over the years both younger and older than myself die of illness, but this time it is different, I feel sure that it is a generational thing; with the knowledge that it is one of your own that has gone the illusion is utterly shattered.
The quote in the title was the last thing that he said to me when I went to visit him in the hospice on Wednesday of last week, the context is irrelevant – the point was that although he knew he probably hadn’t long left he was still looking forwards.
Goodbye my friend, you will be missed more than you probably ever realised. I and a good many others love you.
Now I have a stack of DVDs of dodgy British TV SciFi to watch on my own and it just will not be the same.
Board not bored
So at last the eye is pretty much not hurting all the time – huzzah and so tomorrow is back to work. In the meantime it has been just over a month away from work, personally I am a bit annoyed it has been quite this long, but then in it is hardly my fault (see previous post).
The only thing that needed some pondering was what on earth to do with myself, codeine helps as it means I am either asleep or too stoned to do much anyway, but even so I have been awake a fair amount of the time. The first week was not a problem as I really was out of things due to the anaesthetic and then onto the codeine, after that it was just onto the codeine and the last week nothing at all for pain relief.
I hate day time TV, I really cannot stand it so TV was not really an option, though I will admit watching the Olympics in the early hours of the morning (yay for Amy Williams) some days in bursts, usually when I woke up where the codeine had worn off and it was too soon to throw more down my neck.
I have read something like eight books (no I am not going list them due to brain failure) so that has brought the to be read heap down just a little bit (yes it is that big). I have watched a couple of films but have not been in the mood to watch any and I have a fair amount recorded. A few audiobooks have been dozed rather than listened to, I still find the best way to listen to audiobooks is either when I am driving or ironing (ironing has not been an option though).
I don’t really like computer games very much and tend to get easily bored by them, besides I spend enough time in front of a screen at work that generally it is one of the last things that I want to do to entertain myself at home.
So other than reading and sleeping what have I been doing? Playing boardgames on the whole. Some rummaging round the internet in the previous few months has found plenty of games designed for either solitaire or cooperative (and so you double up) play certainly more than I was aware of, in fact I was very suprised at the quantity of different games out there as they are not the sort of games that you find in your local toy store. So I have been rolling dice, shuffling cards, taking over the world as Alexander in a wargame, winning and losing as Rommel, fighting monsters from other worlds in Arkham Horror and generally taking over the dining table. SirusKittenzilla has been on hand to irritate the hell out of mehelp by knocking bits over over and generally obliterating positions carefully set up. I am still to fully play the Battle of Britain game bought by a friend as a get well present, but that is down to the board being made of thick coated paper where the fold creases make it difficult to lay flat, this isn’t a fault in the game it is just the way that wargames are to keep costs down, so until I acquire a large 34×22″ clip frame it will have to wait. But this does give me something to look forward to and it isn’t as if I haven’t had other games to entertain me.
Where I really have had enough.
I think that for the first time that I can recall, that I am not a little bit frustrated, a tad browned off or even mildly narked about my eye; instead I am utterly fucking pissed off.
There I have said it and no I am not going to apologise for the language – this is after all a snapshot of how things are at this moment.
Three weeks post op and it still hurts, paracetamol and ibuprofen can be like taking smarties but have no affect, codeine does but that is special stuff. When I had the squint surgery or the cornea transplant it didn’t hurt as much as this or for so long and I really do not understand it.
Today I had a followup appointment at the hospital.
I explained this at the hospital, even they admitted that two weeks post op I should have felt pretty much fine. The blood has now cleared and they could have a look round and see how things really are. The surgery area is inflamed, very inflamed. It appears that I have reacted badly to the stitches used (the special stitches for people who are allergic to the other stitches and get growths like granulomas). These stitches are designed to dissolve in six weeks – today they were pulled out. I won’t go into details as it was not fun and it was not pretty and did involve me coming close to passing out (yeah I am a big woosie) but looking away was hardly an option.
So now I have four different types of eye drops (antibiotics, steroids and two types of lubricants) and am not allowed to do much at all for the next few days, during which time things should settle down.
Oh and because the stitches came out early things are held together but just a little bit of the grace of God.
Knackered
Eye hurts, can’t sleep, keep taking the pain killers (solphadol with 30 mg of codeine) and had a telling off from my GP about going back to work before I was ready, particularly since she now knows what work was done – which she didn’t when I saw her last week – to be fair I didn’t know myself at the time. In any case going back to work for a bit yesterday was a good idea for me, as I did manage to demonstrate to myself that it definitely was not the best place for me to be.
So at the moment I can’t work with codeine in my system as it makes me wappy (lets say driving a car or a root prompt is not a good idea) and I can’t manage too well without it.
Sigh.
Progress
Back to the hospital today for the post operative checkup.
Fortunately things are looking pretty good considering what can be seen with the amount of blood in the way. The growth appears to have been removed but we won’t be totally sure for a couple of weeks. Before the op I was told that it would be a bit of an exploration as you can’t really see how bad the growth is until they start delving. In the end they had to detach one of the muscles from my eye, remove the growth and restitch the muscle back into place. This then explains why its so sodding painful to move my eyes at the moment. Codeine is my friend btw.
The cataract lens replacement is settling down nicely but will take a few weeks to be fully expanded and in place. The slightly differing colours from one eye to the other is down to the new lens being perfectly clear where the human lens in the other eye has a slight hue which is apparently normal and varies from one person to the next. In any case my vision is marvellous compared to before but won’t be able to get my glasses sorted out for a few weeks. Most importantly George is fine. Phew.
Progress
When I had the operation they did two procedures, the first was a cataract lens replacement due to the amount of steroid drops I have to take for the cornea and the second was to excise a granuloma that was a result of the squint surgery from a couple of years ago.
The new lens has done wonders, instead of foggy vision, I now have clear vision in my left eye and the power has been set a bit stronger than the right eye so a slight improvement. However the prescription in my glasses for that eye is now wrong and will need to be updated in a few weeks time. The bit that I have found really interesting is that I am currently perceiving that the colour balance in each eye is now slightly different. So my left eye sees things with a colder bluish tint where my right eye sees with a warmer golden tint. I suspect that a lot of this is down to my brain adjusting to having good vision in my left eye again but even so it is a bit odd.
As for the growth, well the eye is nicely bloodshot (will try and take a picture later) and as long as I don’t move my eyes at all it barely hurts. The last few words there are the key bit. In any case Wednesday morning I see my GP to hand over a load of paperwork from the hospital and Thursday afternoon I return to the hospital for the post operative checkup with the consultant, to see how things really are.

