mnogo_exporter

所属分类:MongoDB
开发工具:GO
文件大小:108KB
下载次数:0
上传日期:2020-08-23 11:52:07
上 传 者sh-1993
说明:  已移至<https://github.com percona mongodb_exporter>(分支导出器_v2)

文件列表:
.golangci-required.yml (236, 2020-08-20)
.golangci.yml (765, 2020-08-20)
.goreleaser.yml (510, 2020-08-20)
Contributing.md (1882, 2020-08-20)
LICENSE (11357, 2020-08-20)
Makefile (4375, 2020-08-20)
docker-compose.yml (6170, 2020-08-20)
docker (0, 2020-08-20)
docker\scripts (0, 2020-08-20)
docker\scripts\init-shard.sh (1081, 2020-08-20)
docker\scripts\setup.sh (954, 2020-08-20)
exporter (0, 2020-08-20)
exporter\collstats_collector.go (2655, 2020-08-20)
exporter\collstats_collector_test.go (3163, 2020-08-20)
exporter\debug.go (586, 2020-08-20)
exporter\debug_test.go (672, 2020-08-20)
exporter\diagnostic_data_collector.go (2019, 2020-08-20)
exporter\diagnostic_data_collector_test.go (2378, 2020-08-20)
exporter\exporter.go (4036, 2020-08-20)
exporter\exporter_test.go (2049, 2020-08-20)
exporter\indexstats_collector.go (3468, 2020-08-20)
exporter\indexstats_collector_test.go (4794, 2020-08-20)
exporter\metrics.go (10091, 2020-08-20)
exporter\metrics_test.go (5006, 2020-08-20)
exporter\replset_status_collector.go (1898, 2020-08-20)
exporter\replset_status_collector_test.go (2831, 2020-08-20)
exporter\serverstatus_collector.go (1646, 2020-08-20)
exporter\serverstatus_collector_test.go (2310, 2020-08-20)
exporter\testdata (0, 2020-08-20)
exporter\testdata\locks.json (1440, 2020-08-20)
exporter\v1_compatibility.go (22427, 2020-08-20)
exporter\v1_compatibily_test.go (3610, 2020-08-20)
... ...

# MongoDB exporter This is the new MongoDB exporter implementation that handles ALL metrics exposed by MongoDB monitoring commands. This new implementation loops over all the fields exposed in diagnostic commands and tries to get data from them. Currently, these metric sources are implemented: - $collStats - $indexStats - getDiagnosticData - replSetGetStatus - serverStatus ## Flags |Flag|Description|Example| |-----|-----|-----| |-h, \-\-help|Show context-sensitive help|| |\-\-compatible-mode|Exposes new metrics in the new and old format at the same time|| |\-\-mongodb.collstats-colls|List of comma separated databases.collections to get stats|\-\-mongodb.collstats-colls=testdb.testcol1,testdb.testcol2| |\-\-mongodb.indexstats-colls|List of comma separated database.collections to get index stats|\-\-mongodb.indexstats-colls=db1.col1,db1.col2| |\-\-mongodb.dsn|MongoDB connection URI|\-\-mongodb.dsn=mongodb://user:pass@127.0.0.1:27017/admin?ssl=true| |\-\-expose-path|Metrics expose path|\-\-expose-path=/metrics_new| |\-\-expose-port|HTTP expose server port|\-\-expose-port=9216| |-D, --debug|Enable debug mode|| |--version|Show version and exit| ### Build the exporter The build process uses the dockerized version of goreleaser so you don't need to install Go. Just run `make build` and the new binaries will be generated under the build directory. ``` ├── build │ ├── config.yaml │ ├── mnogo_exporter_7c73946_checksums.txt │ ├── mnogo_exporter-7c73946.darwin-amd***.tar.gz │ ├── mnogo_exporter-7c73946.linux-amd***.tar.gz │ ├── mnogo_exporter_darwin_amd*** │ │ └── mnogo_exporter <--- MacOS binary │ └── mnogo_exporter_linux_amd*** │ └── mnogo_exporter <--- Linux binary ``` ### Build the exporter The build process uses the dockerized version of goreleaser so you don't need to install Go. Just run `make build` and the new binaries will be generated under the build directory. ``` ├── build │ ├── config.yaml │ ├── mnogo_exporter_7c73946_checksums.txt │ ├── mnogo_exporter-7c73946.darwin-amd***.tar.gz │ ├── mnogo_exporter-7c73946.linux-amd***.tar.gz │ ├── mnogo_exporter_darwin_amd*** │ │ └── mnogo_exporter <--- MacOS binary │ └── mnogo_exporter_linux_amd*** │ └── mnogo_exporter <--- Linux binary ``` ### Running the exporter If you built the exporter using the method mentioned in the previous section, the generated binaries are in `mnogo_exporter_linux_amd***/mnogo_exporter` or `mnogo_exporter_darwin_amd***/mnogo_exporter` #### Example ``` mnogo_exporter_linux_amd***/mnogo_exporter --mongodbdsn=mongodb://127.0.0.1:17001 ``` #### Enabling collstats metrics gathering `--mongodb.collstats-colls` receives a list of databases and collections to monitor using collstats. Usage example: `--mongodb.collstats-colls=database1.collection1,database2.collection2` ``` mnogo_exporter_linux_amd***/mnogo_exporter --mongodbdsn=mongodb://127.0.0.1:17001 --mongodb.collstats-colls=db1.c1,db2.c2 ``` #### Enabling compatibility mode. When compatibility mode is enabled by the `--compatible-mode`, the exporter will expose all new metrics with the new naming and labeling schema and at the same time will expose metrics in the version 1 compatible way. For example, if compatibility mode is enabled, the metric `mongodb_ss_wt_log_log_bytes_written` (new format) ``` # HELP mongodb_ss_wt_log_log_bytes_written serverStatus.wiredTiger.log. # TYPE mongodb_ss_wt_log_log_bytes_written untyped mongodb_ss_wt_log_log_bytes_written 2.6208e+06 ``` will be also exposed as `mongodb_mongod_wiredtiger_log_bytes_total` with the `unwritten` label. ``` HELP mongodb_mongod_wiredtiger_log_bytes_total mongodb_mongod_wiredtiger_log_bytes_total # TYPE mongodb_mongod_wiredtiger_log_bytes_total untyped mongodb_mongod_wiredtiger_log_bytes_total{type="unwritten"} 2.6208e+06 ```

近期下载者

相关文件


收藏者