diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index f67ad53b404a..478227491496 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -103,8 +103,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Fix mapping for kubernetes.labels and kubernetes.annotations in add_kubernetes_metadata. {issue}12638[12638] {pull}13226[13226] - Fix case insensitive regular expressions not working correctly. {pull}13250[13250] - Disable `add_kubernetes_metadata` if no matchers found. {pull}13709[13709] +- Better wording for xpack beats when the _xpack endpoint is not reachable. {pull}13771[13771] - Recover from panics in the javascript process and log details about the failure to aid in future debugging. {pull}13690[13690] - *Auditbeat* - Process dataset: Fixed a memory leak under Windows. {pull}12100[12100] diff --git a/x-pack/libbeat/licenser/es_callback.go b/x-pack/libbeat/licenser/es_callback.go index f2e44d039aa0..d8bd96296352 100644 --- a/x-pack/libbeat/licenser/es_callback.go +++ b/x-pack/libbeat/licenser/es_callback.go @@ -6,6 +6,7 @@ package licenser import ( "fmt" + "strings" "github.com/pkg/errors" @@ -16,12 +17,16 @@ import ( // Enforce setups the corresponding callbacks in libbeat to verify the license on the // remote elasticsearch cluster. func Enforce(log *logp.Logger, name string, checks ...CheckFunc) { + name = strings.Title(name) + cb := func(client *elasticsearch.Client) error { fetcher := NewElasticFetcher(client) license, err := fetcher.Fetch() if err != nil { - return errors.Wrapf(err, "cannot retrieve the elasticsearch license") + return errors.Wrapf(err, "cannot retrieve the elasticsearch license from the /_xpack endpoint, "+ + "%s requires the default distribution of Elasticsearch. Please make the endpoint accessible "+ + "to %s so it can verify the license.", name, name) } if license == OSSLicense {