Re: Monitoring ngrok tunnel
SZÉPE Viktor <[email protected]>
| Newsgroups | gmane.comp.monitoring.monit.general |
|---|---|
| Message-ID | <[email protected]> |
Idézem/Quoting Marcin Deka <[email protected]>: > Hi, > > Can someone advise how I can monitor tunnel created with ngrok > (running as a daemon)? > I would like to reestablish tunnel if existing one is stoped and > send alert including new tunnel parameters (there is a TCP port > number change while tunel is being created). > I’m using below command to see tunnel details: > curl --silent http://127.0.0.1:4040/api/tunnels/ssh | jq '.public_url’ > It gives a response like below, where XXXXX ia a TCP port number: > "tcp://0.tcp.eu.ngrok.io:XXXXX" > Will appreciate your help! > Hi Marcin! You may monitor ngrok's - log files - binaries - configuration files - init files - the running process - TCP ports - and functional tests as you mentioned, you may check public_url in a shell script see all my configs https://github.com/szepeviktor/debian-server-tools/tree/master/monitoring/monit/services aruba-serclient_script is a very simple example: /usr/bin/lsof -p "$(cat /run/serclient.pid)" | grep -w "/dev/ttyS1" so curl --silent "http://127.0.0.1:4040/api/tunnels/ssh" | jq -r '.public_url' | grep -F 'tcp://0.tcp.eu.ngrok.io:' adding "if changed status then alert" to monit will alert you. All the best! SZÉPE Viktor, webes alkalmazás üzemeltetés / Running your application https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md ~~~ ügyelet/hotline: +36-20-4242498 [email protected] skype: szepe.viktor Budapest, III. kerület -- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general