commercetools / mongo-metrics-reporter

Sends mongodb db.serverStatus() to the graphite.
Apache License 2.0
3 stars 3 forks source link

What happens if primary changes after re-election? #7

Closed svenmueller closed 8 years ago

svenmueller commented 8 years ago

Hi,

I'm just wondering what happens if a re-election happens and the primary changes. Is the metrics-reporter still capable of gathering metrics from the secondary node?

Thanks!

OlegIlyenko commented 8 years ago

Yes, reporter will continue to work and send secondary's metrics. In fact it already happened a few times.

Ideally reporter should be able to detect primary changes and adopt itself. Secondary stats are not very useful (at least not as useful as primary's)

svenmueller commented 8 years ago

Thx! Yep, that's true. Actually it would be really nice if the reporter could send stats for all nodes in the cluster :)

Thx a lot for your work!