Wow, thanks folk - lots of bits to try and get my head around
A test flow (sorry should have included it) is:
[{"id":"a3c75a60826c7302","type":"tab","label":"Testing","disabled":false,"info":"","env":[]},{"id":"1a871f9f3426c836","type":"ping","z":"a3c75a60826c7302","protocol":"Automatic","mode":"triggered","name":"","host":"","timer":"20","inputs":1,"x":570,"y":320,"wires":[["f718fbc578ac622b"]]},{"id":"74925663b4591d50","type":"debug","z":"a3c75a60826c7302","name":"Raw Payload","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":440,"wires":[]},{"id":"12131cadced372e8","type":"inject","z":"a3c75a60826c7302","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":320,"wires":[["af20663a3ba2595d"]]},{"id":"af20663a3ba2595d","type":"function","z":"a3c75a60826c7302","name":"function 1","func":"msg.payload = [\n {\n \"host\": \"google.com\",\n \"name\": \"external test point\",\n \"timeout\": 10000,\n },\n {\n \"host\": \"testsitetofail.com\",\n \"name\": \"external fail point\",\n \"timeout\": 10000,\n }\n]\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":320,"wires":[["1a871f9f3426c836"]]},{"id":"f718fbc578ac622b","type":"join","z":"a3c75a60826c7302","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":730,"y":320,"wires":[["74925663b4591d50","7ce0692d711772d4"]]},{"id":"7ce0692d711772d4","type":"json","z":"a3c75a60826c7302","name":"","property":"payload","action":"str","pretty":false,"x":910,"y":320,"wires":[["9329ce50b06d5bd4"]]},{"id":"40d03418faeccfc1","type":"debug","z":"a3c75a60826c7302","name":"Failed","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1250,"y":300,"wires":[]},{"id":"9329ce50b06d5bd4","type":"switch","z":"a3c75a60826c7302","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":":false","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":1070,"y":320,"wires":[["40d03418faeccfc1"],["35593195f92cb82a"]]},{"id":"35593195f92cb82a","type":"debug","z":"a3c75a60826c7302","name":"All OK","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1250,"y":340,"wires":[]}]