Hi Jem,
why not use the Livestatus API to get the data you need?
See Retrieving status data via Livestatus