How to check liveness of relay node and producer node from internet?

I have followed the instructions and set up a staking pool on testnet. Is there an easy way to check the liveness of relay node and hopefully producer node from internet?

So far the method seems to be checking the port is open, which seems too simple. It would be nice we can make some REST call and get some node basic info, etc.

Other methods involve logging into the machine, which is not what I’m looking for. Thanks!

1 Like

I am sure there are other more ellegant solutions such as grafana/prometheus however they typically require you to open a port on your node, but I prefer security over comfort.

It can be done like this:
-cron job running Cardano-cli query tip
-sending the output out to your webpage -parse and store data into a db

Then you can check the status by going to your webpage.


Thanks. That is pretty good idea. I’m planning to host the staking pool home page on the relay node and also include some basic stats. So this could work.

Just curious - relay node has an open port. Can we send some queries there to make sure at least relay node is working fine?

Hosting a web on the actual relay will completely defy the purpose. By running a web server and opening ports on a relay you give the potential atacker chances. The worse even that the relay has access to your bp.
There are hosting plans out there at around $1 per month that will serve you just fine and keep your nodes safe.

1 Like

I guess you could use
or telnet from local to your relay.

1 Like

Hi, you can always set up the firewall so that only your (home) ip has access to the port on which grafana runs, and open the port on which your relay runs to the rest of the internet.

1 Like

As long as you have public IP or can setup dyn DNS and need the info only for your personal use then it is also a viable option.
If you want to monitor from the internet as stood the original question, I’d still prefer pushing the data from nodes in a way controlled by the node than allowing an outside entity to access and pull them at their will.

1 Like

Good point on the security issue of putting web server on relay node. Thanks!

telnet and open port tool seem to simplistic. Can we actually query the relay node using cardano (ouroboros?) protocol and get something meaningful?

1 Like

It has been over 1 year. Sadly I find myself still looking for the answer. Would appreciate if anyone can give a hint. Basically I like to do a commandline check from internet and see if relay node is alive. Thanks!

Aha! I did find the answer this time around. It is a secret cardano-ping command, which does not seem to be mentioned anywhere.

cardano-ping -h $host -p $port -c 1 -j -q $NETWORK_MAGIC | jq
  "pongs": [
      "cookie": 0,
      "host": "",
      "max": 0.005312325,
      "mean": 0.005312325,
      "median": 0.005312325,
      "min": 0.005312325,
      "p90": 0.005312325,
      "sample": 0.005312325,
      "timestamp": "2022-11-26T19:23:50.54250542Z"

Note the NETWORK_MAGIC is different from normal cardano-cli syntax. For mainnet, it is empty. For others, it is “-m <magic_number>”.

I could not find any references for this command, only found the following somewhat fishy site.