From 88bf09c653f56b2e64b50a75618af2980e485adb Mon Sep 17 00:00:00 2001 From: Shahzheeb Khan Date: Fri, 15 Apr 2016 11:10:30 -0400 Subject: [PATCH] mongodb readme and examples mongodb readme and examples --- plugins/inputs/mongodb/README.md | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 plugins/inputs/mongodb/README.md diff --git a/plugins/inputs/mongodb/README.md b/plugins/inputs/mongodb/README.md new file mode 100644 index 000000000..a1c0abd94 --- /dev/null +++ b/plugins/inputs/mongodb/README.md @@ -0,0 +1,45 @@ +# Telegraf plugin: MongoDB + +#### Configuration + +```toml +[[inputs.mongodb]] + servers = ["127.0.0.1:27017"] +``` + +For authenticated mongodb istances use connection mongdb connection URI + +```toml +[[inputs.mongodb]] + servers = ["mongodb://username:password@10.XX.XX.XX:27101/mydatabase?authSource=admin"] +``` +This connection uri may be different based on your environement and mongodb setup. If the user doesn't have the required privilege to execute serverStatus command the you will get this error on telegraf + +```toml +Error in input [mongodb]: not authorized on admin to execute command { serverStatus: 1, recordStats: 0 } +``` + +#### Description + +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 + + +