Pass several objects in one step to "Advanced Ping"


I am using the "advanced ping" node to check if my network hardware is still up and running.
this node requires a value to ping to.
I would like to send him a list of value so that I do not have to handle them one by one.

Is there a possibility to return more than one object in a single step ?

Thats what I tried, but it does not work:

var x = {};
var y = []; = '';
y[0] = x; = '';
y[1] = x; = '';
y[2] = x;

    return x;

Using the core node-red-node-ping you can ping 1 or multiple nodes...

from the built in help...


In Triggered mode, you must connect an input wire and pass a msg in to trigger the ping operation.

If Target is populated, this will be used as the host/ip. The Target must be is a CSV list of hosts / IPs e.g. "" or ","

If Target is left empty, you can pass a CSV string or an array of hosts in msg.payload .

  • string - a CSV list of hosts / IPs e.g. "" or ","
  • array - an array of hosts as strings or objects. Note : The object must contain at minimum .host . Optionally, you can add a timeout property between 1000 & 30000 (default is 5000 / 5 seconds). Additionally, you can add whatever other properties you wish to this object and when the ping result is returned, it will be passed to the next node in for use downstream


[{"id":"76aa3560b32c2762","type":"ping","z":"1683bd9a.5e0a02","protocol":"Automatic","mode":"triggered","name":"","host":"","timer":"20","inputs":1,"x":1870,"y":1320,"wires":[["5cf32978c7d096fb"]]},{"id":"326dc067f7428bb2","type":"inject","z":"1683bd9a.5e0a02","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[\"\",{\"host\":\"\",\"name\":\"The router\"},{\"host\":\"\",\"name\":\"external API\",\"timeout\":20000,\"support\":\"\"}]","payloadType":"json","x":1870,"y":1260,"wires":[["76aa3560b32c2762"]]},{"id":"5cf32978c7d096fb","type":"debug","z":"1683bd9a.5e0a02","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1870,"y":1380,"wires":[]}]
1 Like

Or you could do something like this:

let y = [{ host: "" }, { host: "" }, { host: "" }];

y.forEach(function (element) {
1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.