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

Metricbeat: Set guest as default user in RabbitMQ module #7107

Merged
merged 1 commit into from
May 24, 2018

Conversation

jsoriano
Copy link
Member

Follow-up of #6908 (comment)

@jsoriano jsoriano added in progress Pull request is currently in progress. module Metricbeat Metricbeat labels May 15, 2018
@jsoriano jsoriano force-pushed the rabbitmq-default-user-password branch from e69969e to fb74904 Compare May 15, 2018 15:18
@jsoriano jsoriano added review and removed in progress Pull request is currently in progress. labels May 15, 2018
@jsoriano jsoriano force-pushed the rabbitmq-default-user-password branch from fb74904 to e910764 Compare May 15, 2018 15:19
Copy link
Contributor

@exekias exekias left a comment

Choose a reason for hiding this comment

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

LGTM, I left a minor comment

@@ -37,13 +39,17 @@ func (b URLHostParserBuilder) Build() mb.HostParser {
if !ok {
return mb.HostData{}, errors.Errorf("'username' config for module %v is not a string", module.Name())
}
} else {
user = b.DefaultUsername
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering why map[string]interface{} is used here instead of a tagged struct. That would ensure types and allows defaults. This method was not introduced by this PR I would say we can live with this as it is, unless you want to improve it.

Copy link
Member Author

@jsoriano jsoriano May 16, 2018

Choose a reason for hiding this comment

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

By now I'd prefer to leave it as is, but I agree that some improvements are possible in this package.

@@ -236,6 +236,7 @@ https://github.com/elastic/beats/compare/v6.2.3...master[Check the HEAD diff]
- Add Elasticsearch index_summary metricset. {pull}6918[6918]
- Add config option `management_path_prefix` for RabbitMQ module to configure management plugin path prefix {issue}6875[6875] {pull}7074[7074]
- Add shard metricset to Elasticsearch module. {pull}7006[7006]
- Set guest as default user in RabbitMQ module. {pull}7107[7107]
Copy link
Member

Choose a reason for hiding this comment

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

Sounds a bit like a breaking change. Or was it before a bug?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it is an enhancement for the out-of-the-box case, it can be breaking if someone has managed to setup the RabbitMQ endpoint without authentication, a very corner case if even possible.

If there are other authentication mechanisms configured in RabbitMQ, probably plain authentication headers are ignored, but not sure. I can try to test if this breaks this case.

@jsoriano jsoriano added the in progress Pull request is currently in progress. label May 16, 2018
@jsoriano
Copy link
Member Author

Please don't merge it by now, I want to test if we break other authentication methods by having these defaults.

@jsoriano
Copy link
Member Author

Data generation is broken here, I'll solve it after #7106

@jsoriano jsoriano removed the review label May 16, 2018
@jsoriano jsoriano force-pushed the rabbitmq-default-user-password branch from e910764 to 10a67e7 Compare May 23, 2018 19:22
@jsoriano jsoriano force-pushed the rabbitmq-default-user-password branch from 10a67e7 to ffe620f Compare May 23, 2018 19:28
@jsoriano
Copy link
Member Author

Ok, data generation works now as before.

@jsoriano jsoriano added review and removed in progress Pull request is currently in progress. labels May 23, 2018
@ruflin ruflin merged commit cad70d5 into elastic:master May 24, 2018
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.

3 participants