elbereth / dashninja-fe

Dash Ninja Front-End (Public Rest API+HTML+JS)
GNU General Public License v3.0
25 stars 40 forks source link

How can I programaticaly check if my masternode is alive? #3

Closed ser closed 6 years ago

ser commented 6 years ago

I want my nagios to know if my masternode is alive and OK. Is it possible to ask dashninja server for it in some way? if yes, how?

elbereth commented 6 years ago

For alive checking, the easiest way is to use the port open check of nagios, check if port 9999 (or whatever you choose for your Masternode to use in dashd).

If you want also to check that it is listed by dashd and also on ENABLED status, you will need to code a nagios plugin for that as it requires to RPC call dashd and check the listing status.

Finally you could use the Dash Ninja API from https://www.dashninja.pl/api/ to check for the status of your masternode from Dash Ninja point of view (currently 4 independent monitoring nodes). The endpoint to use is https://www.dashninja.pl/api/masternodes for mainnet and https://test.dashninja.pl/api/masternodes for testnet. You can get some documentation (probably outdated, sorry) from : https://www.dash.org/forum/threads/dashninja-pl-dash-masternode-ninja-free-masternode-monitoring.2722/