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

Pass cacert file with the correct type to the elasticsearch loader #6678

Merged
merged 3 commits into from
Apr 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ https://github.com/elastic/beats/compare/v5.6.8...5.6[Check the HEAD diff]

*Affecting all Beats*

- Fix a type issue when specifying certicate authority when using the `import_dashboards` command. {pull}6678[6678]

*Filebeat*

*Heartbeat*
Expand Down
2 changes: 1 addition & 1 deletion libbeat/dashboards/import_dashboards.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func ImportDashboards() error {
}

if len(cl.opt.CertificateAuthority) > 0 {
tlsConfig["certificate_authorities"] = fmt.Sprintf("[%s]", cl.opt.CertificateAuthority)
tlsConfig["certificate_authorities"] = []string{cl.opt.CertificateAuthority}
}

if len(tlsConfig) > 0 {
Expand Down
7 changes: 6 additions & 1 deletion libbeat/outputs/elasticsearch/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"sync"
"time"

"github.com/joeshaw/multierror"

"github.com/elastic/beats/libbeat/common"
"github.com/elastic/beats/libbeat/common/op"
"github.com/elastic/beats/libbeat/logp"
Expand Down Expand Up @@ -82,15 +84,18 @@ func NewConnectedClient(cfg *common.Config) (*Client, error) {
return nil, err
}

var errs multierror.Errors

for _, client := range clients {
err = client.Connect(client.timeout)
if err != nil {
logp.Err("Error connecting to Elasticsearch: %s", client.Connection.URL)
errs = append(errs, err)
continue
}
return &client, nil
}
return nil, fmt.Errorf("Couldn't connect to any of the configured Elasticsearch hosts")
return nil, fmt.Errorf("Couldn't connect to any of the configured Elasticsearch hosts, errors: %v", errs.Err())
}

// NewElasticsearchClients returns a list of Elasticsearch clients based on the given
Expand Down
4 changes: 2 additions & 2 deletions metricbeat/module/prometheus/_meta/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM prom/prometheus

FROM prom/prometheus:v1.5.1
HEALTHCHECK --interval=1s --retries=90 CMD nc -w 1 localhost 9090 </dev/null
EXPOSE 9090
2 changes: 1 addition & 1 deletion testing/environments/args.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ services:
build:
args:
DOWNLOAD_URL: https://snapshots.elastic.co/downloads
ELASTIC_VERSION: 5.6.8-SNAPSHOT
ELASTIC_VERSION: 5.6.9-SNAPSHOT
2 changes: 1 addition & 1 deletion testing/environments/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
context: docker/logstash
dockerfile: Dockerfile
args:
ELASTIC_VERSION: 5.4.1
ELASTIC_VERSION: 5.6.8
DOWNLOAD_URL: https://artifacts.elastic.co/downloads
environment:
- ES_HOST=elasticsearch
Expand Down