Been thinking of doing something similar myself. I would lean toward installing apcupsd on the rpi and publishing the power status to mosqutto as per https://iotbytes.wordpress.com/monitor-ups-power-events-on-mqtt-client/.
About shutting down your PC - I don't see how you could run both apcupsd and APC PowerChute simulatiously, perhaps you could do this via MQTT.
Don't think I've seen that before. Or if I had, I forgot about it. Would be useful for my Windows 10 based picture frame
Nope, don't mind at all.
You can see from my flow that I haven't used the node - not sure it existed when I set up my connection. I have it set up on my "new" PC server now rather than the Pi but that is still Debian based so it is the same.
Urm, massive overkill? You can install apcupsd via APT quite happily. It is very stable and doesn't take up much resource.
Not sure how much that really gives you? An exec call to the command line works fine and doesn't need another custom node. It would be different if that node didn't need to poll the service but it does.
Again, you really don't need a custom node for this. Just issue the shutdown command using an exec node. You may need to tweak your sudo settings to allow the user running Node-RED to issue the command without a password prompt.
One of my 2 APC units died completely even though I tried replacing the battery. The other one is still fine though after a battery replacement. Contrary to popular belief, it isn't that hard to replace the battery and you can easily get replacements for a very low cost. Certainly beats spending £150 on a new one every 2 years!.
Not meant to be complete code, only to give you the steer you need. There are all sorts of ways to handle the things that are text - convert "ONLINE"/"OFFLINE" to 1/0 for example which is more useful in InfluxDB. You don't need "date" and starttime you may want to convert to an elapsed number of hours maybe.
You will need to work through all of the entries, get rid of the ones you don't want and reformat others as you need to.