You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -104,7 +105,9 @@ test-race: env ## Run all tests with race flag.
104
105
go test -race -v -timeout 30s ./...
105
106
106
107
test-cluster: env ## Starts MongoDB test cluster. Use env var TEST_MONGODB_IMAGE to set flavor and version. Example: TEST_MONGODB_IMAGE=mongo:3.6 make test-cluster
107
-
docker compose up -d
108
+
docker compose up --build -d
109
+
./docker/scripts/setup-pbm.sh
108
110
109
111
test-cluster-clean: env ## Stops MongoDB test cluster.
Copy file name to clipboardExpand all lines: README.md
+24-3Lines changed: 24 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,10 @@ Currently, these metric sources are implemented:
16
16
- replSetGetStatus
17
17
- serverStatus
18
18
19
+
## Supported MongoDB versions
20
+
21
+
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.
22
+
19
23
## Info on Percona MongoDB exporter versions
20
24
21
25
The old 0.1x.y version (ex `master` branch) has been moved to the `release-0.1x` branch.
@@ -48,10 +52,10 @@ A docker image is available on the [official percona repository](https://hub.doc
48
52
49
53
```sh
50
54
# with podman
51
-
podman run -d -p 9216:9216 -p 17001:17001 percona/mongodb_exporter:0.20 --mongodb.uri=mongodb://127.0.0.1:17001
55
+
podman run -d -p 9216:9216 percona/mongodb_exporter:0.40 --mongodb.uri=mongodb://127.0.0.1:17001
52
56
53
57
# with docker
54
-
docker run -d -p 9216:9216 -p 17001:17001 percona/mongodb_exporter:0.20 --mongodb.uri=mongodb://127.0.0.1:17001
58
+
docker run -d -p 9216:9216 percona/mongodb_exporter:0.40 --mongodb.uri=mongodb://127.0.0.1:17001
55
59
```
56
60
57
61
#### Permissions
@@ -91,11 +95,28 @@ You can run the exporter specifying multiple URIs, devided by a comma in --mongo
In this case you can use the **/scrape** endpoint with the **target** parameter to retreive the specified tartget's metrics. When querying the data you can use just mongodb://host:port in the targer parameter without other parameters and, of course without host credentials
98
+
In this case you can use the **/scrape** endpoint with the **target** parameter to retreive the specified tartget's metrics. When querying the data you can use just mongodb://host:port in the target parameter without other parameters and, of course without host credentials
95
99
```sh
96
100
GET /scrape?target=mongodb://127.0.0.1:27018
97
101
```
102
+
If your URI is prefixed by mongodb:// or mongodb+srv:// schema, any host not prefixed by it after comma is being treated as part of a cluster rather then as a standalone host. Thus clusters and standalone hosts can be combined like this:
You can use the --split-cluster option to split all cluster nodes into separate targets. This mode is useful when cluster nodes are defined as SRV records and the mongodb_exporter is running with mongodb+srv domain specified. In this case SRV records will be queried upon mongodb_exporter start and each cluster node can be queried using the **target** parameter of multitarget endpoint.
98
108
109
+
#### Overall targets request endpoint
110
+
111
+
There is an overall targets endpoint **/scrapeall** that queries all the targets in one request. It can be used to store multiple node metrics without separate target requests. In this case, each node metric will have a **instance** label containing the node name as a host:port pair (or just host if no port was not specified). For example, for mongodb_exporter running with the options:
0 commit comments