From 3b50f75d6adfe8889812977f88cbf927afba6064 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Mon, 4 Dec 2023 23:24:56 +0100 Subject: [PATCH 1/3] Bump module dependencies --- go.mod | 16 ++++++++-------- go.sum | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index 18d6d7d..129a576 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,14 @@ module github.com/gesellix/couchdb-prometheus-exporter/v30 go 1.21 require ( - github.com/gesellix/couchdb-cluster-config/v17 v17.3.2 + github.com/gesellix/couchdb-cluster-config/v17 v17.3.3 github.com/go-kit/log v0.2.1 github.com/okeuday/erlang_go/v2 v2.0.7 github.com/prometheus/client_golang v1.17.0 github.com/prometheus/client_model v0.5.0 github.com/prometheus/exporter-toolkit v0.10.0 github.com/stretchr/testify v1.8.4 - github.com/urfave/cli/v2 v2.25.7 + github.com/urfave/cli/v2 v2.26.0 google.golang.org/protobuf v1.31.0 k8s.io/klog/v2 v2.110.1 ) @@ -34,12 +34,12 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.13.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect + golang.org/x/sync v0.5.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 3a9b8d3..ad4b3e2 100644 --- a/go.sum +++ b/go.sum @@ -11,8 +11,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gesellix/couchdb-cluster-config/v17 v17.3.2 h1:OoXWiODQk9TYw0714iCQEYc8IaRnjovCi2HG4ys/C80= -github.com/gesellix/couchdb-cluster-config/v17 v17.3.2/go.mod h1:KamcGQPBm0Zt0SuVqCtw1M7HwIp09W4mWuh49e6H4b0= +github.com/gesellix/couchdb-cluster-config/v17 v17.3.3 h1:rvqTpO3e+w3MBFOjtUhNg//SWbHsiZVss1w8V/QxshQ= +github.com/gesellix/couchdb-cluster-config/v17 v17.3.3/go.mod h1:B9HaYQVQzVWDvmGYxSplRoO2atVUtfxP3wa9EUWVL04= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= @@ -57,42 +57,42 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= -github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/urfave/cli/v2 v2.26.0 h1:3f3AMg3HpThFNT4I++TKOejZO8yU55t3JnnSr4S4QEI= +github.com/urfave/cli/v2 v2.26.0/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= -golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= From de1d86b3851abbcc1b328b8b0c8b79d8b991ad5a Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Mon, 4 Dec 2023 23:26:11 +0100 Subject: [PATCH 2/3] Bump cluster-config versions --- examples/compose/docker-compose-cluster.yml | 2 +- .../docker-compose-integrationtest.yml | 2 +- examples/grafana/docker-traefik-stack.yml | 20 +++++++++++-------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/examples/compose/docker-compose-cluster.yml b/examples/compose/docker-compose-cluster.yml index 338ccfc..ab78e9b 100644 --- a/examples/compose/docker-compose-cluster.yml +++ b/examples/compose/docker-compose-cluster.yml @@ -45,7 +45,7 @@ services: - "9984:9984" cluster-setup: - image: gesellix/couchdb-cluster-config:v17.3.2 + image: gesellix/couchdb-cluster-config:v17.3.3 command: -nodes 172.16.238.11 -nodes 172.16.238.12 -nodes 172.16.238.13 networks: couchdb-cluster: diff --git a/examples/compose/docker-compose-integrationtest.yml b/examples/compose/docker-compose-integrationtest.yml index 66cc2c2..e32449b 100644 --- a/examples/compose/docker-compose-integrationtest.yml +++ b/examples/compose/docker-compose-integrationtest.yml @@ -80,7 +80,7 @@ services: - "9985:9984" cluster-setup: - image: gesellix/couchdb-cluster-config:v17.3.2 + image: gesellix/couchdb-cluster-config:v17.3.3 command: setup --delay 10s --timeout 30s --username ${COUCHDB_USER:-root} --password ${COUCHDB_PASSWORD:-a-secret} -nodes 172.16.238.11 -nodes 172.16.238.12 -nodes 172.16.238.13 networks: couchdb-cluster: diff --git a/examples/grafana/docker-traefik-stack.yml b/examples/grafana/docker-traefik-stack.yml index 9d24d37..c5bd00b 100644 --- a/examples/grafana/docker-traefik-stack.yml +++ b/examples/grafana/docker-traefik-stack.yml @@ -14,10 +14,11 @@ networks: couchdb-cluster: driver: overlay name: couchdbs +# attachable: true services: traefik: - image: traefik:v2.1.6 + image: traefik:2.10.5 command: - "--log.level=DEBUG" - "--api=true" @@ -73,7 +74,8 @@ services: couchdb1: image: couchdb:3.3.2 - command: -name couchdb@couchdb1 -setcookie thecookie + hostname: couchdb1.local + command: -name couchdb@couchdb1.local -setcookie thecookie environment: - "COUCHDB_USER=${COUCHDB_USER:-root}" - "COUCHDB_PASSWORD=${COUCHDB_PASSWORD:-a-secret}" @@ -93,7 +95,8 @@ services: couchdb2: image: couchdb:3.3.2 - command: -name couchdb@couchdb2 -setcookie thecookie + hostname: couchdb2.local + command: -name couchdb@couchdb2.local -setcookie thecookie environment: - "COUCHDB_USER=${COUCHDB_USER:-root}" - "COUCHDB_PASSWORD=${COUCHDB_PASSWORD:-a-secret}" @@ -113,7 +116,8 @@ services: couchdb3: image: couchdb:3.3.2 - command: -name couchdb@couchdb3 -setcookie thecookie + hostname: couchdb3.local + command: -name couchdb@couchdb3.local -setcookie thecookie environment: - "COUCHDB_USER=${COUCHDB_USER:-root}" - "COUCHDB_PASSWORD=${COUCHDB_PASSWORD:-a-secret}" @@ -133,7 +137,7 @@ services: couchdbstats1: image: "gesellix/couchdb-prometheus-exporter:${COUCHDB_EXPORTER_VERSION:-latest}" - command: --couchdb.uri=http://couchdb1:5984 --logtostderr --databases=_all_dbs + command: --couchdb.uri=http://couchdb1.local:5984 --logtostderr --databases=_all_dbs environment: - "COUCHDB_USERNAME=${COUCHDB_USER:-root}" - "COUCHDB_PASSWORD=${COUCHDB_PASSWORD:-a-secret}" @@ -152,7 +156,7 @@ services: couchdbstats2: image: "gesellix/couchdb-prometheus-exporter:${COUCHDB_EXPORTER_VERSION:-latest}" - command: --couchdb.uri=http://couchdb2:5984 --logtostderr --databases=_all_dbs + command: --couchdb.uri=http://couchdb2.local:5984 --logtostderr --databases=_all_dbs environment: - "COUCHDB_USERNAME=${COUCHDB_USER:-root}" - "COUCHDB_PASSWORD=${COUCHDB_PASSWORD:-a-secret}" @@ -170,8 +174,8 @@ services: condition: on-failure cluster-setup: - image: gesellix/couchdb-cluster-config:v17.3.2 - command: setup --delay 10s --timeout 30s --username ${COUCHDB_USER:-root} --password ${COUCHDB_PASSWORD:-a-secret} -nodes couchdb1 -nodes couchdb2 -nodes couchdb3 + image: gesellix/couchdb-cluster-config:v17.3.3 + command: setup --delay 10s --timeout 30s --username ${COUCHDB_USER:-root} --password ${COUCHDB_PASSWORD:-a-secret} -nodes couchdb1.local -nodes couchdb2.local -nodes couchdb3.local networks: couchdb-cluster: deploy: From 7c7a33da422387b2c7df7de799e1b7333b8e3ccc Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Mon, 4 Dec 2023 23:26:42 +0100 Subject: [PATCH 3/3] chore --- examples/grafana/docker-traefik-stack.yml | 14 +++++++------- examples/grafana/prometheus/prometheus.yml | 18 ++++-------------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/examples/grafana/docker-traefik-stack.yml b/examples/grafana/docker-traefik-stack.yml index c5bd00b..290e38c 100644 --- a/examples/grafana/docker-traefik-stack.yml +++ b/examples/grafana/docker-traefik-stack.yml @@ -187,7 +187,7 @@ services: condition: on-failure prometheus: - image: prom/prometheus:v2.13.1 + image: prom/prometheus:v2.48.0 volumes: - ./prometheus/:/etc/prometheus/ - prometheus_data:/prometheus @@ -210,7 +210,7 @@ services: condition: on-failure node-exporter: - image: prom/node-exporter + image: prom/node-exporter:v1.7.0 volumes: - /proc:/host/proc:ro - /sys:/host/sys:ro @@ -218,10 +218,10 @@ services: command: - '--path.procfs=/host/proc' - '--path.sysfs=/host/sys' - - --collector.filesystem.ignored-mount-points + - --collector.filesystem.mount-points-exclude - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)" ports: - - 9100:9100 + - "9100:9100" networks: - monitor-net deploy: @@ -230,9 +230,9 @@ services: condition: on-failure alertmanager: - image: prom/alertmanager + image: prom/alertmanager:v0.26.0 ports: - - 9093:9093 + - "9093:9093" volumes: - "./alertmanager/:/etc/alertmanager/" networks: @@ -248,7 +248,7 @@ services: condition: on-failure cadvisor: - image: google/cadvisor + image: gcr.io/cadvisor/cadvisor volumes: - /:/rootfs:ro - /var/run:/var/run:rw diff --git a/examples/grafana/prometheus/prometheus.yml b/examples/grafana/prometheus/prometheus.yml index 5bb698b..4d7861f 100644 --- a/examples/grafana/prometheus/prometheus.yml +++ b/examples/grafana/prometheus/prometheus.yml @@ -28,23 +28,13 @@ scrape_configs: - job_name: 'cadvisor' scrape_interval: 5s - dns_sd_configs: - - names: - - 'tasks.cadvisor' - type: 'A' - port: 8080 - # static_configs: - # - targets: ['cadvisor:8080'] + static_configs: + - targets: ['cadvisor:8080'] - job_name: 'node-exporter' scrape_interval: 5s - dns_sd_configs: - - names: - - 'tasks.node-exporter' - type: 'A' - port: 9100 - # static_configs: - # - targets: ['node-exporter:9100'] + static_configs: + - targets: ['node-exporter:9100'] - job_name: 'couchdb' static_configs: