Sync Gateway and Signal R


Is there a way to get realtime info change of the basicstats of a sync gateway db? Maybe via SignalR?


changes feed is exactly you need, basically it monitor SGW for any changes, basically it is observer which keep tap on SGW changes, as soon as any changes received,it send changes to Changes feed.

changes feed is nothing but an URL, you just need write an application which could monitor this URL

for the starter you can refer to this URL

in my opinion Signal R is overkill.

1 Like

What kind of stats are you specifically looking for ?

1 Like

Hi @priya.rajagopal
Mainly any kind of error in sgw. I have succeeded in hooking onto _changes-feed, no problems on that part. But changes are something else than errors.

I need to know when and what document is erroring. I want to be informed without looking at the SGW error logs. It’s a nice to have, not that it is blocking me.

Good news is that Sync Gateway stats is something that we are evaluating as a future roadmap item (for next year).

In the meantime , you may want to checkout our GET _expvars API .API is pretty low level. But a combination of these stats along with system information (like cpu utilization , memory utilization ) can give useful insights into the performance of your system. Here is a simple tool that Fujio put together that you can use as a starting point

You won’t get details on documents that have error-ed etc but a large number of channel misses could be an indication that your system is not resourced / configured properly.


thanks @priya.rajagopal for the info!