telegraf/plugins/inputs/mongodb
Shahzheeb Khan 49c9e77222 Update README.md 2016-04-13 22:13:56 -04:00
..
README.md Update README.md 2016-04-13 22:13:56 -04:00
mongodb.go Use timeout smaller than 10 seconds 2016-04-04 16:10:23 -06:00
mongodb_data.go Create public models for telegraf metrics, accumlator, plugins 2016-01-27 15:42:50 -07:00
mongodb_data_test.go Fix issue 524 2016-01-20 10:57:35 -08:00
mongodb_server.go Create public models for telegraf metrics, accumlator, plugins 2016-01-27 15:42:50 -07:00
mongodb_server_test.go Fix issue 524 2016-01-20 10:57:35 -08:00
mongodb_test.go Use timeout smaller than 10 seconds 2016-04-04 16:10:23 -06:00
mongostat.go renaming plugins -> inputs 2016-01-07 15:04:30 -07:00

README.md

Telegraf plugin: MongoDB

Configuration

[[inputs.mongodb]]
  servers = ["127.0.0.1:27017"]

For authenticated mongodb istances use connection mongdb connection URI

[[inputs.mongodb]]
  servers = ["mongodb://myuser:mypassword@myinstance.telegraf.com:27601/mydatabasename?authMechanism=PLAIN&authSource=$external"]

This connection uri may be different based on your environement and mongodb setup. If the user doesn't have the required priviliges to execute serverStatus command the you will get this error on telegraf

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