To fix the server I've reworked the code to turn it into a more proper python package and updated the instruction to use upstart rather than monit, which I found to be too complex for its own good.
Interestingly, it looks like the nodes that needed a new battery starting reading bad temperature data before they stopped transmitting. I'd have expected transmission to be the first thing to go, given how much power it requires.