Skip to content

export default kibana client config#16042

Merged
graphaelli merged 4 commits intoelastic:masterfrom
graphaelli:export-default-kibana-config
Feb 5, 2020
Merged

export default kibana client config#16042
graphaelli merged 4 commits intoelastic:masterfrom
graphaelli:export-default-kibana-config

Conversation

@graphaelli
Copy link
Copy Markdown
Member

What does this PR do?

Exports DefaultClientConfig, to be used by beats framework users.

@graphaelli
Copy link
Copy Markdown
Member Author

Test failure seems to be due to a flaky test:

21:10:11         --- FAIL: TestAll/kubernetes.state_deployment/ksm-v1.8.0.plain (12.85s)
21:10:11             testdata.go:272: Event was not expected: {"error":{"message":"decoding of metric family failed: net/http: request canceled (Client.Timeout exceeded while reading body)"},"event":{"dataset":"kubernetes.state_deployment","duration":115000,"module":"kubernetes"},"metricset":{"name":"state_deployment","period":10000},"service":{"address":"127.0.0.1:55555","type":"kubernetes"}}

@graphaelli graphaelli requested a review from a team February 3, 2020 22:06
@graphaelli
Copy link
Copy Markdown
Member Author

graphaelli commented Feb 4, 2020

on the travis side:

/usr/local/bin/docker-compose: line 1: !DOCTYPE: No such file or directory
 No such file or directory
/usr/local/bin/docker-compose: line 3: $'\r': command not found
/usr/local/bin/docker-compose: line 4: Hello: command not found
/usr/local/bin/docker-compose: line 6: $'\r': command not found
/usr/local/bin/docker-compose: line 84: syntax error near unexpected token `)'

` H��t����H���5�_ �%�_ ��@�%�_ h������%�_ h�������%�_ h�������%�_ h�������%�_ h�������%�_ h�������%�_ h�������%�_ h��p����%�_ �`����%�_ h	�P����%�_ h'

make: *** [build-image] Error 2
make: Leaving directory `/home/travis/gopath/src/github.com/elastic/beats/metricbeat'

@graphaelli
Copy link
Copy Markdown
Member Author

Different tests failed (only on windows) after merging master back in - they seem to be unrelated to these changes.

var (
defaultClientConfig = ClientConfig{
// DefaultClientConfig connects to a locally running kibana over HTTP
func DefaultClientConfig() *ClientConfig {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Let's return default configs by value. We do so in most places (or should) that construct a default configuration. Just by judging from the function interface returning by value tells you that the value all belongs to you and can be freely modified without worries.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sounds good, i'll make that change now

@graphaelli graphaelli merged commit 95a7e10 into elastic:master Feb 5, 2020
@graphaelli graphaelli deleted the export-default-kibana-config branch February 5, 2020 18:06
@urso urso added libbeat needs_backport PR is waiting to be backported to other branches. labels Feb 5, 2020
graphaelli added a commit to graphaelli/beats that referenced this pull request Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement libbeat needs_backport PR is waiting to be backported to other branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants