* Convert checkboxes to questions Signed-off-by: Kim Brose <2803622+HarHarLinks@users.noreply.github.com> * document internal links Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * document blog taxonomies Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * update PR bot CI from https://github.com/HarHarLinks/pr-template-autoclose Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * fix heading depth (MD001 MD003) Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * fix code blocks Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * fix spaces in link text (MD039) Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * fix no newline at end of file (MD047) Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * fix bare URLs without angle backets (MD034) Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * remove redundant attribute Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * linter exception Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * lint links and headings with rumdl instead of checklist Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * convert signoff checklist to heading Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * configure linter to .rumdl.toml explicitly Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * bump rumdl action Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * Shorten comments in the template Co-authored-by: Thibault Martin <thibaultamartin@users.noreply.github.com> Signed-off-by: Kim Brose <2803622+HarHarLinks@users.noreply.github.com> * Remove rumdl default config example comments Co-authored-by: Thibault Martin <thibaultamartin@users.noreply.github.com> Signed-off-by: Kim Brose <2803622+HarHarLinks@users.noreply.github.com> * explain more about the pr-bot Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * pin rumdl action to v0 Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> * fix unlinked email address in coc Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> --------- Signed-off-by: Kim Brose <2803622+HarHarLinks@users.noreply.github.com> Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com> Co-authored-by: Thibault Martin <thibaultamartin@users.noreply.github.com>
3.2 KiB
+++ title = "Monitoring Synapse Metrics with Prometheus" path = "/blog/2015/04/23/monitoring-synapse-metrics-with-prometheus"
[taxonomies] author = ["Matthew Hodgson"] category = ["Tutorials"] +++
Note: This blog post is outdated, and an up-to-date tutorial is located on the synapse project repo
Synapse has had support for exporting a comprehensive range of metrics via HTTP since 0.8.1 - we added this to help quantify the benefits of all the performance work which is going on currently in advance of Synapse 0.9. If you're interested in monitoring your own synapse and seeing what's going on using something like Prometheus, Leo just wrote a quick tutorial on getting up and running:
How to monitor Synapse metrics using Prometheus
- 1: Install prometheus:
- Follow instructions at http://prometheus.io/docs/introduction/install/
- 2: Enable synapse metrics:
- Simply setting a (local) port number will enable it. Pick a port. prometheus itself defaults to 9090, so starting just above that for locally monitored services seems reasonable. E.g. 9092:
Add to homeserver.yaml
metrics_port: 9092
Restart synapse
- 3: Check out synapse-prometheus-config
- https://github.com/matrix-org/synapse-prometheus-config
- 4: Add
synapse.htmlandsynapse.rules - The
.htmlfile needs to appear in prometheus'sconsolesdirectory, and the.rulesfile needs to be invoked somewhere in the main config file. A symlink to each from the git checkout into the prometheus directory might be easiest to ensuregit pullkeeps it updated. - 5: Add a prometheus target for synapse
- This is easiest if prometheus runs on the same machine as synapse, as it can then just use localhost:
global: {'{'} rule_file: "synapse.rules" {'}'}job: {'{'} name: "synapse"
target_group: {'{'} target: "http://localhost:9092/" {'}'} {'}'}
- 6: Start prometheus:
./prometheus -config.file=prometheus.conf
- 7: Wait a few seconds for it to start and perform the first scrape,
- then visit the console:
http://server-where-prometheus-runs:9090/consoles/synapse.html
And the end result looks something like...
...amongst many many other system & application metrics.
You can grab the latest version of the tutorial at https://github.com/matrix-org/synapse/blob/master/docs/metrics-howto.md - thanks to Leo for writing it up. Any questions, let us know!
