For each line in docker ps that beings with storj*, i want to curl the RPC port and if it is reporting OFFLINE, then i want it to give me an alert (Lets just say write it to a file).
That way I could run this on each of the storj machines instead of trying to do some centralized panel.
I really just want a list of node names that are offline so i can pipe it into an email or a telegram message or something. Have it run every hour and get real alerts when things are offline.
More interested in curl’ing the actual node’s API/RPC/wahtever ya call it. As i have ports open and such and sometimes the node still shows offline. Usually stopping, rm’ing, and restarting the docker instance fixess this, but i need some sort of alert for it.
Getting closer, i think those are the uptimes. So now i just need to find a way to echo the name of the docker instance that does not return an uptime (i.e. a node that is offline).
Please note that even though a node may show that it is up some hours, it may still not be online.
As stated before, this is a very simple check that ensures only that the machine is pingable. It does not check each node running within a network or on a certain machine.
latest “/entrypoint” 57 minutes ago Up 40 minutes 0.0.0.0
latest “/entrypoint” 8 hours ago Up 39 minutes 0.0.0.0
latest “/entrypoint” 8 hours ago Up 39 minutes 0.0.0.0
latest “/entrypoint” 8 hours ago Up 39 minutes 0.0.0.0
latest “/entrypoint” 8 hours ago Up 39 minutes 0.0.0.0
latest “/entrypoint” 8 hours ago Up 40 minutes 0.0.0.0
latest “/entrypoint” 8 hours ago Up 39 minutes 0.0.0.0
latest “/entrypoint” 8 hours ago Up 39 minutes 0.0.0.0
latest “/entrypoint” 8 hours ago Up 39 minutes 0.0.0.0
The really long strings seem to correlate to offline nodes that display last contact as a long time ago (incorrectly) such as what I’m asking about here
The length of time is actually the time to 1:1:1970 as that was when the computer time starts, In my experience the last contact doesn’t display the correct time i disregard it, i usually take from it that the node is offline and nothing more