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

issue#6992 - Add support for MDB database information #6993

Merged
merged 1 commit into from
Feb 13, 2020

Conversation

quanah
Copy link
Contributor

@quanah quanah commented Feb 6, 2020

Update the OpenLDAP plugin to be able to utilize the new information about the database state available in OpenLDAP 2.4.49 and later

Required for all PRs:

  • [X ] Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

Update the OpenLDAP plugin to be able to utilize the new information about the database state available in OpenLDAP 2.4.49 and later
@quanah
Copy link
Contributor Author

quanah commented Feb 7, 2020

Was going to add some other data, but realized it's not necessary... commits stabilized.

@danielnelson
Copy link
Contributor

Could you add a before/after with telegraf --input-filter=openldap --test?

@danielnelson danielnelson added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Feb 7, 2020
@quanah
Copy link
Contributor Author

quanah commented Feb 7, 2020

Original:

./telegraf.orig -config /etc/telegraf/telegraf.conf -input-filter openldap -test --debug
2020-02-07T19:45:37Z I! Starting Telegraf 1.13.3
2020-02-07T19:45:37Z D! [agent] Initializing plugins
> openldap,host=anvil3.rb.symas.net,port=389,server=localhost connections_current=1i,connections_max_file_descriptors=1024i,connections_total=6661i,databases_database_1=1005i,operations_abandon_completed=0i,operations_abandon_initiated=0i,operations_add_completed=0i,operations_add_initiated=0i,operations_bind_completed=21i,operations_bind_initiated=21i,operations_compare_completed=0i,operations_compare_initiated=0i,operations_delete_completed=0i,operations_delete_initiated=0i,operations_extended_completed=0i,operations_extended_initiated=0i,operations_modify_completed=0i,operations_modify_initiated=0i,operations_modrdn_completed=0i,operations_modrdn_initiated=0i,operations_search_completed=5660i,operations_search_initiated=5661i,operations_unbind_completed=23i,operations_unbind_initiated=23i,statistics_bytes=21584312i,statistics_entries=265515i,statistics_pdu=271195i,statistics_referrals=0i,threads_active=1i,threads_backload=1i,threads_max=16i,threads_max_pending=0i,threads_open=2i,threads_pending=0i,threads_starting=0i,time_uptime=157811i,waiters_read=1i,waiters_write=0i 1581104738000000000

After the changes:

2020-02-07T19:45:59Z I! Starting Telegraf
2020-02-07T19:45:59Z D! [agent] Initializing plugins
> openldap,host=anvil3.rb.symas.net,port=389,server=localhost connections_current=1i,connections_max_file_descriptors=1024i,connections_total=6663i,databases_database_1_mdb_entries=1005i,databases_database_1_mdb_pages_free=58i,databases_database_1_mdb_pages_max=262144i,databases_database_1_mdb_pages_used=629i,databases_database_1_mdb_readers_max=126i,databases_database_1_mdb_readers_used=2i,operations_abandon_completed=0i,operations_abandon_initiated=0i,operations_add_completed=0i,operations_add_initiated=0i,operations_bind_completed=21i,operations_bind_initiated=21i,operations_compare_completed=0i,operations_compare_initiated=0i,operations_delete_completed=0i,operations_delete_initiated=0i,operations_extended_completed=0i,operations_extended_initiated=0i,operations_modify_completed=0i,operations_modify_initiated=0i,operations_modrdn_completed=0i,operations_modrdn_initiated=0i,operations_search_completed=5662i,operations_search_initiated=5663i,operations_unbind_completed=23i,operations_unbind_initiated=23i,statistics_bytes=21591944i,statistics_entries=265609i,statistics_pdu=271291i,statistics_referrals=0i,threads_active=1i,threads_backload=1i,threads_max=16i,threads_max_pending=0i,threads_open=2i,threads_pending=0i,threads_starting=0i,time_uptime=157833i,waiters_read=1i,waiters_write=0i 1581104760000000000

Note the additional data about the MDB database

@quanah
Copy link
Contributor Author

quanah commented Feb 7, 2020

I would also note, that without this change, telegraf now generates the wrong information, specifically, the unmodified version has:

databases_database_1=1005i

Which in the patch version is correctly stored as:

databases_database_1_mdb_entries=1005i

@quanah
Copy link
Contributor Author

quanah commented Feb 7, 2020

Note: based on the above, this is actually a bug fix as well as an enhancement. ;)

@danielnelson danielnelson added this to the 1.14.0 milestone Feb 13, 2020
@danielnelson danielnelson merged commit e082c8d into influxdata:master Feb 13, 2020
@quanah
Copy link
Contributor Author

quanah commented Feb 13, 2020

TYVM!

@danielnelson
Copy link
Contributor

Thank you!

athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants