Skip to content

Commit b6c2de3

Browse files
authored
Merge branch 'main' into fix
2 parents 9ff3a96 + b4bf31b commit b6c2de3

File tree

13 files changed

+94
-77
lines changed

13 files changed

+94
-77
lines changed

.github/workflows/scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
persist-credentials: false
2929

3030
- name: Run analysis
31-
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
31+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
3232
with:
3333
results_file: results.sarif
3434
results_format: sarif
@@ -43,6 +43,6 @@ jobs:
4343

4444
# Upload the results to GitHub's code scanning dashboard (optional).
4545
- name: "Upload to code-scanning"
46-
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
46+
uses: github/codeql-action/upload-sarif@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v3.29.5
4747
with:
4848
sarif_file: results.sarif

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
stale:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/stale@v9
10+
- uses: actions/stale@v10
1111
with:
1212
stale-issue-message: 'This issue has been marked as stale because it has been open for 120 days without activity. Please remove the stale label or add a comment; otherwise, it will be closed in 7 days.'
1313
days-before-stale: 120

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
6060
6161
- name: Upload coverage results
62-
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
62+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
6363
with:
6464
files: cover.out
6565
flags: agent

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ GO_TEST_CODECOV ?=
99
BUILD_DATE ?= $(shell date +%FT%T%z)
1010
GOVERSION ?= $(shell go version | cut -d " " -f3)
1111
COMPONENT_VERSION ?= $(shell cat VERSION)
12+
IMAGE_TAG ?= $(shell cat VERSION | cut -c 2-)
1213
COMPONENT_BRANCH ?= $(shell git describe --always --contains --all)
1314
PMM_RELEASE_FULLCOMMIT ?= $(shell git rev-parse HEAD)
1415
GO_BUILD_LDFLAGS = -X main.version=${COMPONENT_VERSION} -X main.buildDate=${BUILD_DATE} -X main.commit=${PMM_RELEASE_FULLCOMMIT} -X main.Branch=${COMPONENT_BRANCH} -X main.GoVersion=${GOVERSION} -s -w
@@ -17,7 +18,7 @@ REPO ?= percona/$(NAME)
1718
GORELEASER_FLAGS ?=
1819
UID ?= $(shell id -u)
1920

20-
export TEST_MONGODB_IMAGE?=mongo:4.4
21+
export TEST_MONGODB_IMAGE?=mongo:6.0
2122
export TEST_MONGODB_ADMIN_USERNAME?=
2223
export TEST_MONGODB_ADMIN_PASSWORD?=
2324
export TEST_MONGODB_USERNAME?=
@@ -71,7 +72,10 @@ init: ## Install linters
7172
cd tools && go generate -x -tags=tools
7273

7374
build: ## Build exporter binary using plain go build.
74-
go build -ldflags="$(GO_BUILD_LDFLAGS)" -o $(PMM_RELEASE_PATH)/mongodb_exporter
75+
CGO_ENABLED=0 go build -ldflags="$(GO_BUILD_LDFLAGS)" -o $(PMM_RELEASE_PATH)/mongodb_exporter
76+
77+
docker-build: build
78+
docker build -t ${NAME}:${IMAGE_TAG} .
7579

7680
build-gssapi: ## Build exporter binary with GSSAPI support (requires CGO enabled).
7781
CGO_ENABLED=1 go build -ldflags="$(GO_BUILD_LDFLAGS)" -tags gssapi -o $(PMM_RELEASE_PATH)/mongodb_exporter

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Currently, these metric sources are implemented:
2121

2222
## Supported MongoDB versions
2323

24-
The exporter works with Percona Server for MongoDB and MongoDB Community or Enterprise Edition versions 4.4 and newer. Older versions might also work but are not tested anymore.
24+
The exporter works with Percona Server for MongoDB and MongoDB Community or Enterprise Edition versions 6.0 and newer. Older versions might also work but are not tested anymore.
2525

2626
## Info on Percona MongoDB exporter versions
2727

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.47.0
1+
v0.47.1

docker-compose.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
mongo-1-1:
33
container_name: "mongo-1-1"
4-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
4+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
55
ports:
66
- "${TEST_MONGODB_S1_PRIMARY_PORT:-17001}:27017"
77
command: mongod --replSet rs1 --shardsvr --port 27017 --oplogSize 16 --bind_ip 0.0.0.0
@@ -14,7 +14,7 @@ services:
1414

1515
mongo-1-2:
1616
container_name: "mongo-1-2"
17-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
17+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
1818
ports:
1919
- "${TEST_MONGODB_S1_SECONDARY1_PORT:-17002}:27017"
2020
command: mongod --replSet rs1 --shardsvr --port 27017 --oplogSize 16 --bind_ip 0.0.0.0
@@ -23,7 +23,7 @@ services:
2323

2424
mongo-1-3:
2525
container_name: "mongo-1-3"
26-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
26+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
2727
ports:
2828
- "${TEST_MONGODB_S1_SECONDARY2_PORT:-17003}:27017"
2929
command: mongod --replSet rs1 --shardsvr --port 27017 --oplogSize 16 --bind_ip 0.0.0.0
@@ -32,7 +32,7 @@ services:
3232

3333
mongo-1-arbiter:
3434
container_name: "mongo-1-arbiter"
35-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
35+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
3636
ports:
3737
- "${TEST_MONGODB_S1_ARBITER:-17011}:27017"
3838
command: mongod --replSet rs1 --shardsvr --port 27017 --oplogSize 16
@@ -41,7 +41,7 @@ services:
4141

4242
mongo-rs1-setup:
4343
container_name: "mongo-rs1-setup"
44-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
44+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
4545
depends_on:
4646
- "mongo-1-1"
4747
- "mongo-1-2"
@@ -150,7 +150,7 @@ services:
150150

151151
mongo-rs2-setup:
152152
container_name: "mongo-rs2-setup"
153-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
153+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
154154
depends_on:
155155
- "mongo-2-1"
156156
- "mongo-2-2"
@@ -174,7 +174,7 @@ services:
174174
# Config servers
175175
mongo-cnf-2:
176176
container_name: "mongo-cnf-2"
177-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
177+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
178178
ports:
179179
- "${TEST_MONGODB_CONFIGSVR2_PORT:-17008}:27017"
180180
command: mongod --dbpath /data/db --replSet cnf-serv --configsvr --port 27017 --oplogSize 16
@@ -183,7 +183,7 @@ services:
183183

184184
mongo-cnf-3:
185185
container_name: "mongo-cnf-3"
186-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
186+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
187187
ports:
188188
- "${TEST_MONGODB_CONFIGSVR3_PORT:-17009}:27017"
189189
command: mongod --dbpath /data/db --replSet cnf-serv --configsvr --port 27017 --oplogSize 16
@@ -192,7 +192,7 @@ services:
192192

193193
mongo-cnf-1:
194194
container_name: "mongo-cnf-1"
195-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
195+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
196196
ports:
197197
- "${TEST_MONGODB_CONFIGSVR1_PORT:-17007}:27017"
198198
command: mongod --dbpath /data/db --replSet cnf-serv --configsvr --port 27017 --oplogSize 16
@@ -204,7 +204,7 @@ services:
204204

205205
mongo-cnf-setup:
206206
container_name: "mongo-cnf-setup"
207-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
207+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
208208
depends_on:
209209
- "mongo-cnf-1"
210210
- "mongo-cnf-2"
@@ -224,7 +224,7 @@ services:
224224

225225
mongos:
226226
container_name: "mongos"
227-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
227+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
228228
ports:
229229
- "${TEST_MONGODB_MONGOS_PORT:-17000}:27017"
230230
networks:
@@ -240,7 +240,7 @@ services:
240240

241241
mongo-shard-setup:
242242
container_name: "mongo-shard-setup"
243-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
243+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
244244
depends_on:
245245
- "mongos"
246246
networks:
@@ -270,15 +270,15 @@ services:
270270

271271
standalone:
272272
container_name: "standalone"
273-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
273+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
274274
ports:
275275
- "${TEST_MONGODB_STANDALONE_PORT:-27017}:27017"
276276
command: mongod --port 27017 --oplogSize 16
277277

278278
standalone-encrypted:
279279
user: root
280280
container_name: "standalone-encrypted"
281-
image: ${TEST_MONGODB_IMAGE:-mongo:4.4}
281+
image: ${TEST_MONGODB_IMAGE:-mongo:6.0}
282282
ports:
283283
- "${TEST_MONGODB_STANDALONE_ENCRYPTED_PORT:-27027}:27017"
284284
volumes:

exporter/metrics.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ func makeMetrics(prefix string, m bson.M, labels map[string]string, compatibleMo
309309
}
310310

311311
for k, val := range m {
312+
// histogram metrics are currently unsupported (PMM-14337)
313+
if k == "histograms" {
314+
continue
315+
}
312316
nextPrefix := prefix + k
313317

314318
l := make(map[string]string)

go.mod

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ require (
99
github.com/alecthomas/kong v1.12.1
1010
github.com/percona/exporter_shared v0.7.6
1111
github.com/pkg/errors v0.9.1
12-
github.com/prometheus/client_golang v1.23.0
12+
github.com/prometheus/client_golang v1.23.2
1313
github.com/prometheus/client_model v0.6.2
14-
github.com/prometheus/common v0.65.0
14+
github.com/prometheus/common v0.66.1
1515
github.com/prometheus/exporter-toolkit v0.14.0
16-
github.com/stretchr/testify v1.10.0
16+
github.com/stretchr/testify v1.11.1
1717
go.mongodb.org/mongo-driver v1.17.4
1818
)
1919

@@ -115,23 +115,24 @@ require (
115115
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
116116
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
117117
go.opentelemetry.io/otel/trace v1.36.0 // indirect
118-
golang.org/x/crypto v0.39.0 // indirect
118+
go.yaml.in/yaml/v2 v2.4.2 // indirect
119+
golang.org/x/crypto v0.41.0 // indirect
119120
golang.org/x/exp v0.0.0-20240529005216-23cca8864a10 // indirect
120-
golang.org/x/mod v0.25.0 // indirect
121-
golang.org/x/net v0.41.0 // indirect
121+
golang.org/x/mod v0.26.0 // indirect
122+
golang.org/x/net v0.43.0 // indirect
122123
golang.org/x/oauth2 v0.30.0 // indirect
123-
golang.org/x/sync v0.15.0 // indirect
124-
golang.org/x/sys v0.33.0 // indirect
125-
golang.org/x/term v0.32.0 // indirect
126-
golang.org/x/text v0.26.0 // indirect
124+
golang.org/x/sync v0.16.0 // indirect
125+
golang.org/x/sys v0.35.0 // indirect
126+
golang.org/x/term v0.34.0 // indirect
127+
golang.org/x/text v0.28.0 // indirect
127128
golang.org/x/time v0.12.0 // indirect
128-
golang.org/x/tools v0.33.0 // indirect
129+
golang.org/x/tools v0.35.0 // indirect
129130
google.golang.org/api v0.240.0 // indirect
130131
google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 // indirect
131132
google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 // indirect
132133
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
133134
google.golang.org/grpc v1.73.0 // indirect
134-
google.golang.org/protobuf v1.36.6 // indirect
135+
google.golang.org/protobuf v1.36.8 // indirect
135136
gopkg.in/ini.v1 v1.67.0 // indirect
136137
gopkg.in/yaml.v2 v2.4.0 // indirect
137138
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)