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

Fix typo. Make the environment variable MONGODB_URL not MONGODB_URI #113

Closed
wants to merge 1 commit into from

Conversation

bramblek1
Copy link

Despite the flag being called mongodb.uri, the documentation and the default
value of mongdb.uri refer to the env var MONGODB_URL

When overriding this prior to creating a test connection , the value of os.GetEnv("MONGODB_URI") is used to override.

In the scenario where you've got mongodb_exporter being launched with a flag for the mongdb.uri AND you're overriding that with MONGODB_URL in the environment. Results are confusing.

Despite the flag being called mongodb.uri, the documentation and the default
value of mongdb.uri refer to the env var MONGODB_URL
@CLAassistant
Copy link

CLAassistant commented Jul 10, 2018

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Jul 10, 2018

Codecov Report

Merging #113 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #113   +/-   ##
=======================================
  Coverage   28.92%   28.92%           
=======================================
  Files          42       42           
  Lines        2254     2254           
=======================================
  Hits          652      652           
  Misses       1564     1564           
  Partials       38       38
Impacted Files Coverage Δ
mongodb_exporter.go 3.5% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d901f91...8c99311. Read the comment docs.

Copy link

@arvenil arvenil left a comment

Choose a reason for hiding this comment

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

Hi @bramblek1
Thank you for your contribution. This sadly goes on hold. The problem is this exporter is part of PMM and PMM uses MONGODB_URI instead. Looks like old error we need to fix but it will need to wait until we fix it also in PMM, which may take some time as we need to keep also backward compatibility. In the meantime you can use MONGODB_URI instead. I've also filled upstream bug report to clarify this dcu/mongodb_exporter#108.

@AlekSi
Copy link
Contributor

AlekSi commented Nov 15, 2018

We will use URI instead of URL everywhere.

@AlekSi AlekSi closed this Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants