Commit a37fd3e
committed
MongoDB: Add cursor Metrics
Fixes: #3840
```
$ GOCACHE=off go test -v -tags=integration ./...
=== RUN TestAddNonReplStats
--- PASS: TestAddNonReplStats (0.00s)
=== RUN TestAddReplStats
--- PASS: TestAddReplStats (0.00s)
=== RUN TestAddWiredTigerStats
--- PASS: TestAddWiredTigerStats (0.00s)
=== RUN TestAddShardStats
--- PASS: TestAddShardStats (0.00s)
=== RUN TestAddShardHostStats
--- PASS: TestAddShardHostStats (0.00s)
=== RUN TestStateTag
--- PASS: TestStateTag (0.00s)
=== RUN TestGetDefaultTags
--- PASS: TestGetDefaultTags (0.00s)
=== RUN TestAddDefaultStats
--- PASS: TestAddDefaultStats (0.01s)
PASS
ok github.com/influxdata/telegraf/plugins/inputs/mongodb 0.012s
```
```
$ ./telegraf --config ~/tele-conf --test
> mongodb,host=foo,hostname=127.0.0.1:27017 active_reads=1i,active_writes=0i,commands_per_sec=4i,cursor_no_timeout=0i,cursor_pinned=0i,cursor_timed_out=0i,cursor_total=0i,deletes_per_sec=0i,flushes_per_sec=0i,getmores_per_sec=0i,inserts_per_sec=0i,jumbo_chunks=0i,net_in_bytes=639i,net_out_bytes=27185i,open_connections=2i,percent_cache_dirty=0,percent_cache_used=0,queries_per_sec=2i,queued_reads=0i,queued_writes=0i,resident_megabytes=66i,total_available=0i,total_created=0i,total_in_use=0i,total_refreshing=0i,ttl_deletes_per_sec=0i,ttl_passes_per_sec=0i,updates_per_sec=0i,vsize_megabytes=1013i,wtcache_app_threads_page_read_count=0i,wtcache_app_threads_page_read_time=0i,wtcache_app_threads_page_write_count=22i,wtcache_bytes_read_into=0i,wtcache_bytes_written_from=39880i,wtcache_current_bytes=39003i,wtcache_max_bytes_configured=7778336768i,wtcache_pages_evicted_by_app_thread=0i,wtcache_pages_queued_for_eviction=0i,wtcache_server_evicting_pages=0i,wtcache_tracked_dirty_bytes=0i,wtcache_worker_thread_evictingpages=0i 1525703381000000000
```1 parent d96bcac commit a37fd3e
File tree
4 files changed
+49
-5
lines changed- plugins/inputs/mongodb
4 files changed
+49
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
123 | | - | |
| 127 | + | |
124 | 128 | | |
125 | 129 | | |
126 | 130 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
211 | 215 | | |
212 | 216 | | |
213 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
214 | 222 | | |
215 | 223 | | |
216 | 224 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
| 293 | + | |
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| |||
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
301 | 315 | | |
302 | 316 | | |
303 | 317 | | |
| |||
439 | 453 | | |
440 | 454 | | |
441 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
442 | 460 | | |
443 | 461 | | |
444 | 462 | | |
| |||
582 | 600 | | |
583 | 601 | | |
584 | 602 | | |
585 | | - | |
586 | | - | |
587 | | - | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
588 | 616 | | |
589 | 617 | | |
590 | 618 | | |
| |||
0 commit comments