Update Synapse to 1.103.0 and add support for prometheus metrics

This commit is contained in:
Daniel Berteaud 2024-03-19 14:57:22 +01:00
parent e546984e38
commit 17391faf4a
6 changed files with 39 additions and 2 deletions

View File

@ -4,6 +4,12 @@ Sources = [
{
Name = "[[ .traefik.instance ]]"
Permissions = [
{
Action = "deny"
HTTP {
PathPrefix = "/_synapse/metrics"
}
}
{
Action = "allow"
HTTP {

View File

@ -4,6 +4,12 @@ Sources = [
{
Name = "traefik"
Permissions = [
{
Action = "deny"
HTTP {
PathPrefix = "/_synapse/metrics"
}
}
{
Action = "allow"
HTTP {

View File

@ -23,6 +23,12 @@ job "matrix" {
name = "matrix"
port = 8008
meta {
alloc = "${NOMAD_ALLOC_INDEX}"
job = "${NOMAD_JOB_NAME}"
}
check {
type = "http"
path = "/health"
@ -119,12 +125,15 @@ job "matrix" {
task "synapse" {
driver = "docker"
leader = true
config {
image = "danielberteaud/matrix-synapse:1.102.0-1"
image = "danielberteaud/matrix-synapse:1.103.0-1"
pids_limit = 200
readonly_rootfs = true
}

View File

@ -7,6 +7,9 @@ job "[[ .instance ]]" {
network {
mode = "bridge"
[[- if $c.prometheus.enabled ]]
port "metrics" {}
[[- end ]]
}
[[ template "common/volumes" $c ]]
@ -15,6 +18,8 @@ job "[[ .instance ]]" {
name = "[[ .instance ]][[ .consul.suffix ]]"
port = 8008
[[ template "common/service_meta" $c ]]
check {
type = "http"
path = "/health"
@ -42,6 +47,7 @@ job "[[ .instance ]]" {
}
[[ template "common/task.wait_for" $c ]]
[[ template "common/task.metrics_proxy" $c ]]
[[ template "common/task.pgpooler" $c ]]
task "synapse" {

View File

@ -14,6 +14,13 @@ listeners:
- client
- federation
compress: false
[[- if .prometheus.enabled ]]
- port: 9000
type: metrics
bind_addresses: ['127.0.0.1']
enable_metrics: true
[[- end ]]
database:
name: psycopg2

View File

@ -25,7 +25,7 @@ matrix:
synapse:
# Version of synapse
version: 1.102.0
version: 1.103.0
# The docker image to use
image: '[[ .docker.repo ]]matrix-synapse:[[ .matrix.synapse.version ]]-1'
@ -103,6 +103,9 @@ matrix:
cpu: 500
memory: 384
prometheus:
metrics_url: http://127.0.0.1:9000/_synapse/metrics
# Element settings.
# Note : element will be served by the nginx container, so all the image, resources etc. are set there
element: