Skip to content

Commit

Permalink
Merge pull request #651 from kongfei605/mongodb_update
Browse files Browse the repository at this point in the history
Mongodb update
  • Loading branch information
kongfei605 committed Sep 13, 2023
2 parents e85f697 + 57764a3 commit bf1809e
Show file tree
Hide file tree
Showing 22 changed files with 3,915 additions and 3,628 deletions.
22 changes: 4 additions & 18 deletions conf/input.mongodb/mongodb.toml
Expand Up @@ -6,15 +6,12 @@ log_level = "info"
labels = { instance="mongo-cluster-01" }

# mongodb dsn, see https://www.mongodb.com/docs/manual/reference/connection-string/
# mongodb_uri = "mongodb://127.0.0.1:27017"
mongodb_uri = ""
# mongodb_uri = "mongodb://admin:abcdef@127.0.0.1:27017/?connect=direct&authSource=admin&tlsinsecure=true"
# servers = ["mongodb://admin:1234@127.0.0.1:27017/?connect=direct&authSource=admin&tlsinsecure=true"]
# if you don't specify the username or password in the mongodb_uri, you can set here.
# This will overwrite the dsn, it would be helpful when special characters existing in the username or password and you don't want to encode them.
# NOTICE! this user must be granted enough rights to query needed stats, see ../inputs/mongodb/README.md
username = "username@Bj"
password = "password@Bj"
# if set to true, use the direct connection way
# direct_connect = true

# collect all means you collect all the metrics, if set, all below enable_xxx flags in this section will be ignored
collect_all = true
Expand All @@ -23,25 +20,14 @@ collect_all = true
# if set to true, collect getDiagnosticData metrics
# enable_diagnostic_data = true
# if set to true, collect replSetGetStatus metrics
# enable_replicaset_status = true
# enable_replicaset_status = false
# if set to true, collect top metrics by admin command
# enable_top_metrics = true
# if set to true, collect index metrics. You should specify one of the coll_stats_namespaces and the discovering_mode flags.
# enable_index_stats = true
# if set to true, collect collections metrics. You should specify one of the coll_stats_namespaces and the discovering_mode flags.
# enable_coll_stats = true

# Only get stats for the collections matching this list of namespaces. if none set, discovering_mode will be enabled.
# Example: db1.col1,db.col1
# coll_stats_namespaces = []
# Only get stats for index with the collections matching this list of namespaces.
# Example: db1.col1,db.col1
# index_stats_collections = []
# if set to true, replace -1 to DESC for label key_name of the descending_index metrics
# enable_override_descending_index = true

# which exposes metrics with 0.1x compatible metric names has been implemented which simplifies migration from the old version to the current version.
# compatible_mode = true


# [[instances]]
Expand All @@ -54,4 +40,4 @@ collect_all = true
# labels = { instance="mongo-cluster-02" }
# mongodb_uri = "mongodb://username:password@127.0.0.1:27017"
# collect_all = true
# compatible_mode = true
# compatible_mode = true
4 changes: 2 additions & 2 deletions inputs/mongodb/README.md
@@ -1,6 +1,6 @@
# mongodb

mongodb 监控采集插件,由mongodb-exporter(https://github.com/percona/mongodb_exporter)封装而来
mongodb 监控采集插件,v0.3.30开始从telegraf/mongodb fork而来,支持mongodb 3.6+版本

## Configuration

Expand Down Expand Up @@ -29,4 +29,4 @@ mongodb 监控采集插件,由mongodb-exporter(https://github.com/percona/mo

## 监控大盘和告警规则

同级目录下的 dashboard.json、alerts.json 可以直接导入夜莺使用
同级目录下的 dashboard.json、alerts.json 是大盘和告警规则, dashboard2.json 是v0.3.30版本以后的大盘

0 comments on commit bf1809e

Please sign in to comment.