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

Make the OpenLDAP Input plugin gather all operations metrics #13158

Closed
mjs510 opened this issue Apr 27, 2023 · 4 comments · Fixed by #14092
Closed

Make the OpenLDAP Input plugin gather all operations metrics #13158

mjs510 opened this issue Apr 27, 2023 · 4 comments · Fixed by #14092
Assignees
Labels
feature request Requests for new plugin and for new features to existing plugins help wanted Request for community participation, code, contribution size/m 2-4 day effort

Comments

@mjs510
Copy link

mjs510 commented Apr 27, 2023

Use Case

I would like to be able to easily report totals for all LDAP operations that have taken place. This information is available in OpenLDAP's cn=monitor backend but the Telegraf OpenLDAP Input plugin does not gather the required metrics.

Expected behavior

When using the OpenLDAP input plugin, I would expect the monitorOpCompleted and monitorOpInitiated values to be gathered from cn=Operations,cn=monitor and converted into metrics.

Actual behavior

The information on total ops completed and total ops inititiated is not available in the gathered metrics. This information is present in cn=Operations,cn=monitor via its monitorOpCompleted and monitorOpInitiated attributes. The OpenLdap Input plugin gathers per-operation information from the children of cn=Operations,cn=monitor but does not collect the required attributes from the object itself.

Additional info

cn=Operations,cn=monitor has objectClass monitorContainer so is currently excluded from the query performed by the Input plugin.

Some other monitorContainer objects also provide information directly via their main entry. For example, cn=Overlays,cn=monitor reports the available overlays in its monitoredInfo attribute.

@mjs510 mjs510 added the feature request Requests for new plugin and for new features to existing plugins label Apr 27, 2023
@powersj
Copy link
Contributor

powersj commented Apr 27, 2023

The OpenLdap Input plugin gathers per-operation information from the children of cn=Operations,cn=monitor but does not collect the required attributes from the object itself.

You seem to understand the layout in OpenLDAP. Is this a second search that has to occur? Do you understand enough to make the change to collect these values?

@powersj powersj added the waiting for response waiting for response from contributor label Apr 27, 2023
@mjs510
Copy link
Author

mjs510 commented Apr 28, 2023

These could probably be gathered with a second search or by modifying the current search to include the monitorContainer objectClass and then making the necessary changes to the existing logic to handle this.

I will create a PR for this if I'm able but in the meantime I just want to make sure this issue is captured as clearly as possible.

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Apr 28, 2023
@powersj powersj added help wanted Request for community participation, code, contribution size/m 2-4 day effort labels Apr 28, 2023
@srebhan srebhan self-assigned this Sep 26, 2023
@srebhan
Copy link
Member

srebhan commented Oct 11, 2023

@mjs510 can you please test the binary in PR #14092 available once CI finished all tests successfully! You need to use the ldap input plugin (with dialect = "openldap") instead of the openldap one.
Let me know if this fixes your issue!

@mjs510
Copy link
Author

mjs510 commented Oct 12, 2023

@mjs510 can you please test the binary in PR #14092 available once CI finished all tests successfully! You need to use the ldap input plugin (with dialect = "openldap") instead of the openldap one. Let me know if this fixes your issue!

@srebhan Many thanks but I'm not able to do this at present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins help wanted Request for community participation, code, contribution size/m 2-4 day effort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants