diff --git a/plugins/inputs/mongodb/README.md b/plugins/inputs/mongodb/README.md index c4c308f2f..e831d6418 100644 --- a/plugins/inputs/mongodb/README.md +++ b/plugins/inputs/mongodb/README.md @@ -69,6 +69,7 @@ Error in input [mongodb]: not authorized on admin to execute command { serverSta - repl_lag (integer) - repl_queries_per_sec (integer) - repl_updates_per_sec (integer) + - repl_oplog_window_sec (integer) - resident_megabytes (integer) - state (string) - total_available (integer) @@ -92,35 +93,6 @@ Error in input [mongodb]: not authorized on admin to execute command { serverSta - wtcache_tracked_dirty_bytes (integer) - wtcache_worker_thread_evictingpages (integer) -The telegraf plugin collects mongodb stats exposed by serverStatus and few more -and create a single measurement containing values e.g. - * active_reads - * active_writes - * commands_per_sec - * deletes_per_sec - * flushes_per_sec - * getmores_per_sec - * inserts_per_sec - * net_in_bytes - * net_out_bytes - * open_connections - * percent_cache_dirty - * percent_cache_used - * queries_per_sec - * queued_reads - * queued_writes - * resident_megabytes - * updates_per_sec - * vsize_megabytes - * total_in_use - * total_available - * total_created - * total_refreshing - * ttl_deletes_per_sec - * ttl_passes_per_sec - * repl_lag - * repl_oplog_window_s - * jumbo_chunks (only if mongos or mongo config) - mongodb_db_stats - tags: - db_name diff --git a/plugins/inputs/mongodb/mongodb_data.go b/plugins/inputs/mongodb/mongodb_data.go index 2c45f7ea2..17d49b1c7 100644 --- a/plugins/inputs/mongodb/mongodb_data.go +++ b/plugins/inputs/mongodb/mongodb_data.go @@ -60,7 +60,7 @@ var DefaultReplStats = map[string]string{ "member_status": "NodeType", "state": "NodeState", "repl_lag": "ReplLag", - "repl_oplog_window_s": "OplogTimeDiff", + "repl_oplog_window_sec": "OplogTimeDiff", } var DefaultClusterStats = map[string]string{ diff --git a/plugins/inputs/mongodb/mongodb_data_test.go b/plugins/inputs/mongodb/mongodb_data_test.go index e51b4e404..79a9a6c59 100644 --- a/plugins/inputs/mongodb/mongodb_data_test.go +++ b/plugins/inputs/mongodb/mongodb_data_test.go @@ -162,7 +162,7 @@ func TestStateTag(t *testing.T) { "repl_queries_per_sec": int64(0), "repl_updates_per_sec": int64(0), "repl_lag": int64(0), - "repl_oplog_window_s": int64(0), + "repl_oplog_window_sec": int64(0), "resident_megabytes": int64(0), "updates_per_sec": int64(0), "vsize_megabytes": int64(0),