-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mongodb readme and examples closes #1039
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Telegraf plugin: MongoDB | ||
|
||
#### Configuration | ||
|
||
```toml | ||
[[inputs.mongodb]] | ||
## An array of URI to gather stats about. Specify an ip or hostname | ||
## with optional port add password. ie, | ||
## mongodb://user:auth_key@10.10.3.30:27017, | ||
## mongodb://10.10.3.33:18832, | ||
## 10.0.0.1:10000, etc. | ||
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 | ||
|
||
``` | ||
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 | ||
|
||
|
||
|