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

serve metrics handler with prometheus exporter-toolkit #393

Merged
merged 4 commits into from
Jan 7, 2022

Conversation

rlankfo
Copy link
Contributor

@rlankfo rlankfo commented Dec 13, 2021

This PR serves the metrics handler utilizing prometheus/exporter-toolkit instead of percona/exporter_shared. This is a start towards fixing #319, at least partially, however this does not remove all references to exporter_shared.

Note that TLS Config still needs to be handled by adding an option to pass the tlsConfigPath.

  • Links to other linked pull requests (optional).

  • Tests passed.
  • Fix conflicts with target branch.
  • Update jira ticket description if needed.
  • Attach screenshots/console output to confirm new behavior to jira ticket, if applicable.

Once all checks pass and the code is ready for review, please add pmm-review-exporters team as the reviewer. That would assign people from the review team automatically. Report any issues on our Forum or Discord.

@it-percona-cla
Copy link

it-percona-cla commented Dec 13, 2021

CLA assistant check
All committers have signed the CLA.

@denisok denisok requested review from a team, percona-csalguero and JiriCtvrtka and removed request for a team December 15, 2021 12:34
@denisok denisok added this to ToDo in Prometheus exporters and integration via automation Dec 15, 2021
@percona-csalguero
Copy link
Contributor

Hi,
Can you remove go-kit/log dependency. Since it is used only once, I think it is better to keep 3rd party dependencies at minimum.

Thanks.

exporter/exporter.go Outdated Show resolved Hide resolved
Prometheus exporters and integration automation moved this from ToDo to In Progress Dec 15, 2021
@percona-csalguero
Copy link
Contributor

I really appreciate this PR. Using exporter shared was preventing us to implement some other features like SSL support.
Thanks @rlankfo

@denisok
Copy link
Contributor

denisok commented Dec 27, 2021

@JiriCtvrtka please review

Copy link
Contributor

@JiriCtvrtka JiriCtvrtka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM only one minor comment.

@@ -6,3 +6,4 @@ bin
build
dist
mongodb_exporter
vendor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary since we dont have vendor folder anymore.

@denisok
Copy link
Contributor

denisok commented Jan 5, 2022

@percona-csalguero would test it a little bit more and merge it

@percona-csalguero percona-csalguero merged commit cb94884 into percona:main Jan 7, 2022
Prometheus exporters and integration automation moved this from In Progress to Done Jan 7, 2022
denisok pushed a commit that referenced this pull request Jan 11, 2022
percona-csalguero added a commit that referenced this pull request Jan 11, 2022
#393)" (#409)"

PR-393 was merged before we can use it properly from pmm-managed.
In order to make it work with basic auth, we need to implement the
changes in pmm-managed/mongodb exporter config to create a new file
having basic auth credentials.

This reverts commit 5e5bf25.
denisok pushed a commit that referenced this pull request Jan 11, 2022
#393)" (#409)" (#410)

PR-393 was merged before we can use it properly from pmm-managed.
In order to make it work with basic auth, we need to implement the
changes in pmm-managed/mongodb exporter config to create a new file
having basic auth credentials.

This reverts commit 5e5bf25.
percona-csalguero added a commit that referenced this pull request Jan 11, 2022
This is intended to be applied on top of #393 (the re-revert) and adds a
new parameter, the tls-config-path file that should be sent by
pmm-managed, pointing to a file containing the credentials we use to
enable basic auth.

In the original implementation, we use exporter_shared library which
receives basic auth credentials via env vars.
Now, using Prometheus Toolkit library, we need to pass a file.
@denisok denisok linked an issue Jan 27, 2022 that may be closed by this pull request
JiriCtvrtka pushed a commit that referenced this pull request Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

use prometheus exporter-toolkit lib instead of exporter_shared
5 participants