Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Metrics (esp. synapse_notifier_users) and workers #7312

Closed
eMPee584 opened this issue Apr 20, 2020 · 3 comments
Closed

Metrics (esp. synapse_notifier_users) and workers #7312

eMPee584 opened this issue Apr 20, 2020 · 3 comments

Comments

@eMPee584
Copy link

eMPee584 commented Apr 20, 2020

Description

Is the assumption correct that synapse_notifier_users should reflect the number of active user devices at a given time?
Since activating workers, synapse_notifier_users has turned to 0.0, leaving us without this vital measure of server activity.. With 7k+ users atm... 😅 💦
Here's a dump of our metrics.gz..

Steps to reproduce

Version information

@babolivier
Copy link
Contributor

babolivier commented Apr 22, 2020

Hey there, which worker are you trying to retrieve this metric from? From what I can see, only the synchrotron (synapse.app.synchrotron) seems to be updating it, so any other worker (or the master process) will be returning 0.0.

To retrieve metrics from a worker, just add the following to its configuration file, under the worker_listeners section:

 - type: metrics
   bind_address: ''
   port: 9101

(feel free to edit the bind_address and port parameters however you want as long as the resulting listener is accessible from prometheus/beamium/etc.)

@eMPee584
Copy link
Author

Ok thanks for the pointer.. we were receiving the URL from the main homeserver process..
so different workers provide different metrics fragment? 🤔
And what about multiple synchrotrons, will they each have their own stats?

babolivier added a commit that referenced this issue Apr 27, 2020
It doesn't seem to be documented anywhere and means that you suddenly start losing metrics without any obvious reason when you go from monolith to workers (e.g. #7312).
@babolivier
Copy link
Contributor

Gah, sorry, I missed your reply.

so different workers provide different metrics fragment?

Yes, different workers will handle different data and thus they'll all expose different timeseries.

And what about multiple synchrotrons, will they each have their own stats?

Yup.

The general rule here is that if you want to monitor a cluster of workers you should monitor every worker, not only the master. This isn't clear in the documentation so I've opened #7357 to address that.

I'm going to close this issue now. If you have further comments or questions, feel free to join #synapse:matrix.org and share them there, as it is our main support channel :)

babolivier added a commit that referenced this issue Apr 27, 2020
It doesn't seem to be documented anywhere and means that you suddenly start losing metrics without any obvious reason when you go from monolith to workers (e.g. #7312).
phil-flex pushed a commit to phil-flex/synapse that referenced this issue Jun 16, 2020
It doesn't seem to be documented anywhere and means that you suddenly start losing metrics without any obvious reason when you go from monolith to workers (e.g. matrix-org#7312).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants