Icinga2 graph data retention

Out with Nagios, in with icinga2

Note: I’ve updated this post since I originally posted it.  See my post about xFilesFactor here which describes why I updated it.

I’ve been on a bit of a journey over the last few months migrating from nagios to icinga2 for my systems, some customer stuff and the platforms at my day job after living through the love-hate that is nagios on and off for quite a few years now.

Out with nagios, in with icinga2
Icinga2 is so much nicer than nagios once set up.

On top of the base icinga2 / icingaweb2 install I added the graphite graphing module which essentially worked out of the box give or take a couple of typos on my part .  You can find all the information you need for that part of the journey on the github page for the module.

The graphite module in the context of icinga2 has three moving parts:

  • Carbon-cache, which receives the information from icinga2 and writes it out to disk as efficiently as possible
  • Whisper which is the database format used to store the metrics which can be thought of as a more modern and efficient version of the venerable RRD which all sysadmins since Noah’s time probably have some sort of emotional response to.
  • Graphite which renders the metrics into pretty graphs into PNG format graphs.

The problem, only a day of data

A few days back I discovered that despite a my fairly uneventful installation of the graphite module on my part the graphs, despite being very pretty were only keeping a day worth of data.

Continue reading

Testing 123, SOTA on the lawn.

Sota pole on the lawn

SOTA pole on the lawn

Technically not really SOTA, because that would require a summit, but testing an Antenna I built for the purpose at least 18 months ago.

SOTA, Summits on the air is a slightly crazy pursuit within the larger sphere of amateur radio involving lugging radio gear, including batteries and antennas, up a mountain or random hillock to try and talk to other similarly afflicted amateur radio tragics around the country and around the world.

I made this antenna so long ago now I couldn’t rightly remember if it worked so before I venture out into the wild blue yonder over summer to try and scale the heights with a backpack of assorted technology I thought I should check it was working.

So there I am, lying on the lawn with the trusty FT857 and a LiPO battery from one of my model aircraft plugged into the back.

The dog is wondering what on earth I’m doing as he’s normally the one lying on the lawn on a sunny Saturday afternoon and he’s certainly not sure about the wire and string creation I’ve pegged up near the trampoline.

Packed antenna.

Rolled up linked dipole with hand mic for scale.

A quick test with the analyzer puts the resonant point on 40m at a shade under 7.100 Mhz and 14.150 Mhz for 20m which are the key bands for SOTA here in ZL-Land although there’s taps for 15 and 10m as well.

Those upper bands are a little tricky at the current low-point of the solar cycle so not a priority and I was meant to be mowing the lawn, not lying down on it so I plugged in the rig and spun the dial.

There was a contest on somewhere well north of us as R0ML and a couple of other Russians were calling CQ in consummate contesting fashion although whispering with 25W into a low dipole was probably a bit of a stretch from my end although I did shout breathlessly at the microphone for a few minutes.

Then along comes Steve, ZL1PWR calling CQ on 14.215.  At about 1,100km north up in the land of the Auck somewhere it was enough proof for me that the antenna is good and there’s always something a bit pixie-dust about portable HF operation even if it’s just on the front lawn.

After a bit of a rag chew I packed up and mowed the lawn leaving the dog content that order was restored in the shade under the trampoline.

On-board glow driver in 21st Century

Ever since a near miss with a glow starter getting caught in a prop back in the nineties I’ve used on-board glow drivers in any model big enough to carry an extra ‘C’ cell around.

As well as the safety aspect, not having to play with a glow starter around spinning props, most glow motors idle more reliably with the glow plug lit. This is even more so with four strokes due to the time between induction strokes being longer than with a two stroke.

The incoming methanol has a catalytic reaction with the platinum on the glow plug coil which causes the coil to get hot, which ignites the mixture. The longer time between charges of methanol, oil and air entering the cylinder mean the plug can cool between compression strokes and the idle gets a bit rough around the edges.

The benefit of on-board glow is greater if the motor is inverted where oil and combustion by-products can collect around the plug making the idle worse and the transition to high speed lumpy as the gunk burns out from around the plug.

Inverted four stroke

Inverted four stroke, screaming out for on-board glow driver.

A few weeks back I was lucky to add a beautiful quarter scale fly baby to my collection.

There is an unwritten law that large, slow flying, classically shaped models have to have a four stroke Engine.  You can’t fight it, they are just not right with a screaming two stroke or the sterile urgency of brushless electric.

I bought a shiny new 1.2 ASP noise maker to fasten to the engine mount which of course needs an on-board driver. No problem; In a past life I ran a business that made 1,000’s of glow drivers so I was sure I’d have another one lying around somewhere.

Ohmark Glow driver, Circa 1997 with switch and pot poking through the heatshrink.

After turning my workshop and garage upside down it appears the last functional one I had was destroyed in the violent arrival to terra-firma of my 1/5th scale cub. This allowed the model to fit in a much smaller space than it did before the start of the flight.

Back to the drawing board.

So, 20-ish years after I designed the first Ohmark on-board glow switch I went back to the drawing board.

Primarily because I didn’t want to wait for postage but also because I’m an electronics nerd and it would erk me to have to buy something simple that I can make.

In the original design I used a small dip switch and pot to set the point and direction of the throttle at which the glow would come on but that is so last century.

These days transmitters are capable of collating the census results for a small nation, never mind controlling a glow switch. Along with the transmitter improvements, eight plus channel receivers are now cheaper than a good servo rather costing more than the air-frames we put them in.

This means the magic can be handled from the comfort of the transmitter and the switch itself can be simpler.

Into the bits box I delved and came out about an hour or so later with a functional prototype using a small 8-pin micro, a few discrete components and MOSFET rated to switch 55 volts at 29 amps which is far more than the 1.5 volts and around three amps which is the maximum you’d expect from a cold glow plug.

Vero board glow driver

New glow driver prototype on Veroboard

For a battery I found a tagged 3.3AH NiMh from Jaycar which was a refugee from another project and although the finished unit is a bit bulky because it’s built on strip board it’s only 50x10mm or so and weighs maybe two grams. If I need another one I’ll get some PCB’s done for them and surface mount it.

The previous owner had already fitted a remote glow lead so all I had to was put the arming switch and status LED through the cockpit floor, wrap things in foam and cable tie them into the model. Job Done.

On the transmitter side I used one of the three position switches of my Taranis 9XD to control the glow driver. The three positions are effectively engine off, engine run and engine with glow. Some would refer to the later as ‘engine start’ but in reality I fly with the glow always enabled and it turns on / off at a low throttle position.

In my experience a good quality NiMH C cell will give you a solid hour of flying with 5-6 starts and you could extend that by going to the ‘run’ position if you had an extended idle / taxi period.

Programming for the Taranis

The programming for this is to set up the throttle throw without trim you have the idle you want and the switch position at ‘Cut’ applies an override value to the the throttle servo which completely closes the throttle no matter where the stick is.

Glow driver mounted

Mounted in the model wrapped in foam. ‘C’ cell is behind the servo plate.

In the middle ‘Run’ position the switch does nothing at all allowing the the throttle to move through it’s full normal range.

The glow driver is plugged into Channel 6, which is set to ‘MAX’ and has a weight of -100% which means that is is held in the ‘off’ position unless something specifically overrides it.

The glow-on position is slightly more fiddly if you’re not familiar with the Taranis style of programming. It uses a logical Switch that is ‘on’ when the throttle is below 25% and a special function maps that logical switch to override Channel 6 to +100% which is where I’ve plugged in the glow driver.

For the sake of convenience I also linked an ‘Engine Off’ voice prompt to the off position and a beep for when the glow comes on so if you’re standing out at the flight line and my transmitter is beeping occasionally it’s because the glow has come on, not because my lunch is cooked.

Taranis settings

Now that I’ve typed that and read it back I’m not even sure it makes sense, so some photos of the programming on the radio are included and if you’re curious catch up with me at the field and I can explain it in gratuitous detail.

Build it yourself

For those interested in the gory details I used an AT-Tiny85-20P micro and IRFZ44N fet with a 3V9 Zener regulator so it can run on higher than 4cell NiMH/NiCD.

Glow driver shematic

Schematic, click for larger view.

Here’s the schematic for those really curious, the funky mosfet is the default library file in kicad on Ubuntu Linux, don’t blame me.  🙂 

The source code is not a good example of coding by any standard, but can be found on github at this address: https://github.com/kiwichrish/on-board-Glow under the MIT license.

Arduino Nano library files for kicad

Recently I wanted to get some circuit boards made up as a carrier for the Arduino Nano and I couldn’t find a decent library file and module for kicad, my EDA weapon of choice.

I suspect maybe it was just my google-foo letting me down, but there were some truly useless library files out there on the interwebs for the Nano, whereas there were some great libraries including 3D models for some of the other models of the Arduino.  Go figure.

You can find the files on github: 

Pop a comment down below if you find them useful, I create a lot of custom library files for Kicad but most of them are pretty specific to what I need and never see the light of day.  I thought these ones were a bit more applicable for others to find useful.

Arduino Nano for Kicad

PCB module view

Arduino nano for Kicad

Schematic View

The Kiwi DX un-group

Kiwi DX groupThe Kiwi DX group was, and now even more so is, an un-group.

In the same way that some IT cliques have un-cons instead of conferences.

The premise is that you have more of the social and less of the conference with a strong focus on community and learning.

The Kiwi DX group was for the most part just a mailing list run by a few different folks over the years. When I first became a ham it was run by Bill, ZL3NB who is one of the nicest guys you’ll ever meet.

The Kiwi DX mailing list bounced it’s last email some time in 2016 and although another mailing list is giving ZL DXers somewhere to blow off steam, it’s just not the same.

I miss the un-group-ness of the old list and the eclectic mix of folks who posted regularly even though the occasional flame war threatened to undo the very fabric of time itself.

While the group was essentially a random mob of hams rather than an organised club the mailing list did spawn some great collaborative efforts. The special even station ZM90DX that ran for a full year and crowd funding donations for some DXpeditions in the few short years I was an un-member come to mind.

This is obviously a bit of reminiscing on my part. I found some old emails that jogged my memory but that’s not my only intention, it’s also a bit of a sneaky shot at preserving a tiny little bit of amateur radio history.

The Kiwi DX group, being the un-group it is, has never had a website of it’s own. That hasn’t stopped a fair number of ZL Dxers using links to Lee, ZL2AL’s website that hosts the one ‘official’ mention of the group which is here: http://www.zl2al.com/kiw-dx-group/

Lee was another most excellent gentleman who sadly became Silent Key mid 2015. Lee created the KiwiDX logo at the top of this post and adorns quite a few ZL QSL cards.

Lee’s son is keeping the lights on over at http://www.zl2al.com but just in case it does fall into the cracks I’ve taken a copy of the little sliver of DX history and included the page contents below which is the sum total of the Kiwi DX Group web presence.

“The Kiwi DX Group is a group of avid DXers that formed in the late 1990s. The logo originated from the magazine NZDXR edited by ZL2AL. Although the magazine ceased publication after nearly 5 years, the bond was formed and Kiwi DXers became a formidable group in the pileups. ZLs are quick to support DXpeditions and a recent “pass the hat” exercise saw the ZLs raise a considerable amount of money to become a sponsor and support the upcoming FT5ZM Amsterdam Island DXpedition 2014”

In the spirit of the Kiwi DX un-group I’d encourage any ZL ham who’s fond of a bit of late night DX to use the Kiwi DX logo created by Lee on their QSL card or drop it on their qrz.com page.

We’ll see if we can have have the Kiwi DX group survive another 20 years even without the mailing list.

73, Chris

17,000km on a rubber ducky

I was out walking the dog, as you do, with my trusty Yaesu VX6 in hand this evening.

I tried to raise some locals for a chin-wag on a couple of repeaters and got the silent treatment so went for plan ‘B’ and started scanning some local services channels.

17,748 km or so Google says

After listening for a wee while to some linesmen dealing with a power pole fire (not related to the big CHCH fires recently) I got bored and thought I’d go a bit lower down the spectrum.

Basically I started listening a bit below 500 khz and scanned upwards from there.

The squelch broke for the the local broadcast AM stuff you’d expect, along with some big noise sources in the 80m band and a local ham rag chewing on 40m who sounded like a duck as the HT only does AM/FM not side band.

Then well into the short-wave broadcast chunk proper I listened to a bit of the 8pm news on Radio New Zealand shortwave service that was thumping in as I plodded along behind the K9/p.


Short wave listening with a Rubber Ducky?

After the news I kept on scanning upwards and wound up listening to a movie review of the new Lego Batman movie where the scan stopped on 11.780Mhz.

I assumed it was ABC, the Australian Shortwave service or something else relatively close to home.

Listened for a bit longer to the entertainment news about Angelina Jolie making a movie with her kids you could have knocked me down with a feather when the announcer said it was China Radio International English service!

A good solid S4 – S5 signal into the standard rubber ducky antenna designed for 432/144Mhz.

I didn’t even hold the radio above waist height most of the time, I was just wandering along with it in my hand.

Checking when I got home I found that the transmitter was centred on 11.785 Mhz based in Cerrik, Albania!! That’s almost anti-podal at around 17,000km.

Once again, there might be quite a bit of science in this radio thing but every now and then there’s a wee dusting of magic as well.


156bpm max? Hmm.

For the record the dog and I did 6.55 km in a bit over an hour and a quarter. 8,606 steps apparently. I do wonder how many steps the dog took? Quite a few more I’m guessing!

Propagation predictions and reality

Once again a contest proves that propagation prediction tools are naff. 🙂

I decided to spin the dial on 17m this evening before sneaking to bed and spoke to Eric, SM1ALH in Sweden for a few minutes but it was pretty rough, although 17m this late at night is always a bit of a crap shoot.

Conditions have been poor the last wee while due to a solar storm, with good visible aurora from my QTH but I decided to pop down to 20m to see if anyone was awake down there.

Low and behold the Scandinavian Activity contest has magically opened the band and I can hear a whole bunch of Europeans, JA’s and some VK’s plugging away in standard contest style.

Contest Log

Scandinavian Activity contest log

I promptly shoved a bit more coal in the direction of the afterburner and gave out some multiplier points to some folks up the other end of the planet before I got my beauty sleep.

In the mean time the propagation prediction tool in my logging software is saying “don’t bother” and the published solar numbers suggest getting shares in skype rather than HF gear.

So, once again, all together…

Turn on the radio and listen for a while, the bands are always open somewhere!

73, Chris

Etomite on php 5.6

This post is on the geeky end of the scale a bit, but might be handy for someone out there in the interwebs.

Back in the mid 00’s I was a big fan of a CMS called Etomite that begat MODX which I still use for some projects. You can read about the death of Etomite and the rise of MODX on wikipedia.

Anyway, I used etomite for an earlier blog site at www.ohmark.co.nz which is the name of an electronics development company I ran from about 1996 till 2004, ish.

When I sold the rights to the then-current products and designs the new owner wasn’t crazy enough to take on the meaningless company name and oddly spent domain so I kept it for my blog.

That blog was used to record progress on a couple of microcontroller projects I was working on at the time and got enough traffic that it was worthwhile putting google ads on the site.

As I was earning one or two cents a week in advertising revenue from the site I kept it online until May last year when I rolled my web servers over to Debian 8 which included PHP 5.6.x.

Unfortunately PHP 5.6 was a bridge to far for Etomite and my efforts were rewarded with a dreaded deprecation error which are quite often journey to no-where to unravel.


Deprecated mysql library error in Etomite

I was already running the last version of Etomite released, Version 1.1, and as it was the only site out of a few dozen on that box that did not survive the operating system upgrade I went for the cop-out option and put up a cop-out home page and forgot about it.


Cop-out offline message that lasted over a year.

Skip forward to this weekend and I decided to re-visit it as I’m back on the blogging kick again and I still get the odd email about broken links to one of the projects on the site for a CNC stepper motor controller design I posted to some forums.

Long story short, here’s how I fixed up my Etomite install so you can get your crusty old Etomite site working again as well and revel in the y2k feeling of the admin interface.

To silence the error handling, add a new line at the top of index.php:

error_reporting(E_ALL ^ E_DEPRECATED);

Then pop down to the executeParser() function and line 605 or there about’s and comment out the handler and reporting calls.

  function executeParser() {

You should also comment out any other calls to error_reporting in index.php.  I had four of them but I think they were from my original half-hearted attempt to fix the deprecation error in 2015 but they may have been original.

Lastly put an ‘@’ in front of the deprecated mysql_connect statement on line 1323 or just after given you’ve added a new line at the top.


    if(@!$this->rs = mysql_connect($this->dbConfig['host'], $this->dbConfig['user'], $this->dbConfig['pass'])) {

to be:

    if(@!$this->rs = @mysql_connect($this->dbConfig['host'], $this->dbConfig['user'], $this->dbConfig['pass'])) {

And your Etomite will rise from the ashes, sorta, ish.

Now that you’ve got Etomite running again, shift the website to something else before you go much further.  There are some common open-source components in Etomite that have had long published exploits which could bite you in the proverbial bum if you leave it online.

At the very least make the entire site read-only to protect against the TinyMCE injection issues which surfaced after Etomite last received an update.  I’ve made mine read-only and have an IDS monitoring for file system changes but it is not what I’d call a ‘trusted’ site on the server and I’ll probably chroot it as well.

There was an attempt for a couple of years to get Etomite moving forwards called etofork on github but it seems to have died and if you want a similar CMS toolset MODX is the way to go now, or if your site was a blog you could go where everyone else seems to have and use WordPress.

For my part I’ll probably move the content to this site, as maintaining two blogs is kinda silly, but given my on-again, off-again blogging style that might have to wait another year or so. 🙂

Icom IC706MKIIg self-oscillation problems

The Icom IC-706 in all it’s versions is one of the best know amateur transceivers of the last 20 years. Originally released in 1995 with the last in the line being the IC-706MKIIg which last rolled off the production line in 2009.

I managed to pick up a MKIIg a while ago in excellent condition which appeared to be fully functional as Icom intended it apart from problems with the microphone I posted a short note about a while ago.

After I fixed the microphone issue I made a few good DX contacts on 20 and 12m. I was getting a good impression of the shack-in-a-box and was looking forward to taking it out for portable VHF contesting which is what I bought it for.

Unfortunately it wasn’t 100% as intended though as a fault which was addressed in a service bulletin from Icom back in 2002 appeared. Long story short the final amplifier goes into self oscillation when transmitting in any mode on 15 or 17m.

The rig transmits correctly into a dummy load or perfectly matched antenna but if the wind is slightly up hill the visible effect is that SWR pops up to infinity because the final amplifier is generating a carrier somewhere out of band.

A quick google revealed the Service bulletin along with a bunch of forum posts about successes and failures in fixing the issue.

The recommend repair from Icom involves improving the earthing of the PLL and filter boards.

The factory earthing is some wee spring contacts that touch the aluminium chassis in various places and the screw-down points for each of the circuit boards. These springs slacken with time I imagine and some received a new spring ‘MP6’ on the filter board as part of the service bulletin.

My example had the ‘new’ spring on the filter board but another one on the rear side of the PCB was visibly not making a good contact at all. On the filter board I replaced both the ‘new’ contact (MP6) and the obviously faulty one (MP4) with solid copper wire links to chassis. With the filter board out I also re-tinned all of the mount points and cleaned the surface of the ‘posts’ they screwed down to.

On the PLL board one of the spring clips came away from the board due to a dry joint when I tried to re-tension it but otherwise the contacts appeared to be sound and I stuck the whole thing back together with great expectations.

Unfortunately my great expectation turned to greater disappointment as I could still not transmit on 15 or 17m into my Hexbeam which is by all accounts a good match on both of those bands. Oddly enough I could now key up if the lid was off the case so I had at least changed the fault, but not fixed it at all.

Clearly there is something critical in the RF deck that does not like stray RF back into the first IF / mixer section of the rig on those bands.

About now we’ll go for the ‘long story short’ option. I took the rig apart a few more times, added more earthing and generally tried random things and did actually manage to have one QSO on 15m with a JA station with the lid off but a fix based around the service bulletin was not even in the ballpark for my example.

That matches up with some very frustrated forum posts I found which starting to cause me some concern as I only really bought the rig to prove or disprove it’s performance on 2m SSB during a contest and selling the rig on fairly quickly was part of my grand plan for not filling my small shack with rigs I don’t use very often if it wasn’t up to the job on VHF.

Somewhere along the way I’d emailed a local ham who does some repair work asking about the problem and we’d had a bit of a conversation about the problem during which he suggested a ferrite choke between the mixer/modulator board and the filter to stop the feedback in it’s tracks.

I’d run out of things I could earth and it’s one of those suggestions that makes so much sense you wonder why you didn’t think of it yourself. Many thanks to Tony, ZL3HAM for pointing me in the right direction as without him I’d be pondering what to do with an all-band rig that didn’t work on two very useful HF bands.

I validated the idea by un-plugging the coax between the filter and mixer board and transmitting on 15 and 17 into the hexbeam at full power and it worked fine. Listening on another rig the modulation sounded fine and aside from the rig being effectively stone deaf it worked.

That started a hunt through my junk boxes and misc cables for a suitable donor ferrite that I could get one turn of the annoyingly rigid internal coax through and still get the lid closed. The one that finally presented itself came from the power lead on an LDG tuner that could quite happily survive with a much larger one and I set about threading the coax through the proverbial needle.

The thin grey coax they use in rigs between boards is interesting in that it is quite rigid for it’s size and has crimped connectors I’d have no show of replacing if I chopped it off so I had to gingerly trim the ‘wings’ of the crimp to fit through the hole in the middle of my little metal oxide donut.

Once through the first time getting one turn on the thing and still reach the connector on the board while allowing the lid to shut was a long painful process which would not have been much harder if I tried to do it wearing leather welding gloves.

The effort paid off though and I can now key up on 15 and 17m into truly lousy antennas and the rig folds back the power as it should but remains steadfastly on the set VFO frequency.

Hopefully someone else will find this article useful when they find their rig doesn’t respond to the ICOM prescribed fix. I understand in a lot of cases the earthing fix does work and that should be your first port of call. It was the combination of earthing and the ferrite that fixed mine.

Some relevant links:

The original Service Bulletin Courtesy of W1MJ:
W1JM’s comments on the issue:
AD5X’s comments on the same issue:

Footnote: I actually wrote this article in 2014, but never got around to posting it to my blog. The rig did good service for a year or so before I sold it on as I had too many in the shack.