Dan-Schein Posted February 13, 2015 Report Share Posted February 13, 2015 Have 2 hosts on my LAN (1-windows, 1-iomega NAS). Often the clients will only see the windows host until the Sync service on the NAS is restarted. As a result want to configure a monitoring tool to alert when either host goes offline. Currently have limited monitoring by using telnet (each host has a static - manually configured port) to check for a connection. However when the NAS stops working, telnet continues to connect making this check ineffective. Suggestions? Quote Link to comment Share on other sites More sharing options...
GreatMarko Posted February 13, 2015 Report Share Posted February 13, 2015 Well, you could potentially utilize the get_folder_peers call of the Sync API to regularly monitor the number of peers connected from your own program/script, and if this number drops to zero it's a safe assumption that the other device(s) you're syncing with have either gone offline or Sync isn't running on them Quote Link to comment Share on other sites More sharing options...
goli Posted February 13, 2015 Report Share Posted February 13, 2015 Hey there. Using telnet, what about "netstat | grep btsync" or "pgrep"?Or if your NAS provides the web ui of sync, you could make your monitorig tool expect the web ui to respond properly by simply fetching the http result. Regards,Stephan. Quote Link to comment Share on other sites More sharing options...
Dan-Schein Posted February 13, 2015 Author Report Share Posted February 13, 2015 Well, you could potentially utilize the get_folder_peers call of the Sync API to regularly monitor the number of peers connected from your own program/script, and if this number drops to zero it's a safe assumption that the other device(s) you're syncing with have either gone offline or Sync isn't running on them Never knew this existed - thanks! Regardless of the function I try, the NAS returns "invalid request". Even for something as simple as http://192.168.x.x:8888/api?method=get_os Quote Link to comment Share on other sites More sharing options...
GreatMarko Posted February 13, 2015 Report Share Posted February 13, 2015 Never knew this existed - thanks! Regardless of the function I try, the NAS returns "invalid request". Even for something as simple as http://192.168.x.x:8888/api?method=get_os Have you applied for and received an API key? Hint: Click the "Request API Key" button on this page. You will be unable to use the API without a valid API key Quote Link to comment Share on other sites More sharing options...
b0rman Posted February 14, 2015 Report Share Posted February 14, 2015 It will be nice to make small zabbix module Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.