Zerotier is brilliant but there is no way to catch online / offline events as they occur so I’m playing with Pipedream to see if I can catch an online event and then trigger an SSH login to that machines ZT IP address and run a one-line command.
I’ve got the ZT trigger working well but how to then pass the ZT IP address to the SSH (user auth) module and have it complete?
It seems to be:
- New Zerotier new node online event.
- Get ZT IP address ( steps.trigger.event.config.ipAssignments )
- Pass steps.trigger.event.config.ipAssignments to the SSH section but where would this go??
All help gratefully received ))
@anon47617723 currently it’s not possible to connect to a server through ZeroTier via Pipedream.
As a workaround you could have a server with a publicly accessible static IP which is also on the ZT network.
Pipedream would SSH into this server and from that server SSH via ZT into the respective server (your step reference looks correct).
Side note, are you trying to run a command each time a server comes online again in your ZeroTier network? The online state from ZT is just if the machine was lastOnline in the last 3 mins - so at a minimum there’s a 3 minute delay, further Pipedream needs to poll the data (as frequently as you allow it to) - so it isn’t exactly realtime.
Ah yes, of course. There would need to be a “middle man” to get on to the ZT network from Pipedream.
Ah well, back to the drawing board!