I am using a network monitoring tool called SolarWinds Orion NPM, in which you can create reports using SQL. The report output and associated SQL I have written so far is attached.
What I need to do now is calculate the TOTAL time that the node has been down for (e.g. over the past month/week), based on the up/down time stamps in the database. If anybody thinks they may be able to help please get in touch and I can provide more info if needed.