Sign in to follow this  
Dan-Schein

How Do You Monitor A Sync Host?

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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    :( 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this