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

Adding HAProxy module #2384

Merged
merged 23 commits into from
Sep 8, 2016
Merged

Conversation

hartfordfive
Copy link
Contributor

@hartfordfive hartfordfive commented Aug 25, 2016

PR for issue #2247

@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run.

1 similar comment
@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run.

@@ -0,0 +1,10 @@
2016-08-10T19:06:01-04:00 INFO Metrics logging every 30s
Copy link
Member

Choose a reason for hiding this comment

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

The logs directory shuld not be commited. it is under .gitignore in the master branch

@andrewkroh
Copy link
Member

@hartfordfive Looks like you are off to a great start. Thanks for the contribution.

}

if parts[0] != "tcp" && parts[0] != "unix" {
return nil, errors.New("Invalid Protocol Scheme!")
Copy link
Member

Choose a reason for hiding this comment

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

@andrewkroh
Copy link
Member

I looked over the Golang code and left a few comments.

I didn't review the field names very closely to check if they conform to the event conventions, nor did I review the field documentation closely (maybe @dedemorton want to look at the docs, or maybe she prefers to edit them after they are merged).

@dedemorton
Copy link
Contributor

It's easier for me to edit the doc changes after they are merged. Please make sure you do a local doc build before the changes are merged to ensure that your contribution doesn't break the doc build. Many thanks!

@hartfordfive
Copy link
Contributor Author

I've applied most of the modifications for the comments you mentioned above @andrewkroh although i still have to look into the event conventions. @dedemorton as for the local doc build, where can I see some details regarding that procedure?

@andrewkroh
Copy link
Member

@hartfordfive Can you fix the merge conflicts. You probably need to rebase and address a few conflicts.

Once updated I can test it on Jenkins which will also do a doc build so you don't have to. But if you want to test locally, the command is make docs.

@hartfordfive
Copy link
Contributor Author

@andrewkroh I actually merged in the master and fixed the merge conflicts a few days ago. Should I do it again?

@hartfordfive
Copy link
Contributor Author

@andrewkroh Ok I've done a few other changes and also updated the index templates to follow the updated event conventions. Let me know how it looks.

@@ -43,4 +43,6 @@ metricbeat.modules:
period: 10s
processes: ['.*']

# if true, exports the CPU usage in ticks, together with the percentage values
Copy link
Member

Choose a reason for hiding this comment

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

Not sure how this change neded up in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe I got these changes when merging in the latest master the other day into my branch.

Copy link
Member

Choose a reason for hiding this comment

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

Does not seem to be in master: https://github.com/elastic/beats/blob/master/metricbeat/etc/beat.yml Could you run git checkout master metricbeat/etc/beat.yml ?

@ruflin
Copy link
Member

ruflin commented Sep 5, 2016

@hartfordfive Thanks for all the work on this one. I think there are still parts we can tweak in the field naming but for all the other modules we also had here multiple iteration. I left a few very minor comments. The most important one for me is that we mark it experimental. See here https://github.com/elastic/beats/blob/master/metricbeat/module/beats/filebeat/filebeat.go#L26 as an example. This will allow us to change fields and structure with follow up PR's without someone expecting that this is already stable. From my point of view it would be ok to merge it soonish and then go through the hole module again and tweak it in a separate PR. But lets also get @andrewkroh view on this.

@hartfordfive
Copy link
Contributor Author

@ruflin I've added the experimental warning messages as suggested.

@@ -65,13 +67,13 @@ func (m *MetricSet) Fetch() ([]common.MapStr, error) {

hapc, err := haproxy.NewHaproxyClient(m.statsAddr)
if err != nil {
return nil, fmt.Errorf(fmt.Sprintf("HAProxy Client error: %s", err))
return nil, fmt.Errorf("HAProxy Client error: %s", err)
Copy link
Member

Choose a reason for hiding this comment

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

errors.New would also work here. But that is a minor detail which can be tackled later.

@ruflin
Copy link
Member

ruflin commented Sep 6, 2016

@hartfordfive Thanks. Please check again my most recent comments above. I think it is important that we don't change our global defaults. Could be that these change happened sometimes during merging.

@ruflin ruflin merged commit de22fad into elastic:master Sep 8, 2016
@ruflin
Copy link
Member

ruflin commented Sep 8, 2016

@hartfordfive Merged. Thanks a lot for your contribution. I opened a follow up PR here to do some fixes like fixing the doc build: #2486

I also opened the github issue here to track some improvements that we have to do: #2485

@hartfordfive hartfordfive deleted the metricbeat-haproxy branch May 18, 2017 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement in progress Pull request is currently in progress. Metricbeat Metricbeat module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants