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

Hide auto-populated prometheus_url from config spec #8330

Merged
merged 1 commit into from
Jan 12, 2021

Conversation

florimondmanca
Copy link
Contributor

@florimondmanca florimondmanca commented Jan 12, 2021

What does this PR do?

Hide the prometheus_url option from Amazon MSK example config.

Motivation

Customer and SE were confused about this option being present and marked as "required", but they didn't know what to put there.

Turns out the option is irrelevant to the MSK check:

instance = self.instance.copy()
instance['prometheus_url'] = 'necessary for scraper creation'

The check iterates through MSK nodes returned by the AWS API, and auto-fills the prometheus_url for each:

for endpoint in broker_info['Endpoints']:
for (port, metrics_mapper, type_overrides) in self._exporter_data:
self._scraper_config['prometheus_url'] = '{}://{}:{}/metrics'.format(
self._endpoint_prefix, endpoint, port
)

As our test setup confirms, only cluster_arn is really required:

@pytest.fixture
def instance():
return {
'cluster_arn': 'arn:aws:kafka:us-east-1:1234567890:cluster/msk-integrate/9dabe192-8f48-4421-8b94-191780c69e1c',
'tags': ['test:msk'],
}

So we should drop prometheus_url from the docs.

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@florimondmanca florimondmanca merged commit 158d015 into master Jan 12, 2021
@florimondmanca florimondmanca deleted the fm/msk-prometheus-url-hide branch January 12, 2021 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants