From f8cd4b209e9068b3dfbf68fe5dbbe0852d758565 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 21:52:00 +0000 Subject: [PATCH 1/2] chore: Update snapshot.yml (#40248) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made with ❤️️ by updatecli Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- testing/environments/snapshot.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/environments/snapshot.yml b/testing/environments/snapshot.yml index e1c9dbc30dcf..b86b15ba2fc8 100644 --- a/testing/environments/snapshot.yml +++ b/testing/environments/snapshot.yml @@ -3,7 +3,7 @@ version: '2.3' services: elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:8.16.0-892b6545-SNAPSHOT + image: docker.elastic.co/elasticsearch/elasticsearch:8.16.0-a89b9a37-SNAPSHOT # When extend is used it merges healthcheck.tests, see: # https://github.com/docker/compose/issues/8962 # healthcheck: @@ -31,7 +31,7 @@ services: - "./docker/elasticsearch/users_roles:/usr/share/elasticsearch/config/users_roles" logstash: - image: docker.elastic.co/logstash/logstash:8.16.0-892b6545-SNAPSHOT + image: docker.elastic.co/logstash/logstash:8.16.0-a89b9a37-SNAPSHOT healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9600/_node/stats"] retries: 600 @@ -44,7 +44,7 @@ services: - 5055:5055 kibana: - image: docker.elastic.co/kibana/kibana:8.16.0-892b6545-SNAPSHOT + image: docker.elastic.co/kibana/kibana:8.16.0-a89b9a37-SNAPSHOT environment: - "ELASTICSEARCH_USERNAME=kibana_system_user" - "ELASTICSEARCH_PASSWORD=testing" From 1a6318d215517feb4c5c880619db8589d926956b Mon Sep 17 00:00:00 2001 From: Maurizio Branca Date: Tue, 16 Jul 2024 00:35:55 +0200 Subject: [PATCH 2/2] Fix missing metric definitions log message (#40226) --- x-pack/metricbeat/module/azure/monitor/client_helper.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/x-pack/metricbeat/module/azure/monitor/client_helper.go b/x-pack/metricbeat/module/azure/monitor/client_helper.go index 5fa5b9964e67..4413cc6e692e 100644 --- a/x-pack/metricbeat/module/azure/monitor/client_helper.go +++ b/x-pack/metricbeat/module/azure/monitor/client_helper.go @@ -15,7 +15,7 @@ import ( "github.com/elastic/beats/v7/x-pack/metricbeat/module/azure" ) -const missingNamespace = "no metric definitions were found for resource %s and namespace %s. Verify if the namespace is spelled correctly or if it is supported by the resource in case." +const missingMetricDefinitions = "no metric definitions were found for resource %s and namespace %s. Verify if the namespace is spelled correctly or if it is supported by the resource in case" // mapMetrics should validate and map the metric related configuration to relevant azure monitor api parameters func mapMetrics(client *azure.Client, resources []*armresources.GenericResourceExpanded, resourceConfig azure.ResourceConfig) ([]azure.Metric, error) { @@ -42,10 +42,11 @@ func mapMetrics(client *azure.Client, resources []*armresources.GenericResourceE if len(metricDefinitions.Value) == 0 { if metric.IgnoreUnsupported { - client.Log.Infof(missingNamespace, *resource.ID, metric.Namespace) + client.Log.Infof(missingMetricDefinitions, *resource.ID, metric.Namespace) continue } - return nil, fmt.Errorf("%s %s %s", missingNamespace, *resource.ID, metric.Namespace) + + return nil, fmt.Errorf(missingMetricDefinitions, *resource.ID, metric.Namespace) } // validate metric names and filter on the supported metrics