How to check network switch or computers alive with PING

I would get alive signal with PING from net device. I was use ping-notification and saw response time on debug monitor.

How i convert response time to BOOLEAN value FALSE or TRUE for "Communication Is Ok"

[{"id":"b86d0cad.8e96a","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"3cbd49f6.ebdd26","type":"debug","z":"b86d0cad.8e96a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1038,"y":346,"wires":[]},{"id":"f4763647.dd5de8","type":"comment","z":"b86d0cad.8e96a","name":"send a notification e.g. to pushover","info":"","x":699,"y":304,"wires":[]},{"id":"913cd07d.12dbf","type":"ping","z":"b86d0cad.8e96a","name":"","host":"10.67.20.56","timer":"5","x":509,"y":344,"wires":[["3cbd49f6.ebdd26"]]}]

You could do this...

[{"id":"91e689b6.4b5cc8","type":"debug","z":"e0ee1196.5368e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":450,"y":280,"wires":[]},{"id":"a2329b30.c1f468","type":"comment","z":"e0ee1196.5368e","name":"send a notification e.g. to pushover","info":"","x":280,"y":240,"wires":[]},{"id":"d3067bc1.d1da88","type":"ping","z":"e0ee1196.5368e","name":"","host":"10.67.20.56","timer":"5","x":210,"y":280,"wires":[["91e689b6.4b5cc8","9a789de0.45619"]]},{"id":"9a789de0.45619","type":"function","z":"e0ee1196.5368e","name":"Update flow.pingOK","func":"var isOk = (typeof msg.payload == 'number')\nflow.set(\"pingOK\", isOk);\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":320,"wires":[[]]}]

I can't see "pingOK" Function node out. Sorry i'm a beginner.

you probably don't have the node installed. From the manage palette, click the install tab and enter node-red-node-ping and hit install. Then you can deploy and test it.

I'm confused.

Was the flow you posted in 1st thread yours?

If so, then I imported it and added a function node to the end to do what you asked, make a true or false., Then exported it and pasted your flow + my mod in my response. In other words, it should work for you as I added nothing more than a standard function node.

I stored the true false result in flow context so you could see it.

You can view flow context variables in the side bar (switch from debug to context)
E.g...
https://images.app.goo.gl/eNAYvB8986x3Xzae8

From the node's info tab
Pings a machine and returns the trip time in mS as msg.payload.
Returns false if no response received within 5 seconds, or if the host is unresolveable.
Default ping is every 20 seconds but can be configured.
msg.topic contains the target host ip.

So you eithor get a value or false.

you can add a line to @Steve-Mcl function node so it looks like this

var isOk = (typeof msg.payload == 'number');
flow.set("pingOK", isOk);
msg.payload = isOk;
return msg;

and you will get true or false in the msg.payload

Problem solved. Thanks.