Skip to content

Commit

Permalink
Merge branch 'main' into feat/standard-uuid-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
kruskall authored Jul 15, 2024
2 parents 9436142 + 1a6318d commit ce1af44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions testing/environments/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down
7 changes: 4 additions & 3 deletions x-pack/metricbeat/module/azure/monitor/client_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down

0 comments on commit ce1af44

Please sign in to comment.