Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongodb plugin should output 2 measurements in test mode #336

Closed
9999dude opened this issue Nov 2, 2015 · 1 comment
Closed

Mongodb plugin should output 2 measurements in test mode #336

9999dude opened this issue Nov 2, 2015 · 1 comment
Labels
bug unexpected problem or unintended behavior

Comments

@9999dude
Copy link

9999dude commented Nov 2, 2015

Mongodb plugin is not returning any output since upgrade from 0.1.9 to 0.2.0. The operating system is Centos 6.5.

=========
# rpm -qa|grep telegraf
telegraf-0.1.9-1.x86_64

# /opt/telegraf/telegraf -config /etc/opt/telegraf/telegraf.conf -test -filter system:mongodb
map[influxdb:0x5256e0 kafka:0x5261e0 opentsdb:0x528420 amqp:0x521c50 datadog:0x523ec0]
OUTPUT ENABLED:  influxdb
* Plugin: mongodb Collection 1
* Plugin: mongodb Collection 2
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_commands_per_sec value=8
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_flushes_per_sec value=0
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_active_writes value=0
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_queries_per_sec value=4
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_updates_per_sec value=52
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_deletes_per_sec value=0
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_net_in_bytes value=12080
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_net_out_bytes value=30818
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_inserts_per_sec value=0
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_vsize_megabytes value=5806
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_resident_megabytes value=1993
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_queued_reads value=0
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_open_connections value=117
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_getmores_per_sec value=4
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_queued_writes value=0
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_active_reads value=1
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_repl_inserts_per_sec value=0
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_repl_queries_per_sec value=0
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_repl_updates_per_sec value=0
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_repl_deletes_per_sec value=0
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_repl_getmores_per_sec value=0
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_repl_commands_per_sec value=0
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_member_status value=PRI
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_percent_cache_dirty value=0.4
> [hostname="127.0.0.1:27017" state="PRI"] mongodb_percent_cache_used value=22.5
=========

# rpm -qa|grep telegraf
telegraf-0.2.0-1.x86_64

# /opt/telegraf/telegraf -config /etc/opt/telegraf/telegraf.conf -test -filter system:mongodb
* Plugin: mongodb, Collection 1
=========
@sparrc sparrc added the bug unexpected problem or unintended behavior label Nov 2, 2015
@sparrc
Copy link
Contributor

sparrc commented Nov 2, 2015

This is sort of expected behavior.

Since those values are "derived" metrics based on 2 measurements, they can only be output after taking two measurements. Currently only the cpu plugin takes 2 measurements in test mode, which is something I changed in version 0.2.0.

I will add a switch for outputting 2 measurements for mongodb plugin in test mode.

tldr this is only a problem of -test mode, if you run telegraf you will find it outputting measurements properly.

@sparrc sparrc changed the title Mongodb plugin broken since upgrade to telegraf 0.2.0 Mongodb plugin should output 2 measurements in test mode Nov 2, 2015
@sparrc sparrc closed this as completed in 422d240 Nov 3, 2015
allenj pushed a commit to allenj/telegraf that referenced this issue Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants