diff --git a/Dockerfile.windows b/Dockerfile.windows index d793d3850e..c235fac031 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -100,7 +100,79 @@ COPY submodules/fluent-bit /work/submodules/fluent-bit WORKDIR /work/submodules/fluent-bit/build -RUN cmake -G "'Visual Studio 16 2019'" -DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DFLB_OUT_KINESIS_STREAMS=OFF ../; +RUN cmake -G "'Visual Studio 16 2019'" -DCMAKE_BUILD_TYPE=RELWITHDEBINFO ` + -DFLB_WINDOWS_DEFAULTS=Off ` + -DFLB_REGEX=On ` + -DFLB_BACKTRACE=Off ` + -DFLB_CONFIG_YAML=Off ` + -DFLB_LUAJIT=On ` + -DFLB_EXAMPLES=On ` + -DFLB_PARSER=On ` + -DFLB_TLS=On ` + -DFLB_HTTP_SERVER=On ` + -DFLB_METRICS=On ` + -DFLB_WASM=Off ` + -DFLB_WAMRC=Off ` + -DFLB_IN_CPU=Off ` + -DFLB_IN_DISK=Off ` + -DFLB_IN_EXEC=On ` + -DFLB_IN_EXEC_WASI=Off ` + -DFLB_IN_FORWARD=On ` + -DFLB_IN_HEALTH=Off ` + -DFLB_IN_HTTP=On ` + -DFLB_IN_MEM=Off ` + -DFLB_IN_KAFKA=Off ` + -DFLB_IN_KMSG=Off ` + -DFLB_IN_LIB=On ` + -DFLB_IN_RANDOM=On ` + -DFLB_IN_SERIAL=Off ` + -DFLB_IN_STDIN=Off ` + -DFLB_IN_SYSLOG=On ` + -DFLB_IN_TAIL=On ` + -DFLB_IN_TCP=On ` + -DFLB_IN_MQTT=Off ` + -DFLB_IN_HEAD=Off ` + -DFLB_IN_PROC=Off ` + -DFLB_IN_SYSTEMD=Off ` + -DFLB_IN_DUMMY=On ` + -DFLB_IN_NETIF=Off ` + -DFLB_IN_WINLOG=On ` + -DFLB_IN_WINSTAT=On ` + -DFLB_IN_WINEVTLOG=On ` + -DFLB_IN_COLLECTD=Off ` + -DFLB_IN_STATSD=On ` + -DFLB_IN_STORAGE_BACKLOG=On ` + -DFLB_IN_EMITTER=On ` + -DFLB_IN_PODMAN_METRICS=Off ` + -DFLB_OUT_BIGQUERY=Off ` + -DFLB_OUT_COUNTER=On ` + -DFLB_OUT_EXIT=Off ` + -DFLB_OUT_FORWARD=On ` + -DFLB_OUT_GELF=On ` + -DFLB_OUT_HTTP=On ` + -DFLB_OUT_NATS=Off ` + -DFLB_OUT_PLOT=Off ` + -DFLB_OUT_FILE=On ` + -DFLB_OUT_TD=Off ` + -DFLB_OUT_RETRY=Off ` + -DFLB_OUT_STACKDRIVER=On ` + -DFLB_OUT_STDOUT=On ` + -DFLB_OUT_LIB=On ` + -DFLB_OUT_NULL=On ` + -DFLB_OUT_FLOWCOUNTER=On ` + -DFLB_OUT_KAFKA=Off ` + -DFLB_OUT_KAFKA_REST=Off ` + -DFLB_FILTER_GREP=On ` + -DFLB_FILTER_MODIFY=On ` + -DFLB_FILTER_STDOUT=On ` + -DFLB_FILTER_PARSER=On ` + -DFLB_FILTER_THROTTLE=On ` + -DFLB_FILTER_THROTTLE_SIZE=On ` + -DFLB_FILTER_NEST=On ` + -DFLB_FILTER_LUA=On ` + -DFLB_FILTER_RECORD_MODIFIER=On ` + -DFLB_FILTER_REWRITE_TAG=On ` + -DFLB_FILTER_WASM=Off ../; RUN cmake --build . --config Release; ` Copy-Item -Path bin/Release/fluent-bit.exe -Destination /work/out/bin/; ` @@ -136,7 +208,7 @@ WORKDIR /work/submodules/opentelemetry-operations-collector RUN $JarHash = (Get-FileHash /work/out/bin/opentelemetry-java-contrib-jmx-metrics.jar -Algorithm SHA256 | Select -Expand Hash).toLower(); ` go build -o bin/google-cloud-metrics-agent_windows_amd64.exe ` -ldflags \"-X github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver.MetricsGathererHash=$JarHash\" ` - ./cmd/otelopscol; ` + ./cmd/otelopscol; ` Copy-Item -Path bin/google-cloud-metrics-agent_windows_amd64.exe -Destination /work/out/bin/; ############################################################################### @@ -153,7 +225,7 @@ RUN Get-Content VERSION | Where-Object length | ForEach-Object { Invoke-Expressi go build -o bin/google-cloud-ops-agent.exe -ldflags \"-X github.com/GoogleCloudPlatform/ops-agent/internal/version.BuildDistro=$env:BUILD_DISTRO -X github.com/GoogleCloudPlatform/ops-agent/internal/version.Version=$env:PKG_VERSION\" ./cmd/ops_agent_windows; ` Copy-Item -Path bin/google-cloud-ops-agent.exe -Destination /work/out/bin/; ` Copy-Item -Path confgenerator/default-config.yaml -Destination /work/out/config/config.yaml; - + ############################################################################### # Build diagnostic service ############################################################################### diff --git a/VERSION b/VERSION index 72d25b3069..4e0abcdda7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -PKG_VERSION="2.50.0" +PKG_VERSION="2.51.0" diff --git a/integration_test/cmd/generate_expected_metrics/generate_expected_metrics.go b/integration_test/cmd/generate_expected_metrics/generate_expected_metrics.go index f6e5f933bb..a2bfa68a99 100644 --- a/integration_test/cmd/generate_expected_metrics/generate_expected_metrics.go +++ b/integration_test/cmd/generate_expected_metrics/generate_expected_metrics.go @@ -178,16 +178,21 @@ func getAppName(metricType string) string { // toExpectedMetric converts from metric.MetricDescriptor to ExpectedMetric. func toExpectedMetric(metric *metric.MetricDescriptor) *metadata.ExpectedMetric { - labels := make(map[string]string) + labels := make([]*metadata.MetricLabel, len(metric.Labels)) for _, l := range metric.Labels { - labels[l.Key] = ".*" + labels = append(labels, &metadata.MetricLabel{ + Name: l.Key, + ValueRegex: ".*", + }) } return &metadata.ExpectedMetric{ - Type: metric.Type, - Kind: metric.MetricKind.String(), - ValueType: metric.ValueType.String(), - MonitoredResource: "gce_instance", - Labels: labels, + MetricSpec: metadata.MetricSpec{ + Type: metric.Type, + Kind: metric.MetricKind.String(), + ValueType: metric.ValueType.String(), + MonitoredResources: []string{"gce_instance"}, + Labels: labels, + }, } } @@ -265,20 +270,25 @@ func updateMetric(toUpdate *metadata.ExpectedMetric, withValuesFrom *metadata.Ex result := toUpdate result.Kind = withValuesFrom.Kind result.ValueType = withValuesFrom.ValueType - result.MonitoredResource = withValuesFrom.MonitoredResource - result.Labels = make(map[string]string) + result.MonitoredResources = withValuesFrom.MonitoredResources + result.Labels = make([]*metadata.MetricLabel, len(withValuesFrom.Labels)) // TODO: Refactor to a simple map copy once we improve listMetrics to fetch // label patterns automatically. // The keys of result.Labels should be the same as withValuesFrom.Labels, // except that existing values/patterns are preserved. - for k, v := range withValuesFrom.Labels { - existingPattern, ok := toUpdate.Labels[k] + existingLabels := make(map[string]*metadata.MetricLabel) + for _, l := range toUpdate.Labels { + existingLabels[l.Name] = l + } + for _, l := range withValuesFrom.Labels { + existingLabel, ok := existingLabels[l.Name] if ok { - result.Labels[k] = existingPattern + // TODO: Merge the label specs. + result.Labels = append(result.Labels, existingLabel) } else { - result.Labels[k] = v + result.Labels = append(result.Labels, l) } } diff --git a/integration_test/metadata/integration_metadata.go b/integration_test/metadata/integration_metadata.go index b27dcd83e0..8d349999bd 100644 --- a/integration_test/metadata/integration_metadata.go +++ b/integration_test/metadata/integration_metadata.go @@ -26,21 +26,45 @@ import ( "go.uber.org/multierr" ) -// ExpectedMetric encodes a series of assertions about what data we expect -// to see in the metrics backend. -type ExpectedMetric struct { +// MetricLabel encodes a specification of a metric label in the metrics backend. +type MetricLabel struct { + // The label name, for example state. + Name string `yaml:"name" validate:"required"` + // The label value pattern, as an RE2 regular expression. + ValueRegex string `yaml:"value_regex" validate:"required"` + // The description of the label. + Description string `yaml:"description" validate:"excludesall=‘’“”"` + // Annotations/footnotes about the label. + Notes []string `yaml:"notes,omitempty" validate:"omitempty,unique"` +} + +// MetricSpec encodes a specification of a metric in the metrics backend. +type MetricSpec struct { // The metric type, for example workload.googleapis.com/apache.current_connections. Type string `yaml:"type" validate:"required"` // The value type, for example INT64. ValueType string `yaml:"value_type" validate:"required,oneof=BOOL INT64 DOUBLE STRING DISTRIBUTION"` // The kind, for example GAUGE. Kind string `yaml:"kind" validate:"required,oneof=GAUGE DELTA CUMULATIVE"` + // The unit of the metric. + Unit string `yaml:"unit"` + // The description of the metric. + Description string `yaml:"description" validate:"excludesall=‘’“”"` // The monitored resource, for example gce_instance. // Currently we only test with gce_instance. - MonitoredResource string `yaml:"monitored_resource" validate:"required,oneof=gce_instance"` - // Mapping of expected label keys to value patterns. - // Patterns are RE2 regular expressions. - Labels map[string]string `yaml:"labels,omitempty" validate:"omitempty,gt=0"` + MonitoredResources []string `yaml:"monitored_resources,flow" validate:"required,gt=0,dive,oneof=gce_instance"` + // Mapping of expected label keys to label specs. + Labels []*MetricLabel `yaml:"labels,omitempty" validate:"omitempty,gt=0,unique=Name,dive"` + // Annotations/footnotes about the metric. + Notes []string `yaml:"notes,omitempty" validate:"omitempty,unique"` +} + +// ExpectedMetric encodes a series of assertions about what data we expect +// to see in the metrics backend. +type ExpectedMetric struct { + // The metric being described. + MetricSpec `yaml:",inline"` + // If Optional is true, the test for this metric will be skipped. Optional bool `yaml:"optional,omitempty" validate:"excluded_with=Representative"` // Exactly one metric in each expected_metrics.yaml must @@ -63,11 +87,15 @@ type LogField struct { // A list of platforms that this field is not available on. // Examples: debian-11. UnavailableOn []string `yaml:"unavailable_on,omitempty"` + // Annotations/footnotes about the field. + Notes []string `yaml:"notes,omitempty" validate:"omitempty,unique"` } type ExpectedLog struct { LogName string `yaml:"log_name" validate:"required"` Fields []*LogField `yaml:"fields" validate:"required,unique=Name,dive"` + // Annotations/footnotes about the log. + Notes []string `yaml:"notes,omitempty" validate:"omitempty,unique"` } type MinimumSupportedAgentVersion struct { @@ -109,7 +137,7 @@ type IntegrationMetadata struct { Description string `yaml:"description" validate:"required,excludesall=‘’“”"` ConfigurationOptions *ConfigurationOptions `yaml:"configuration_options" validate:"required"` ConfigureIntegration string `yaml:"configure_integration"` - ExpectedLogs []*ExpectedLog `yaml:"expected_logs" validate:"dive"` + ExpectedLogs []*ExpectedLog `yaml:"expected_logs" validate:"unique=LogName,dive"` MinimumSupportedAgentVersion *MinimumSupportedAgentVersion `yaml:"minimum_supported_agent_version"` SupportedAppVersion []string `yaml:"supported_app_version" validate:"required,unique,min=1"` SupportedOperatingSystems string `yaml:"supported_operating_systems" validate:"required,oneof=linux windows linux_and_windows"` @@ -198,8 +226,8 @@ func AssertMetric(metric *ExpectedMetric, series *monitoringpb.TimeSeries) error if series.MetricKind.String() != metric.Kind { err = multierr.Append(err, fmt.Errorf("kind: expected %s but got %s", metric.Kind, series.MetricKind.String())) } - if series.Resource.Type != metric.MonitoredResource { - err = multierr.Append(err, fmt.Errorf("monitored_resource: expected %s but got %s", metric.MonitoredResource, series.Resource.Type)) + if !SliceContains(metric.MonitoredResources, series.Resource.Type) { + err = multierr.Append(err, fmt.Errorf("unexpected monitored_resource: expected %v but got %s", metric.MonitoredResources, series.Resource.Type)) } err = multierr.Append(err, assertMetricLabels(metric, series)) if err != nil { @@ -209,31 +237,35 @@ func AssertMetric(metric *ExpectedMetric, series *monitoringpb.TimeSeries) error } func assertMetricLabels(metric *ExpectedMetric, series *monitoringpb.TimeSeries) error { - // Only expected labels must be present var err error + // Only expected labels must be present + expectedLabels := make(map[string]bool) + for _, expectedLabel := range metric.Labels { + expectedLabels[expectedLabel.Name] = true + } for actualLabel, actualValue := range series.Metric.Labels { - if _, ok := metric.Labels[actualLabel]; !ok { + if !expectedLabels[actualLabel] { err = multierr.Append(err, fmt.Errorf("got unexpected label %q with value %q", actualLabel, actualValue)) } } // All expected labels must be present and match the given pattern - for expectedLabel, expectedPattern := range metric.Labels { - actualValue, ok := series.Metric.Labels[expectedLabel] + for _, expectedLabel := range metric.Labels { + actualValue, ok := series.Metric.Labels[expectedLabel.Name] if !ok { err = multierr.Append(err, fmt.Errorf("expected label not found: %s", expectedLabel)) continue } - match, matchErr := regexp.MatchString(fmt.Sprintf("^(?:%s)$", expectedPattern), actualValue) + match, matchErr := regexp.MatchString(fmt.Sprintf("^(?:%s)$", expectedLabel.ValueRegex), actualValue) if matchErr != nil { err = multierr.Append(err, fmt.Errorf("error parsing pattern. label=%s, pattern=%s, err=%v", - expectedLabel, - expectedPattern, + expectedLabel.Name, + expectedLabel.ValueRegex, matchErr, )) } else if !match { err = multierr.Append(err, fmt.Errorf("error: label value does not match pattern. label=%s, pattern=%s, value=%s", - expectedLabel, - expectedPattern, + expectedLabel.Name, + expectedLabel.ValueRegex, actualValue, )) } diff --git a/integration_test/metadata/testdata/configuration-options_metrics-configuration_required/golden_error b/integration_test/metadata/testdata/configuration-options_metrics-configuration_required/golden_error index 8f5d598cbf..5848b79446 100644 --- a/integration_test/metadata/testdata/configuration-options_metrics-configuration_required/golden_error +++ b/integration_test/metadata/testdata/configuration-options_metrics-configuration_required/golden_error @@ -1,2 +1,2 @@ -[43:8] Key: 'ConfigurationOptions.LogsConfiguration' Error:Field validation for 'LogsConfiguration' failed on the 'required_without' tag +[45:8] Key: 'ConfigurationOptions.LogsConfiguration' Error:Field validation for 'LogsConfiguration' failed on the 'required_without' tag Key: 'ConfigurationOptions.MetricsConfiguration' Error:Field validation for 'MetricsConfiguration' failed on the 'required_without' tag \ No newline at end of file diff --git a/integration_test/metadata/testdata/configuration-options_metrics-configuration_required/input.yaml b/integration_test/metadata/testdata/configuration-options_metrics-configuration_required/input.yaml index 9fa2c4714d..6a51765b89 100644 --- a/integration_test/metadata/testdata/configuration-options_metrics-configuration_required/input.yaml +++ b/integration_test/metadata/testdata/configuration-options_metrics-configuration_required/input.yaml @@ -26,10 +26,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true expected_logs: - log_name: examplelog diff --git a/integration_test/metadata/testdata/expected-metric_optional_excluded_with/golden_error b/integration_test/metadata/testdata/expected-metric_optional_excluded_with/golden_error index 586259645f..b6e6d457bc 100644 --- a/integration_test/metadata/testdata/expected-metric_optional_excluded_with/golden_error +++ b/integration_test/metadata/testdata/expected-metric_optional_excluded_with/golden_error @@ -1,2 +1,2 @@ -[37:15] Key: 'ExpectedMetric.Optional' Error:Field validation for 'Optional' failed on the 'excluded_with' tag +[39:15] Key: 'ExpectedMetric.Optional' Error:Field validation for 'Optional' failed on the 'excluded_with' tag Key: 'ExpectedMetric.Representative' Error:Field validation for 'Representative' failed on the 'excluded_with' tag \ No newline at end of file diff --git a/integration_test/metadata/testdata/expected-metric_optional_excluded_with/input.yaml b/integration_test/metadata/testdata/expected-metric_optional_excluded_with/input.yaml index 7252b16dc7..6e2d2a36a0 100644 --- a/integration_test/metadata/testdata/expected-metric_optional_excluded_with/input.yaml +++ b/integration_test/metadata/testdata/expected-metric_optional_excluded_with/input.yaml @@ -26,14 +26,16 @@ expected_metrics: - type: example.googleapis.com/example.example0 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* optional: true representative: true expected_logs: diff --git a/integration_test/metadata/testdata/expected-metric_value-type_one_of/golden_error b/integration_test/metadata/testdata/expected-metric_value-type_one_of/golden_error index 3a5b604d16..3c34ad392d 100644 --- a/integration_test/metadata/testdata/expected-metric_value-type_one_of/golden_error +++ b/integration_test/metadata/testdata/expected-metric_value-type_one_of/golden_error @@ -1 +1 @@ -[27:17] Key: 'ExpectedMetric.ValueType' Error:Field validation for 'ValueType' failed on the 'oneof' tag \ No newline at end of file +[27:17] Key: 'MetricSpec.ValueType' Error:Field validation for 'ValueType' failed on the 'oneof' tag \ No newline at end of file diff --git a/integration_test/metadata/testdata/expected-metric_value-type_one_of/input.yaml b/integration_test/metadata/testdata/expected-metric_value-type_one_of/input.yaml index 6bcf8fa37c..71fec74edc 100644 --- a/integration_test/metadata/testdata/expected-metric_value-type_one_of/input.yaml +++ b/integration_test/metadata/testdata/expected-metric_value-type_one_of/input.yaml @@ -26,10 +26,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: FOO kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true expected_logs: - log_name: examplelog diff --git a/integration_test/metadata/testdata/integration-metadata_app-url_not-a-url/input.yaml b/integration_test/metadata/testdata/integration-metadata_app-url_not-a-url/input.yaml index 85b6c7e3c4..d85d54d3a1 100644 --- a/integration_test/metadata/testdata/integration-metadata_app-url_not-a-url/input.yaml +++ b/integration_test/metadata/testdata/integration-metadata_app-url_not-a-url/input.yaml @@ -26,10 +26,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true expected_logs: - log_name: examplelog diff --git a/integration_test/metadata/testdata/integration-metadata_app-url_required/input.yaml b/integration_test/metadata/testdata/integration-metadata_app-url_required/input.yaml index 445227d2ac..766960494c 100644 --- a/integration_test/metadata/testdata/integration-metadata_app-url_required/input.yaml +++ b/integration_test/metadata/testdata/integration-metadata_app-url_required/input.yaml @@ -25,10 +25,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true expected_logs: - log_name: examplelog diff --git a/integration_test/metadata/testdata/integration-metadata_configuration-option-description_bad-quotes/golden_error b/integration_test/metadata/testdata/integration-metadata_configuration-option-description_bad-quotes/golden_error index 1c397244c2..7cc26677f0 100644 --- a/integration_test/metadata/testdata/integration-metadata_configuration-option-description_bad-quotes/golden_error +++ b/integration_test/metadata/testdata/integration-metadata_configuration-option-description_bad-quotes/golden_error @@ -1 +1 @@ -[46:24] Key: 'ConfigurationFields.Description' Error:Field validation for 'Description' failed on the 'excludesall' tag \ No newline at end of file +[48:24] Key: 'ConfigurationFields.Description' Error:Field validation for 'Description' failed on the 'excludesall' tag \ No newline at end of file diff --git a/integration_test/metadata/testdata/integration-metadata_configuration-option-description_bad-quotes/input.yaml b/integration_test/metadata/testdata/integration-metadata_configuration-option-description_bad-quotes/input.yaml index e2e554fece..bd8cebeefe 100644 --- a/integration_test/metadata/testdata/integration-metadata_configuration-option-description_bad-quotes/input.yaml +++ b/integration_test/metadata/testdata/integration-metadata_configuration-option-description_bad-quotes/input.yaml @@ -26,10 +26,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true expected_logs: - log_name: examplelog diff --git a/integration_test/metadata/testdata/integration-metadata_description_bad-quotes/input.yaml b/integration_test/metadata/testdata/integration-metadata_description_bad-quotes/input.yaml index 6c63b7c354..2241cb8ae4 100644 --- a/integration_test/metadata/testdata/integration-metadata_description_bad-quotes/input.yaml +++ b/integration_test/metadata/testdata/integration-metadata_description_bad-quotes/input.yaml @@ -26,10 +26,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true expected_logs: - log_name: examplelog diff --git a/integration_test/metadata/testdata/integration-metadata_expected-metric_onetrue_no_representative/input.yaml b/integration_test/metadata/testdata/integration-metadata_expected-metric_onetrue_no_representative/input.yaml index 18fbcd71b7..539593ed1d 100644 --- a/integration_test/metadata/testdata/integration-metadata_expected-metric_onetrue_no_representative/input.yaml +++ b/integration_test/metadata/testdata/integration-metadata_expected-metric_onetrue_no_representative/input.yaml @@ -26,10 +26,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* optional: true configuration_options: metrics: diff --git a/integration_test/metadata/testdata/integration-metadata_expected-metric_onetrue_two_representative/input.yaml b/integration_test/metadata/testdata/integration-metadata_expected-metric_onetrue_two_representative/input.yaml index d292f2e506..c9f58f4007 100644 --- a/integration_test/metadata/testdata/integration-metadata_expected-metric_onetrue_two_representative/input.yaml +++ b/integration_test/metadata/testdata/integration-metadata_expected-metric_onetrue_two_representative/input.yaml @@ -26,26 +26,32 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true - type: example.googleapis.com/example.example2 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true - type: example.googleapis.com/example.example3 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* optional: true configuration_options: metrics: diff --git a/integration_test/metadata/testdata/integration-metadata_expected-metrics-type_unique/input.yaml b/integration_test/metadata/testdata/integration-metadata_expected-metrics-type_unique/input.yaml index e2665f1000..44f568b208 100644 --- a/integration_test/metadata/testdata/integration-metadata_expected-metrics-type_unique/input.yaml +++ b/integration_test/metadata/testdata/integration-metadata_expected-metrics-type_unique/input.yaml @@ -26,12 +26,12 @@ expected_metrics: - type: example.googleapis.com/example.example0 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] representative: true - type: example.googleapis.com/example.example0 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] expected_logs: - log_name: examplelog fields: diff --git a/integration_test/metadata/testdata/integration-metadata_log-field-description_bad-quotes/golden_error b/integration_test/metadata/testdata/integration-metadata_log-field-description_bad-quotes/golden_error index aa1e9e561f..e1107487fb 100644 --- a/integration_test/metadata/testdata/integration-metadata_log-field-description_bad-quotes/golden_error +++ b/integration_test/metadata/testdata/integration-metadata_log-field-description_bad-quotes/golden_error @@ -1 +1 @@ -[40:22] Key: 'LogField.Description' Error:Field validation for 'Description' failed on the 'excludesall' tag \ No newline at end of file +[42:22] Key: 'LogField.Description' Error:Field validation for 'Description' failed on the 'excludesall' tag \ No newline at end of file diff --git a/integration_test/metadata/testdata/integration-metadata_log-field-description_bad-quotes/input.yaml b/integration_test/metadata/testdata/integration-metadata_log-field-description_bad-quotes/input.yaml index 618347c3b8..aff149cea1 100644 --- a/integration_test/metadata/testdata/integration-metadata_log-field-description_bad-quotes/input.yaml +++ b/integration_test/metadata/testdata/integration-metadata_log-field-description_bad-quotes/input.yaml @@ -26,10 +26,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true expected_logs: - log_name: examplelog diff --git a/integration_test/metadata/testdata/integration-metadata_long-name_bad-quotes/input.yaml b/integration_test/metadata/testdata/integration-metadata_long-name_bad-quotes/input.yaml index bfbb448132..1316403ab8 100644 --- a/integration_test/metadata/testdata/integration-metadata_long-name_bad-quotes/input.yaml +++ b/integration_test/metadata/testdata/integration-metadata_long-name_bad-quotes/input.yaml @@ -26,10 +26,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true expected_logs: - log_name: examplelog diff --git a/integration_test/metadata/testdata/integration-metadata_short-name_bad-quotes/input.yaml b/integration_test/metadata/testdata/integration-metadata_short-name_bad-quotes/input.yaml index ff4bde573c..a2836a1120 100644 --- a/integration_test/metadata/testdata/integration-metadata_short-name_bad-quotes/input.yaml +++ b/integration_test/metadata/testdata/integration-metadata_short-name_bad-quotes/input.yaml @@ -26,10 +26,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true expected_logs: - log_name: examplelog diff --git a/integration_test/metadata/testdata/integration-metadata_supported-app-version_unique/input.yaml b/integration_test/metadata/testdata/integration-metadata_supported-app-version_unique/input.yaml index 3056c86478..e8cd4166c6 100644 --- a/integration_test/metadata/testdata/integration-metadata_supported-app-version_unique/input.yaml +++ b/integration_test/metadata/testdata/integration-metadata_supported-app-version_unique/input.yaml @@ -26,10 +26,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true expected_logs: - log_name: examplelog diff --git a/integration_test/metadata/testdata/integration-metadata_troubleshoot_bad-quotes/input.yaml b/integration_test/metadata/testdata/integration-metadata_troubleshoot_bad-quotes/input.yaml index fa7d03cd43..b1891dcf51 100644 --- a/integration_test/metadata/testdata/integration-metadata_troubleshoot_bad-quotes/input.yaml +++ b/integration_test/metadata/testdata/integration-metadata_troubleshoot_bad-quotes/input.yaml @@ -28,10 +28,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true expected_logs: - log_name: examplelog diff --git a/integration_test/metadata/testdata/pass/input.yaml b/integration_test/metadata/testdata/pass/input.yaml index c64d38011e..56d08a7b03 100644 --- a/integration_test/metadata/testdata/pass/input.yaml +++ b/integration_test/metadata/testdata/pass/input.yaml @@ -26,10 +26,12 @@ expected_metrics: - type: example.googleapis.com/example.example1 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true expected_logs: - log_name: examplelog diff --git a/integration_test/ops_agent_test/agent_metrics/metadata.yaml b/integration_test/ops_agent_test/agent_metrics/metadata.yaml index 5637160caf..20da2f568e 100644 --- a/integration_test/ops_agent_test/agent_metrics/metadata.yaml +++ b/integration_test/ops_agent_test/agent_metrics/metadata.yaml @@ -16,284 +16,359 @@ expected_metrics: - type: agent.googleapis.com/agent/api_request_count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: OK|CANCELLED|UNKNOWN|INVALID_ARGUMENT|DEADLINE_EXCEEDED|NOT_FOUND|ALREADY_EXISTS|PERMISSION_DENIED|RESOURCE_EXHAUSTED|FAILED_PRECONDITION|ABORTED|OUT_OF_RANGE|UNIMPLEMENTED|INTERNAL|UNAVAILABLE|DATA_LOSS|UNAUTHENTICATED|CODE_\d+ + - name: state + value_regex: OK|CANCELLED|UNKNOWN|INVALID_ARGUMENT|DEADLINE_EXCEEDED|NOT_FOUND|ALREADY_EXISTS|PERMISSION_DENIED|RESOURCE_EXHAUSTED|FAILED_PRECONDITION|ABORTED|OUT_OF_RANGE|UNIMPLEMENTED|INTERNAL|UNAVAILABLE|DATA_LOSS|UNAUTHENTICATED|CODE_\d+ - type: agent.googleapis.com/agent/log_entry_count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - response_code: \d+ + - name: response_code + value_regex: \d+ - type: agent.googleapis.com/agent/log_entry_retry_count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - response_code: \d+ + - name: response_code + value_regex: \d+ optional: true - type: agent.googleapis.com/agent/memory_usage value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: agent.googleapis.com/agent/monitoring/point_count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - status: OK|CANCELLED|UNKNOWN|INVALID_ARGUMENT|DEADLINE_EXCEEDED|NOT_FOUND|ALREADY_EXISTS|PERMISSION_DENIED|RESOURCE_EXHAUSTED|FAILED_PRECONDITION|ABORTED|OUT_OF_RANGE|UNIMPLEMENTED|INTERNAL|UNAVAILABLE|DATA_LOSS|UNAUTHENTICATED|CODE_\d+ + - name: status + value_regex: OK|CANCELLED|UNKNOWN|INVALID_ARGUMENT|DEADLINE_EXCEEDED|NOT_FOUND|ALREADY_EXISTS|PERMISSION_DENIED|RESOURCE_EXHAUSTED|FAILED_PRECONDITION|ABORTED|OUT_OF_RANGE|UNIMPLEMENTED|INTERNAL|UNAVAILABLE|DATA_LOSS|UNAUTHENTICATED|CODE_\d+ - type: agent.googleapis.com/agent/request_count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - response_code: \d+ + - name: response_code + value_regex: \d+ - type: agent.googleapis.com/agent/uptime value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - version: google-cloud-ops-agent-(metrics|logging)/\d+[.]\d+[.]\d+.* + - name: version + value_regex: google-cloud-ops-agent-(metrics|logging)/\d+[.]\d+[.]\d+.* representative: true - type: agent.googleapis.com/agent/ops_agent/enabled_receivers value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - receiver_type: .* - telemetry_type: logs|metrics + - name: receiver_type + value_regex: .* + - name: telemetry_type + value_regex: logs|metrics - type: agent.googleapis.com/cpu/load_15m value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: agent.googleapis.com/cpu/load_1m value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: agent.googleapis.com/cpu/load_5m value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: agent.googleapis.com/cpu/usage_time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - cpu_number: \d* - cpu_state: idle|interrupt|nice|softirq|steal|system|used|user|wait + - name: cpu_number + value_regex: \d* + - name: cpu_state + value_regex: idle|interrupt|nice|softirq|steal|system|used|user|wait optional: true - type: agent.googleapis.com/cpu/utilization value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - cpu_number: \d* - cpu_state: idle|interrupt|nice|softirq|steal|system|used|user|wait + - name: cpu_number + value_regex: \d* + - name: cpu_state + value_regex: idle|interrupt|nice|softirq|steal|system|used|user|wait - type: agent.googleapis.com/disk/bytes_used value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* - state: free|reserved|used + - name: device + value_regex: .* + - name: state + value_regex: free|reserved|used - type: agent.googleapis.com/disk/io_time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* + - name: device + value_regex: .* - type: agent.googleapis.com/disk/merged_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* - direction: read|write + - name: device + value_regex: .* + - name: direction + value_regex: read|write platform: linux - type: agent.googleapis.com/disk/operation_count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* - direction: read|write + - name: device + value_regex: .* + - name: direction + value_regex: read|write - type: agent.googleapis.com/disk/operation_time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* - direction: read|write + - name: device + value_regex: .* + - name: direction + value_regex: read|write - type: agent.googleapis.com/disk/pending_operations value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* + - name: device + value_regex: .* - type: agent.googleapis.com/disk/percent_used value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* - state: free|reserved|used + - name: device + value_regex: .* + - name: state + value_regex: free|reserved|used - type: agent.googleapis.com/disk/read_bytes_count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* + - name: device + value_regex: .* - type: agent.googleapis.com/disk/weighted_io_time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* + - name: device + value_regex: .* platform: linux - type: agent.googleapis.com/disk/write_bytes_count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* + - name: device + value_regex: .* - type: agent.googleapis.com/interface/errors value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* - direction: tx|rx + - name: device + value_regex: .* + - name: direction + value_regex: tx|rx - type: agent.googleapis.com/interface/packets value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* - direction: tx|rx + - name: device + value_regex: .* + - name: direction + value_regex: tx|rx - type: agent.googleapis.com/interface/traffic value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* - direction: tx|rx + - name: device + value_regex: .* + - name: direction + value_regex: tx|rx - type: agent.googleapis.com/memory/bytes_used value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: buffered|cached|free|slab|used + - name: state + value_regex: buffered|cached|free|slab|used - type: agent.googleapis.com/memory/percent_used value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: buffered|cached|free|slab|used + - name: state + value_regex: buffered|cached|free|slab|used - type: agent.googleapis.com/network/tcp_connections value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - port: all - tcp_state: CLOSE|CLOSED|CLOSE_WAIT|CLOSING|DELETE|ESTABLISHED|FIN_WAIT_1|FIN_WAIT1|FIN_WAIT_2|FIN_WAIT2|LAST_ACK|LISTEN|SYN_RECEIVED|SYN_RECV|SYN_SENT|TIME_WAIT + - name: port + value_regex: all + - name: tcp_state + value_regex: CLOSE|CLOSED|CLOSE_WAIT|CLOSING|DELETE|ESTABLISHED|FIN_WAIT_1|FIN_WAIT1|FIN_WAIT_2|FIN_WAIT2|LAST_ACK|LISTEN|SYN_RECEIVED|SYN_RECV|SYN_SENT|TIME_WAIT - type: agent.googleapis.com/pagefile/percent_used value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: free|used + - name: state + value_regex: free|used platform: windows - type: agent.googleapis.com/processes/count_by_state value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: blocked|daemon|detached|idle|locked|orphan|paging|running|sleeping|stopped|system|unknown|zombies + - name: state + value_regex: blocked|daemon|detached|idle|locked|orphan|paging|running|sleeping|stopped|system|unknown|zombies platform: linux - type: agent.googleapis.com/processes/cpu_time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance - labels: - command: .* - command_line: .* - owner: .* - pid: \d+ - process: all - user_or_syst: user|syst + monitored_resources: [gce_instance] + labels: + - name: command + value_regex: .* + - name: command_line + value_regex: .* + - name: owner + value_regex: .* + - name: pid + value_regex: \d+ + - name: process + value_regex: all + - name: user_or_syst + value_regex: user|syst - type: agent.googleapis.com/processes/disk/read_bytes_count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance - labels: - command: .* - command_line: .* - owner: .* - pid: \d+ - process: all + monitored_resources: [gce_instance] + labels: + - name: command + value_regex: .* + - name: command_line + value_regex: .* + - name: owner + value_regex: .* + - name: pid + value_regex: \d+ + - name: process + value_regex: all - type: agent.googleapis.com/processes/disk/write_bytes_count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance - labels: - command: .* - command_line: .* - owner: .* - pid: \d+ - process: all + monitored_resources: [gce_instance] + labels: + - name: command + value_regex: .* + - name: command_line + value_regex: .* + - name: owner + value_regex: .* + - name: pid + value_regex: \d+ + - name: process + value_regex: all - type: agent.googleapis.com/processes/fork_count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] platform: linux - type: agent.googleapis.com/processes/rss_usage value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance - labels: - command: .* - command_line: .* - owner: .* - pid: \d+ - process: all + monitored_resources: [gce_instance] + labels: + - name: command + value_regex: .* + - name: command_line + value_regex: .* + - name: owner + value_regex: .* + - name: pid + value_regex: \d+ + - name: process + value_regex: all - type: agent.googleapis.com/processes/vm_usage value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance - labels: - command: .* - command_line: .* - owner: .* - pid: \d+ - process: all + monitored_resources: [gce_instance] + labels: + - name: command + value_regex: .* + - name: command_line + value_regex: .* + - name: owner + value_regex: .* + - name: pid + value_regex: \d+ + - name: process + value_regex: all - type: agent.googleapis.com/processes/windows/handles value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] platform: windows labels: - command: .* - command_line: .* - owner: .* - pid: \d+ - process: all + - name: command + value_regex: .* + - name: command_line + value_regex: .* + - name: owner + value_regex: .* + - name: pid + value_regex: \d+ + - name: process + value_regex: all - type: agent.googleapis.com/swap/bytes_used value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* - state: cached|free|used + - name: device + value_regex: .* + - name: state + value_regex: cached|free|used - type: agent.googleapis.com/swap/io value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - direction: in|out + - name: direction + value_regex: in|out - type: agent.googleapis.com/swap/percent_used value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - device: .* - state: cached|free|reserved|used + - name: device + value_regex: .* + - name: state + value_regex: cached|free|reserved|used diff --git a/integration_test/third_party_apps_test/applications/active_directory_ds/metadata.yaml b/integration_test/third_party_apps_test/applications/active_directory_ds/metadata.yaml index ae00be8b53..6c0afa3e3b 100644 --- a/integration_test/third_party_apps_test/applications/active_directory_ds/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/active_directory_ds/metadata.yaml @@ -98,94 +98,104 @@ expected_metrics: - type: workload.googleapis.com/active_directory.ds.bind.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] representative: true labels: - type: server|client + - name: type + value_regex: server|client - type: workload.googleapis.com/active_directory.ds.ldap.bind.last_successful.time value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/active_directory.ds.ldap.bind.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/active_directory.ds.ldap.client.session.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/active_directory.ds.ldap.search.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/active_directory.ds.name_cache.hit_rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/active_directory.ds.notification.queued value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/active_directory.ds.operation.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - type: read|write|search + - name: type + value_regex: read|write|search - type: workload.googleapis.com/active_directory.ds.replication.network.io value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - direction: sent|received - type: compressed|uncompressed + - name: direction + value_regex: sent|received + - name: type + value_regex: compressed|uncompressed - type: workload.googleapis.com/active_directory.ds.replication.object.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - direction: sent|received + - name: direction + value_regex: sent|received - type: workload.googleapis.com/active_directory.ds.replication.operation.pending value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/active_directory.ds.replication.property.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - direction: sent|received + - name: direction + value_regex: sent|received - type: workload.googleapis.com/active_directory.ds.replication.sync.object.pending value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/active_directory.ds.replication.sync.request.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - result: success|schema_mismatch|other + - name: result + value_regex: success|schema_mismatch|other - type: workload.googleapis.com/active_directory.ds.replication.value.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - direction: sent|received - type: distingushed_names|other + - name: direction + value_regex: sent|received + - name: type + value_regex: distingushed_names|other - type: workload.googleapis.com/active_directory.ds.security_descriptor_propagations_event.queued value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/active_directory.ds.suboperation.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - type: security_descriptor_propagations_event|search + - name: type + value_regex: security_descriptor_propagations_event|search - type: workload.googleapis.com/active_directory.ds.thread.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] minimum_supported_agent_version: metrics: 2.15.0 logging: 2.15.0 diff --git a/integration_test/third_party_apps_test/applications/activemq/metadata.yaml b/integration_test/third_party_apps_test/applications/activemq/metadata.yaml index 4d4328b17d..461c573d70 100644 --- a/integration_test/third_party_apps_test/applications/activemq/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/activemq/metadata.yaml @@ -34,72 +34,88 @@ expected_metrics: - type: workload.googleapis.com/activemq.connection.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/activemq.consumer.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* representative: true - type: workload.googleapis.com/activemq.disk.store_usage value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/activemq.disk.temp_usage value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/activemq.memory.usage value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* - type: workload.googleapis.com/activemq.message.current value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* - type: workload.googleapis.com/activemq.message.dequeued value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* - type: workload.googleapis.com/activemq.message.enqueued value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* - type: workload.googleapis.com/activemq.message.expired value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* - type: workload.googleapis.com/activemq.message.wait_time.avg value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* - type: workload.googleapis.com/activemq.producer.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - broker: .* - destination: .* + - name: broker + value_regex: .* + - name: destination + value_regex: .* expected_logs: - log_name: syslog fields: diff --git a/integration_test/third_party_apps_test/applications/aerospike/metadata.yaml b/integration_test/third_party_apps_test/applications/aerospike/metadata.yaml index c4abc5e28a..8d33908f38 100644 --- a/integration_test/third_party_apps_test/applications/aerospike/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/aerospike/metadata.yaml @@ -31,66 +31,87 @@ configure_integration: |- expected_metrics: - kind: CUMULATIVE labels: - result: error|filtered_out|not_found|success|timeout - type: delete|read|udf|write - node_name: .* - namespace_name: .* - monitored_resource: gce_instance + - name: result + value_regex: error|filtered_out|not_found|success|timeout + - name: type + value_regex: delete|read|udf|write + - name: node_name + value_regex: .* + - name: namespace_name + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/aerospike.namespace.transaction.count value_type: INT64 - kind: GAUGE labels: - node_name: .* - namespace_name: .* - monitored_resource: gce_instance + - name: node_name + value_regex: .* + - name: namespace_name + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/aerospike.namespace.disk.available optional: true value_type: INT64 - kind: GAUGE labels: - node_name: .* - namespace_name: .* - monitored_resource: gce_instance + - name: node_name + value_regex: .* + - name: namespace_name + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/aerospike.namespace.memory.free value_type: INT64 - kind: GAUGE labels: - component: data|index|set_index|secondary_index - node_name: .* - namespace_name: .* - monitored_resource: gce_instance + - name: component + value_regex: data|index|set_index|secondary_index + - name: node_name + value_regex: .* + - name: namespace_name + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/aerospike.namespace.memory.usage value_type: INT64 - kind: CUMULATIVE labels: - result: abort|complete|error - type: aggregation|basic|ops_background|udf_background - node_name: .* - namespace_name: .* - monitored_resource: gce_instance + - name: result + value_regex: abort|complete|error + - name: type + value_regex: aggregation|basic|ops_background|udf_background + - name: node_name + value_regex: .* + - name: namespace_name + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/aerospike.namespace.scan.count optional: true # This aerospike metric is broken for aerospike 6.X - see issue raised https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21834 value_type: INT64 - kind: CUMULATIVE labels: - operation: close|open - type: client|fabric|heartbeat - node_name: .* - monitored_resource: gce_instance + - name: operation + value_regex: close|open + - name: type + value_regex: client|fabric|heartbeat + - name: node_name + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/aerospike.node.connection.count value_type: INT64 - kind: GAUGE labels: - type: client|fabric|heartbeat - node_name: .* - monitored_resource: gce_instance + - name: type + value_regex: client|fabric|heartbeat + - name: node_name + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/aerospike.node.connection.open value_type: INT64 representative: true - kind: GAUGE labels: - node_name: .* - monitored_resource: gce_instance + - name: node_name + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/aerospike.node.memory.free value_type: INT64 expected_logs: diff --git a/integration_test/third_party_apps_test/applications/apache/metadata.yaml b/integration_test/third_party_apps_test/applications/apache/metadata.yaml index 79df86f2ea..69a0a6a3a9 100644 --- a/integration_test/third_party_apps_test/applications/apache/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/apache/metadata.yaml @@ -55,9 +55,10 @@ expected_metrics: - type: workload.googleapis.com/apache.current_connections value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - server_name: .* + - name: server_name + value_regex: .* unavailable_on: # https://github.com/GoogleCloudPlatform/ops-agent/issues/1173 - suse-cloud:sles-12 @@ -66,30 +67,36 @@ expected_metrics: - type: workload.googleapis.com/apache.requests value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - server_name: .* + - name: server_name + value_regex: .* representative: true - type: workload.googleapis.com/apache.scoreboard value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - server_name: .* - state: .* + - name: server_name + value_regex: .* + - name: state + value_regex: .* - type: workload.googleapis.com/apache.traffic value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - server_name: .* + - name: server_name + value_regex: .* - type: workload.googleapis.com/apache.workers value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - server_name: .* - state: .* + - name: server_name + value_regex: .* + - name: state + value_regex: .* expected_logs: - log_name: apache_access fields: diff --git a/integration_test/third_party_apps_test/applications/cassandra/metadata.yaml b/integration_test/third_party_apps_test/applications/cassandra/metadata.yaml index 4eeae70b60..2014d06b4e 100644 --- a/integration_test/third_party_apps_test/applications/cassandra/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/cassandra/metadata.yaml @@ -59,73 +59,76 @@ expected_metrics: - type: workload.googleapis.com/cassandra.client.request.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: .* + - name: operation + value_regex: .* representative: true - type: workload.googleapis.com/cassandra.client.request.error.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: .* - status: .* + - name: operation + value_regex: .* + - name: status + value_regex: .* - type: workload.googleapis.com/cassandra.client.request.range_slice.latency.50p value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.client.request.range_slice.latency.99p value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.client.request.range_slice.latency.max value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.client.request.read.latency.50p value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.client.request.read.latency.99p value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.client.request.read.latency.max value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.client.request.write.latency.50p value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.client.request.write.latency.99p value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.client.request.write.latency.max value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.compaction.tasks.completed value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.compaction.tasks.pending value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.storage.load.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.storage.total_hints.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/cassandra.storage.total_hints.in_progress.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] expected_logs: - log_name: cassandra_system fields: diff --git a/integration_test/third_party_apps_test/applications/couchbase/metadata.yaml b/integration_test/third_party_apps_test/applications/couchbase/metadata.yaml index 7cc8c0ccbe..d98609372e 100644 --- a/integration_test/third_party_apps_test/applications/couchbase/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/couchbase/metadata.yaml @@ -121,56 +121,68 @@ expected_metrics: - type: workload.googleapis.com/couchbase.bucket.operation.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - bucket_name: .* - op: .* + - name: bucket_name + value_regex: .* + - name: op + value_regex: .* - type: workload.googleapis.com/couchbase.bucket.item.count value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - bucket_name: .* - state: .* + - name: bucket_name + value_regex: .* + - name: state + value_regex: .* - type: workload.googleapis.com/couchbase.bucket.vbucket.count value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - bucket_name: .* - state: .* + - name: bucket_name + value_regex: .* + - name: state + value_regex: .* - type: workload.googleapis.com/couchbase.bucket.memory.usage value_type: DOUBLE kind: GAUGE labels: - bucket_name: .* - monitored_resource: gce_instance + - name: bucket_name + value_regex: .* + monitored_resources: [gce_instance] representative: true - type: workload.googleapis.com/couchbase.bucket.item.ejection.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - bucket_name: .* + - name: bucket_name + value_regex: .* - type: workload.googleapis.com/couchbase.bucket.error.oom.count value_type: INT64 kind: CUMULATIVE labels: - bucket_name: .* - error_type: .* - monitored_resource: gce_instance + - name: bucket_name + value_regex: .* + - name: error_type + value_regex: .* + monitored_resources: [gce_instance] - type: workload.googleapis.com/couchbase.bucket.memory.high_water_mark.limit value_type: DOUBLE kind: GAUGE labels: - bucket_name: .* - monitored_resource: gce_instance + - name: bucket_name + value_regex: .* + monitored_resources: [gce_instance] - type: workload.googleapis.com/couchbase.bucket.memory.low_water_mark.limit value_type: DOUBLE kind: GAUGE labels: - bucket_name: .* - monitored_resource: gce_instance + - name: bucket_name + value_regex: .* + monitored_resources: [gce_instance] configuration_options: metrics: - type: couchbase diff --git a/integration_test/third_party_apps_test/applications/couchdb/metadata.yaml b/integration_test/third_party_apps_test/applications/couchdb/metadata.yaml index 36ec9fa9a2..e9a35f0f96 100644 --- a/integration_test/third_party_apps_test/applications/couchdb/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/couchdb/metadata.yaml @@ -43,44 +43,48 @@ expected_metrics: - type: workload.googleapis.com/couchdb.average_request_time value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/couchdb.database.open value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] representative: true - type: workload.googleapis.com/couchdb.database.operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: .* + - name: operation + value_regex: .* - type: workload.googleapis.com/couchdb.file_descriptor.open value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/couchdb.httpd.bulk_requests value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/couchdb.httpd.requests value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - http_method: .* + - name: http_method + value_regex: .* - type: workload.googleapis.com/couchdb.httpd.responses value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - http_status_code: .* + - name: http_status_code + value_regex: .* - type: workload.googleapis.com/couchdb.httpd.views value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - view: .* + - name: view + value_regex: .* expected_logs: - log_name: couchdb fields: diff --git a/integration_test/third_party_apps_test/applications/dcgm/metadata.yaml b/integration_test/third_party_apps_test/applications/dcgm/metadata.yaml index f28919354a..ddf93152e2 100644 --- a/integration_test/third_party_apps_test/applications/dcgm/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/dcgm/metadata.yaml @@ -46,55 +46,92 @@ expected_metrics: - type: workload.googleapis.com/dcgm.gpu.profiling.sm_utilization value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + description: Fraction of time at least one warp was active on a multiprocessor, averaged over all multiprocessors. + monitored_resources: [gce_instance] labels: - model: .* - uuid: .* - gpu_number: "[0-9]*" + - &model_label + name: model + value_regex: .* + description: GPU model name. + - &uuid_label + name: uuid + value_regex: .* + description: GPU universally unique identifier. + - &gpu_number_label + name: gpu_number + value_regex: "[0-9]*" + description: GPU index starting at 0. + notes: + - &dcgm_profiling_note + Not available on GPU models P100 and P4. representative: true - type: workload.googleapis.com/dcgm.gpu.profiling.sm_occupancy value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + description: Fraction of the number of warps resident on a multiprocessor, averaged over all multiprocessors. + monitored_resources: [gce_instance] labels: - model: .* - uuid: .* - gpu_number: "[0-9]*" + - *model_label + - *uuid_label + - *gpu_number_label + notes: + - *dcgm_profiling_note - type: workload.googleapis.com/dcgm.gpu.profiling.pipe_utilization value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + description: Fraction of cycles the corresponding GPU pipe was active, averaged over time and all multiprocessors. + monitored_resources: [gce_instance] labels: - model: .* - uuid: .* - gpu_number: "[0-9]*" - pipe: tensor|fp64|fp32|fp16 + - *model_label + - *uuid_label + - *gpu_number_label + - name: pipe + value_regex: tensor|fp64|fp32|fp16 + description: "GPU pipe in use, one of [tensor, fp64, fp32, fp16]." + notes: + - For L4, the `pipe` value `fp64` is not supported. + notes: + - *dcgm_profiling_note - type: workload.googleapis.com/dcgm.gpu.profiling.dram_utilization value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + description: Fraction of cycles data was being sent or received from GPU memory. + monitored_resources: [gce_instance] labels: - model: .* - uuid: .* - gpu_number: "[0-9]*" + - *model_label + - *uuid_label + - *gpu_number_label + notes: + - *dcgm_profiling_note - type: workload.googleapis.com/dcgm.gpu.profiling.pcie_traffic_rate value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + description: The number of bytes sent over the PCIe bus, including both protocol headers and data payloads. + unit: By/s + monitored_resources: [gce_instance] labels: - model: .* - uuid: .* - gpu_number: "[0-9]*" - direction: tx|rx + - *model_label + - *uuid_label + - *gpu_number_label + - &direction_label + name: direction + value_regex: tx|rx + description: "Direction of the link traffic, one of [tx, rx]." + notes: + - *dcgm_profiling_note - type: workload.googleapis.com/dcgm.gpu.profiling.nvlink_traffic_rate value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + description: The number of bytes sent over NVLink, not including protocol headers. + unit: By/s + monitored_resources: [gce_instance] labels: - model: .* - uuid: .* - gpu_number: "[0-9]*" - direction: tx|rx + - *model_label + - *uuid_label + - *gpu_number_label + - *direction_label + notes: + - *dcgm_profiling_note configuration_options: metrics: - type: dcgm diff --git a/integration_test/third_party_apps_test/applications/elasticsearch/metadata.yaml b/integration_test/third_party_apps_test/applications/elasticsearch/metadata.yaml index d9a477c0b7..19edd13b1b 100644 --- a/integration_test/third_party_apps_test/applications/elasticsearch/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/elasticsearch/metadata.yaml @@ -36,279 +36,306 @@ expected_metrics: - type: workload.googleapis.com/elasticsearch.cluster.data_nodes value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.cluster.health value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - status: .* + - name: status + value_regex: .* - type: workload.googleapis.com/elasticsearch.cluster.nodes value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.cluster.shards value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* + - name: state + value_regex: .* - type: workload.googleapis.com/elasticsearch.node.cache.evictions value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - cache_name: .* + - name: cache_name + value_regex: .* - type: workload.googleapis.com/elasticsearch.node.cache.memory.usage value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - cache_name: .* + - name: cache_name + value_regex: .* - type: workload.googleapis.com/elasticsearch.node.cluster.connections value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.cluster.io value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - direction: .* + - name: direction + value_regex: .* - type: workload.googleapis.com/elasticsearch.node.documents value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* + - name: state + value_regex: .* - type: workload.googleapis.com/elasticsearch.node.fs.disk.available value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.http.connections value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.open_files value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] representative: true - type: workload.googleapis.com/elasticsearch.node.operations.completed value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: .* + - name: operation + value_regex: .* - type: workload.googleapis.com/elasticsearch.node.operations.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: .* + - name: operation + value_regex: .* - type: workload.googleapis.com/elasticsearch.node.shards.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.thread_pool.tasks.finished value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* - thread_pool_name: .* + - name: state + value_regex: .* + - name: thread_pool_name + value_regex: .* - type: workload.googleapis.com/elasticsearch.node.thread_pool.tasks.queued value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - thread_pool_name: .* + - name: thread_pool_name + value_regex: .* - type: workload.googleapis.com/elasticsearch.node.thread_pool.threads value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* - thread_pool_name: .* + - name: state + value_regex: .* + - name: thread_pool_name + value_regex: .* - type: workload.googleapis.com/elasticsearch.breaker.memory.estimated value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - name: .* + - name: name + value_regex: .* - type: workload.googleapis.com/elasticsearch.breaker.memory.limit value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - name: .* + - name: name + value_regex: .* - type: workload.googleapis.com/elasticsearch.breaker.tripped value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - name: .* + - name: name + value_regex: .* - type: workload.googleapis.com/elasticsearch.cluster.published_states.differences value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: incompatible|compatible + - name: state + value_regex: incompatible|compatible - type: workload.googleapis.com/elasticsearch.cluster.published_states.full value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.cluster.state_queue value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: pending|committed + - name: state + value_regex: pending|committed - type: workload.googleapis.com/elasticsearch.cluster.state_update.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* + - name: state + value_regex: .* - type: workload.googleapis.com/elasticsearch.cluster.state_update.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* - type: computation|context_construction|commit|completion|master_apply|notification + - name: state + value_regex: .* + - name: type + value_regex: computation|context_construction|commit|completion|master_apply|notification - type: workload.googleapis.com/elasticsearch.indexing_pressure.memory.limit value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.indexing_pressure.memory.total.primary_rejections value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.indexing_pressure.memory.total.replica_rejections value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.memory.indexing_pressure value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - stage: coordinating|primary|replica + - name: stage + value_regex: coordinating|primary|replica - type: workload.googleapis.com/elasticsearch.node.disk.io.read value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.disk.io.write value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.ingest.documents value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.ingest.documents.current value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.ingest.operations.failed value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.pipeline.ingest.documents.current value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - name: .* + - name: name + value_regex: .* - type: workload.googleapis.com/elasticsearch.node.pipeline.ingest.documents.preprocessed value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - name: .* + - name: name + value_regex: .* - type: workload.googleapis.com/elasticsearch.node.pipeline.ingest.operations.failed value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - name: .* + - name: name + value_regex: .* - type: workload.googleapis.com/elasticsearch.node.script.cache_evictions value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.script.compilation_limit_triggered value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.script.compilations value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.shards.data_set.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.shards.reserved.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.translog.operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.translog.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.translog.uncommitted.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.os.cpu.load_avg.15m value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.os.cpu.load_avg.1m value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.os.cpu.load_avg.5m value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.os.cpu.usage value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.os.memory value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: free|used + - name: state + value_regex: free|used - type: workload.googleapis.com/elasticsearch.cluster.in_flight_fetch value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.cluster.pending_tasks value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.cache.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - type: hit|miss + - name: type + value_regex: hit|miss - type: workload.googleapis.com/elasticsearch.node.fs.disk.free value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/elasticsearch.node.fs.disk.total value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] expected_logs: - log_name: elasticsearch_json fields: diff --git a/integration_test/third_party_apps_test/applications/flink/metadata.yaml b/integration_test/third_party_apps_test/applications/flink/metadata.yaml index ca54ed1cc0..5ee875db9c 100644 --- a/integration_test/third_party_apps_test/applications/flink/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/flink/metadata.yaml @@ -30,244 +30,339 @@ expected_metrics: - type: workload.googleapis.com/flink.jvm.cpu.load value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.cpu.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.memory.heap.used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* representative: true - type: workload.googleapis.com/flink.jvm.memory.heap.committed value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.memory.heap.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.memory.nonheap.used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.memory.nonheap.committed value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.memory.nonheap.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.memory.metaspace.used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.memory.metaspace.committed value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.memory.metaspace.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.memory.direct.used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.memory.direct.total_capacity value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.memory.mapped.used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.memory.mapped.total_capacity value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.memory.managed.used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.memory.managed.total value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.threads.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.jvm.gc.collections.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* - garbage_collector_name: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* + - name: garbage_collector_name + value_regex: .* - type: workload.googleapis.com/flink.jvm.gc.collections.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* - garbage_collector_name: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* + - name: garbage_collector_name + value_regex: .* - type: workload.googleapis.com/flink.jvm.class_loader.classes_loaded value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - resource_type: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: resource_type + value_regex: .* + - name: taskmanager_id + value_regex: .* - type: workload.googleapis.com/flink.job.restart.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - job_name: .* + - name: host_name + value_regex: .* + - name: job_name + value_regex: .* - type: workload.googleapis.com/flink.job.last_checkpoint.time value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - job_name: .* + - name: host_name + value_regex: .* + - name: job_name + value_regex: .* - type: workload.googleapis.com/flink.job.last_checkpoint.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - job_name: .* + - name: host_name + value_regex: .* + - name: job_name + value_regex: .* - type: workload.googleapis.com/flink.job.checkpoint.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - job_name: .* - checkpoint: .* + - name: host_name + value_regex: .* + - name: job_name + value_regex: .* + - name: checkpoint + value_regex: .* - type: workload.googleapis.com/flink.job.checkpoint.in_progress value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - job_name: .* + - name: host_name + value_regex: .* + - name: job_name + value_regex: .* - type: workload.googleapis.com/flink.task.record.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - taskmanager_id: .* - job_name: .* - task_name: .* - subtask_index: .* - record: .* + - name: host_name + value_regex: .* + - name: taskmanager_id + value_regex: .* + - name: job_name + value_regex: .* + - name: task_name + value_regex: .* + - name: subtask_index + value_regex: .* + - name: record + value_regex: .* - type: workload.googleapis.com/flink.operator.record.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - taskmanager_id: .* - job_name: .* - operator_name: .* - task_name: .* - subtask_index: .* - record: .* + - name: host_name + value_regex: .* + - name: taskmanager_id + value_regex: .* + - name: job_name + value_regex: .* + - name: operator_name + value_regex: .* + - name: task_name + value_regex: .* + - name: subtask_index + value_regex: .* + - name: record + value_regex: .* - type: workload.googleapis.com/flink.operator.watermark.output value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - host_name: .* - job_name: .* - operator_name: .* - subtask_index: .* - task_name: .* - taskmanager_id: .* + - name: host_name + value_regex: .* + - name: job_name + value_regex: .* + - name: operator_name + value_regex: .* + - name: subtask_index + value_regex: .* + - name: task_name + value_regex: .* + - name: taskmanager_id + value_regex: .* expected_logs: - log_name: flink fields: diff --git a/integration_test/third_party_apps_test/applications/hadoop/metadata.yaml b/integration_test/third_party_apps_test/applications/hadoop/metadata.yaml index 0d1f1c19bb..a6a3802716 100644 --- a/integration_test/third_party_apps_test/applications/hadoop/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/hadoop/metadata.yaml @@ -49,53 +49,62 @@ expected_metrics: - type: workload.googleapis.com/hadoop.name_node.block.corrupt value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - node_name: .* + - name: node_name + value_regex: .* - type: workload.googleapis.com/hadoop.name_node.block.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - node_name: .* + - name: node_name + value_regex: .* - type: workload.googleapis.com/hadoop.name_node.block.missing value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - node_name: .* + - name: node_name + value_regex: .* - type: workload.googleapis.com/hadoop.name_node.capacity.limit value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - node_name: .* + - name: node_name + value_regex: .* - type: workload.googleapis.com/hadoop.name_node.capacity.usage value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - node_name: .* + - name: node_name + value_regex: .* representative: true - type: workload.googleapis.com/hadoop.name_node.data_node.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - node_name: .* - state: .* + - name: node_name + value_regex: .* + - name: state + value_regex: .* - type: workload.googleapis.com/hadoop.name_node.file.load value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - node_name: .* + - name: node_name + value_regex: .* - type: workload.googleapis.com/hadoop.name_node.volume.failed value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - node_name: .* + - name: node_name + value_regex: .* expected_logs: - log_name: hadoop fields: diff --git a/integration_test/third_party_apps_test/applications/hbase/metadata.yaml b/integration_test/third_party_apps_test/applications/hbase/metadata.yaml index 3a2f7760f5..f8c03126e3 100644 --- a/integration_test/third_party_apps_test/applications/hbase/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/hbase/metadata.yaml @@ -54,312 +54,366 @@ expected_metrics: - type: workload.googleapis.com/hbase.master.region_server.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* + - name: state + value_regex: .* - type: workload.googleapis.com/hbase.master.regions_in_transition.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/hbase.master.regions_in_transition.oldest_age value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/hbase.master.regions_in_transition.over_threshold value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/hbase.region_server.active_handler.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.authentication.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* - state: .* + - name: region_server + value_regex: .* + - name: state + value_regex: .* - type: workload.googleapis.com/hbase.region_server.block_cache.operation.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* - state: .* + - name: region_server + value_regex: .* + - name: state + value_regex: .* - type: workload.googleapis.com/hbase.region_server.blocked_update.time value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.disk.store_file.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.disk.store_file.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.files.local value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.gc.old_gen.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* optional: true - type: workload.googleapis.com/hbase.region_server.gc.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.gc.young_gen.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* optional: true - type: workload.googleapis.com/hbase.region_server.open_connection.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.append.latency.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.append.latency.mean value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.append.latency.median value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.append.latency.min value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.append.latency.p99 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* representative: true - type: workload.googleapis.com/hbase.region_server.operation.delete.latency.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.delete.latency.mean value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.delete.latency.median value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.delete.latency.min value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.delete.latency.p99 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.get.latency.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.get.latency.mean value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.get.latency.median value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.get.latency.min value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.get.latency.p99 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.increment.latency.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.increment.latency.mean value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.increment.latency.median value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.increment.latency.min value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.increment.latency.p99 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.put.latency.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.put.latency.mean value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.put.latency.median value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.put.latency.min value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.put.latency.p99 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.replay.latency.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.replay.latency.mean value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.replay.latency.median value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.replay.latency.min value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operation.replay.latency.p99 value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.operations.slow value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: .* - region_server: .* + - name: operation + value_regex: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.queue.length value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* - state: .* + - name: region_server + value_regex: .* + - name: state + value_regex: .* - type: workload.googleapis.com/hbase.region_server.queue.request.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* - state: .* + - name: region_server + value_regex: .* + - name: state + value_regex: .* - type: workload.googleapis.com/hbase.region_server.region.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* - type: workload.googleapis.com/hbase.region_server.request.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* - state: .* + - name: region_server + value_regex: .* + - name: state + value_regex: .* - type: workload.googleapis.com/hbase.region_server.write_ahead_log.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - region_server: .* + - name: region_server + value_regex: .* expected_logs: - log_name: hbase_system fields: diff --git a/integration_test/third_party_apps_test/applications/iis/metadata.yaml b/integration_test/third_party_apps_test/applications/iis/metadata.yaml index 8342811a7e..f56a521f60 100644 --- a/integration_test/third_party_apps_test/applications/iis/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/iis/metadata.yaml @@ -13,102 +13,81 @@ # limitations under the License. public_url: "https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/third-party/iis" -app_url: "https://www.iis.net/" +app_url: "https://docs.microsoft.com/iis/" short_name: IIS -long_name: IIS +long_name: Internet Information Services logo_path: /stackdriver/images/iis.png # supplied by google technical writer description: |- - The Internet Information Services (IIS) integration collects metrics from your - IIS web servers. The metrics provide connection information and also data on - transferred bytes. - - When using the Ops Agent on a Microsoft Windows VM, the agent automatically - collects IIS metrics. No additional configuration is required. + The Internet Information Services (IIS) integration collects telemetry from + your IIS web servers. The metrics provide connection information + and also data on transferred bytes. The integration also collects information + from access logs. minimum_supported_agent_version: metrics: 2.15.0 logging: 2.14.0 supported_operating_systems: windows supported_app_version: ["8.5", "10.0"] expected_metrics: - # v1 metrics - - type: agent.googleapis.com/iis/current_connections - value_type: DOUBLE - kind: GAUGE - monitored_resource: gce_instance - - type: agent.googleapis.com/iis/network/transferred_bytes_count - value_type: INT64 - kind: CUMULATIVE - monitored_resource: gce_instance - labels: - direction: .* - - type: agent.googleapis.com/iis/new_connection_count - value_type: INT64 - kind: CUMULATIVE - monitored_resource: gce_instance - - type: agent.googleapis.com/iis/request_count - value_type: INT64 - kind: CUMULATIVE - monitored_resource: gce_instance - labels: - http_method: .* - representative: true # v2 metrics - type: workload.googleapis.com/iis.request.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - request: .* - # representative: true + - name: request + value_regex: .* + representative: true - type: workload.googleapis.com/iis.request.rejected value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/iis.request.queue.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/iis.request.queue.age.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] optional: true - type: workload.googleapis.com/iis.network.file.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - direction: .* + - name: direction + value_regex: .* - type: workload.googleapis.com/iis.network.blocked value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/iis.network.io value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - direction: .* + - name: direction + value_regex: .* - type: workload.googleapis.com/iis.connection.attempt.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/iis.connection.active value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/iis.connection.anonymous value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/iis.thread.active value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/iis.uptime value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] expected_logs: - log_name: iis_access fields: @@ -190,5 +169,5 @@ configuration_options: default: 60s description: A [time duration](https://pkg.go.dev/time#ParseDuration) value, such as `30s` or `5m`. - name: receiver_version - default: null + default: "1" description: Version of the metrics collected; use `2` to collect v2 metrics. diff --git a/integration_test/third_party_apps_test/applications/iisv1/enable b/integration_test/third_party_apps_test/applications/iisv1/enable new file mode 100644 index 0000000000..32ccac0be6 --- /dev/null +++ b/integration_test/third_party_apps_test/applications/iisv1/enable @@ -0,0 +1,25 @@ +$ErrorActionPreference = 'Stop' + +# This config gets merged with the built-in Ops Agent config, which already +# includes the v1 receiver in the default pipeline. + +# Create a back up of the existing file so existing configurations are not lost. +Copy-Item -Path 'C:\Program Files\Google\Cloud Operations\Ops Agent\config\config.yaml' -Destination 'C:\Program Files\Google\Cloud Operations\Ops Agent\config\config.yaml.bak' + +# Configure the Ops Agent. +Add-Content 'C:\Program Files\Google\Cloud Operations\Ops Agent\config\config.yaml' " +logging: + receivers: + iis_access: + type: iis_access + service: + pipelines: + iis: + receivers: + - iis_access +" + +# Stop-Service may fail if the service isn't in a Running state yet. +(Get-Service google-cloud-ops-agent*).WaitForStatus('Running', '00:03:00') +Stop-Service google-cloud-ops-agent -Force +Start-Service google-cloud-ops-agent* diff --git a/integration_test/third_party_apps_test/applications/iisv1/exercise b/integration_test/third_party_apps_test/applications/iisv1/exercise new file mode 100644 index 0000000000..52bba77617 --- /dev/null +++ b/integration_test/third_party_apps_test/applications/iisv1/exercise @@ -0,0 +1,2 @@ +# generate log +curl http://localhost:80/forbidden?something=something diff --git a/integration_test/third_party_apps_test/applications/iisv1/features.yaml b/integration_test/third_party_apps_test/applications/iisv1/features.yaml new file mode 100644 index 0000000000..9bae617c66 --- /dev/null +++ b/integration_test/third_party_apps_test/applications/iisv1/features.yaml @@ -0,0 +1,5 @@ +features: +- module: logging + feature: receivers:iis_access + key: "[0].enabled" + value: "true" diff --git a/integration_test/third_party_apps_test/applications/iisv1/metadata.yaml b/integration_test/third_party_apps_test/applications/iisv1/metadata.yaml new file mode 100644 index 0000000000..251eb0ce4f --- /dev/null +++ b/integration_test/third_party_apps_test/applications/iisv1/metadata.yaml @@ -0,0 +1,140 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +public_url: "https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/third-party/iis" +app_url: "https://docs.microsoft.com/iis/" +short_name: IIS +long_name: Internet Information Services +logo_path: /stackdriver/images/iis.png # supplied by google technical writer +description: |- + The Internet Information Services (IIS) integration collects telemetry from + your IIS web servers. The metrics provide connection information + and also data on transferred bytes. The integration also collects information + from access logs. + + When using the Ops Agent on a Microsoft Windows VM, the agent automatically + collects IIS metrics. No additional configuration is required. +minimum_supported_agent_version: + metrics: 1.0.0 + logging: 2.14.0 +supported_operating_systems: windows +supported_app_version: ["8.5", "10.0"] +expected_metrics: + # v1 metrics + - type: agent.googleapis.com/iis/current_connections + value_type: DOUBLE + kind: GAUGE + monitored_resources: [gce_instance] + - type: agent.googleapis.com/iis/network/transferred_bytes_count + value_type: INT64 + kind: CUMULATIVE + monitored_resources: [gce_instance] + labels: + - name: direction + value_regex: .* + - type: agent.googleapis.com/iis/new_connection_count + value_type: INT64 + kind: CUMULATIVE + monitored_resources: [gce_instance] + - type: agent.googleapis.com/iis/request_count + value_type: INT64 + kind: CUMULATIVE + monitored_resources: [gce_instance] + labels: + - name: http_method + value_regex: .* + representative: true +expected_logs: + - log_name: iis_access + fields: + - name: httpRequest.serverIp + value_regex: "::1:80" + type: string + description: "The server's IP and port that was requested" + optional: true + - name: httpRequest.remoteIp + value_regex: "::1" + type: string + description: "IP of the client that made the request" + optional: true + - name: httpRequest.requestUrl + value_regex: '/forbidden\?something=something' + type: string + description: "Request URL (typically just the path part of the URL)" + optional: true + - name: httpRequest.requestMethod + value_regex: GET + type: string + description: "HTTP method" + optional: true + - name: httpRequest.status + type: number + description: "HTTP status code" + optional: true + - name: httpRequest.userAgent + value_regex: 'Mozilla\/5\.0\+\(Windows\+NT;\+Windows\+NT\+\d+\.\d+;\+en\-US\)\+WindowsPowerShell\/\d+\.\d+\.\d+\.\d+' + type: string + description: "Contents of the `User-Agent` header" + optional: true + - name: httpRequest.referer + type: string + description: "Contents of the `Referer` header" + optional: true + - name: jsonPayload.sc_substatus + type: string + description: "The substatus error code" + - name: jsonPayload.sc_win32_status + type: string + description: "The Windows status code" + - name: jsonPayload.time_taken + type: string + description: "The length of time that the action took, in milliseconds" + - name: jsonPayload.user + type: string + description: "Authenticated username for the request" + optional: true + - name: severity + type: string + description: '' +configuration_options: + logs: + - type: iis_access + fields: + - name: type + default: null + description: This value must be `iis_access`. + - name: include_paths + default: "['C:\\inetpub\\logs\\LogFiles\\W3SVC1\\u_ex*']" + description: A list of filesystem paths to read by tailing each file. A wild card (`*`) can be used in the paths; for example, `C:\inetpub\logs\LogFiles\W3SVC1\u_ex*`. + - name: exclude_paths + default: null + description: A list of filesystem path patterns to exclude from the set matched by `include_paths`. + - name: record_log_file_path + default: false + description: If set to `true`, then the path to the specific file from which the log record was obtained appears in the output log entry as the value of the `agent.googleapis.com/log_file_path` label. When using a wildcard, only the path of the file from which the record was obtained is recorded. + - name: wildcard_refresh_interval + default: 60s + description: The interval at which wildcard file paths in `include_paths` are refreshed. Given as a [time duration](https://pkg.go.dev/time#ParseDuration), for example `30s` or `2m`. This property might be useful under high logging throughputs where log files are rotated faster than the default interval. + metrics: + - type: iis + fields: + - name: type + default: null + description: This value must be `iis`. + - name: collection_interval + default: 60s + description: A [time duration](https://pkg.go.dev/time#ParseDuration) value, such as `30s` or `5m`. + - name: receiver_version + default: "1" + description: Version of the metrics collected; use `2` to collect v2 metrics. diff --git a/integration_test/third_party_apps_test/applications/iisv1/windows/install b/integration_test/third_party_apps_test/applications/iisv1/windows/install new file mode 100644 index 0000000000..d737ff9212 --- /dev/null +++ b/integration_test/third_party_apps_test/applications/iisv1/windows/install @@ -0,0 +1,5 @@ +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' +Install-WindowsFeature -name Web-Server + +Start-WebSite -Name "Default Web Site" diff --git a/integration_test/third_party_apps_test/applications/jetty/metadata.yaml b/integration_test/third_party_apps_test/applications/jetty/metadata.yaml index 4b937a3a38..9ba6ab7b34 100644 --- a/integration_test/third_party_apps_test/applications/jetty/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/jetty/metadata.yaml @@ -51,36 +51,40 @@ expected_metrics: - type: workload.googleapis.com/jetty.select.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] representative: true - type: workload.googleapis.com/jetty.session.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - resource: .* + - name: resource + value_regex: .* - type: workload.googleapis.com/jetty.session.time.total value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - resource: .* + - name: resource + value_regex: .* - type: workload.googleapis.com/jetty.session.time.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - resource: .* + - name: resource + value_regex: .* - type: workload.googleapis.com/jetty.thread.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* + - name: state + value_regex: .* - type: workload.googleapis.com/jetty.thread.queue.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] expected_logs: - log_name: jetty_access fields: diff --git a/integration_test/third_party_apps_test/applications/jvm/metadata.yaml b/integration_test/third_party_apps_test/applications/jvm/metadata.yaml index a3965c7f79..76e4f2d8f1 100644 --- a/integration_test/third_party_apps_test/applications/jvm/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/jvm/metadata.yaml @@ -48,80 +48,86 @@ expected_metrics: - type: workload.googleapis.com/jvm.classes.loaded value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/jvm.gc.collections.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - name: .* + - name: name + value_regex: .* - type: workload.googleapis.com/jvm.gc.collections.elapsed value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - name: .* + - name: name + value_regex: .* - type: workload.googleapis.com/jvm.memory.heap.committed value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/jvm.memory.heap.init value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/jvm.memory.heap.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/jvm.memory.heap.used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] representative: true - type: workload.googleapis.com/jvm.memory.nonheap.committed value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/jvm.memory.nonheap.init value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/jvm.memory.nonheap.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/jvm.memory.nonheap.used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/jvm.memory.pool.committed value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - name: .* + - name: name + value_regex: .* - type: workload.googleapis.com/jvm.memory.pool.init value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - name: .* + - name: name + value_regex: .* - type: workload.googleapis.com/jvm.memory.pool.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - name: .* + - name: name + value_regex: .* - type: workload.googleapis.com/jvm.memory.pool.used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - name: .* + - name: name + value_regex: .* - type: workload.googleapis.com/jvm.threads.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] configuration_options: metrics: - type: jvm diff --git a/integration_test/third_party_apps_test/applications/kafka/metadata.yaml b/integration_test/third_party_apps_test/applications/kafka/metadata.yaml index e0783d4776..f4f89a8e94 100644 --- a/integration_test/third_party_apps_test/applications/kafka/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/kafka/metadata.yaml @@ -49,56 +49,62 @@ expected_metrics: - type: workload.googleapis.com/kafka.isr.operation.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: .* + - name: operation + value_regex: .* - type: workload.googleapis.com/kafka.message.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] representative: true - type: workload.googleapis.com/kafka.network.io value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* + - name: state + value_regex: .* - type: workload.googleapis.com/kafka.partition.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/kafka.partition.offline value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/kafka.partition.under_replicated value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/kafka.purgatory.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - type: .* + - name: type + value_regex: .* - type: workload.googleapis.com/kafka.request.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - type: .* + - name: type + value_regex: .* - type: workload.googleapis.com/kafka.request.failed value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - type: .* + - name: type + value_regex: .* - type: workload.googleapis.com/kafka.request.time.total value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - type: .* + - name: type + value_regex: .* expected_logs: - log_name: kafka fields: diff --git a/integration_test/third_party_apps_test/applications/mariadb/enable b/integration_test/third_party_apps_test/applications/mariadb/enable index fcdbf4eaec..dfc91024ed 100644 --- a/integration_test/third_party_apps_test/applications/mariadb/enable +++ b/integration_test/third_party_apps_test/applications/mariadb/enable @@ -24,11 +24,6 @@ logging: type: mysql_general mysql_slow: type: mysql_slow - # Collect the primary's error log just for debugging the test - mysql_error_2: - type: mysql_error - include_paths: - - /run/mysqld/mysqld2.err service: pipelines: mysql: @@ -36,9 +31,6 @@ logging: - mysql_error - mysql_general - mysql_slow - mysql2: - receivers: - - mysql_error_2 EOF sudo service google-cloud-ops-agent restart diff --git a/integration_test/third_party_apps_test/applications/mariadb/features.yaml b/integration_test/third_party_apps_test/applications/mariadb/features.yaml index 01e3b3acaa..ac777917e4 100644 --- a/integration_test/third_party_apps_test/applications/mariadb/features.yaml +++ b/integration_test/third_party_apps_test/applications/mariadb/features.yaml @@ -7,15 +7,11 @@ features: module: logging key: "[0].enabled" value: true -- feature: receivers:mysql_error - module: logging - key: "[1].enabled" - value: true - feature: receivers:mysql_general module: logging - key: "[2].enabled" + key: "[1].enabled" value: true - feature: receivers:mysql_slow module: logging - key: "[3].enabled" + key: "[2].enabled" value: true diff --git a/integration_test/third_party_apps_test/applications/mariadb/metadata.yaml b/integration_test/third_party_apps_test/applications/mariadb/metadata.yaml index 406dafa218..41b11146e7 100644 --- a/integration_test/third_party_apps_test/applications/mariadb/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/mariadb/metadata.yaml @@ -29,15 +29,15 @@ configure_integration: |- relational database management system (RDBMS). To collect logs and metrics for MariaDB, use the `mysql` receivers. - The `mysql` metrics receiver connects by default to a local MySQL/MariaDB + The `mysql` metrics receiver connects by default to a local MariaDB server using a Unix socket and Unix authentication as the `root` user. The `mysql_error` logging receiver collects logs from the default file paths - shown in the table below. On some platforms, MariaDB logs to `journald` by - default instead of a file. Configure MariaDB to log to a file instead by - setting `log_error` in the MariaDB configuration. - [Learn more](https://mariadb.com/kb/en/error-log/#writing-the-error-log-to-a-file) - about configuring `log_error`. + shown in the following table. On some platforms, MariaDB logs to `journald` + by default instead of to file. To configure MariaDB to log to a file instead, + set the `log_error` option in the MariaDB configuration. For more information + about `log_error` configuration, see [Writing the Error Log to a + File](https://mariadb.com/kb/en/error-log/#writing-the-error-log-to-a-file). minimum_supported_agent_version: metrics: 2.37.0 logging: 2.37.0 @@ -57,97 +57,110 @@ expected_metrics: - type: workload.googleapis.com/mysql.buffer_pool_data_pages value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - status: dirty|clean + - name: status + value_regex: dirty|clean - type: workload.googleapis.com/mysql.buffer_pool_limit value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mysql.buffer_pool_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: read_ahead|read_ahead_evicted|read_ahead_rnd|read_requests|reads|wait_free|write_requests + - name: operation + value_regex: read_ahead|read_ahead_evicted|read_ahead_rnd|read_requests|reads|wait_free|write_requests - type: workload.googleapis.com/mysql.buffer_pool_page_flushes value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mysql.buffer_pool_pages value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: data|free|misc + - name: kind + value_regex: data|free|misc - type: workload.googleapis.com/mysql.buffer_pool_size value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: clean|dirty + - name: kind + value_regex: clean|dirty - type: workload.googleapis.com/mysql.commands value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - command: delete|insert|select|update + - name: command + value_regex: delete|insert|select|update - type: workload.googleapis.com/mysql.double_writes value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: writes|pages_written + - name: kind + value_regex: writes|pages_written - type: workload.googleapis.com/mysql.handlers value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: commit|delete|discover|lock|mrr_init|prepare|read_first|read_key|read_last|read_next|read_prev|read_rnd|read_rnd_next|rollback|savepoint|savepoint_rollback|update|write + - name: kind + value_regex: commit|delete|discover|lock|mrr_init|prepare|read_first|read_key|read_last|read_next|read_prev|read_rnd|read_rnd_next|rollback|savepoint|savepoint_rollback|update|write - type: workload.googleapis.com/mysql.locks value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: immediate|waited + - name: kind + value_regex: immediate|waited - type: workload.googleapis.com/mysql.log_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: requests|waits|writes + - name: operation + value_regex: requests|waits|writes - type: workload.googleapis.com/mysql.operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: fsyncs|reads|writes + - name: operation + value_regex: fsyncs|reads|writes - type: workload.googleapis.com/mysql.page_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: created|read|written + - name: operation + value_regex: created|read|written - type: workload.googleapis.com/mysql.replica.time_behind_source value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mysql.replica.sql_delay value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mysql.row_locks value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: time|waits + - name: kind + value_regex: time|waits - type: workload.googleapis.com/mysql.row_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: deleted|inserted|read|updated + - name: operation + value_regex: deleted|inserted|read|updated unavailable_on: - ubuntu-os-cloud:ubuntu-2404-lts-amd64 - ubuntu-os-cloud:ubuntu-2404-lts-arm64 @@ -155,15 +168,17 @@ expected_metrics: - type: workload.googleapis.com/mysql.sorts value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: merge_passes|range|rows|scan + - name: kind + value_regex: merge_passes|range|rows|scan - type: workload.googleapis.com/mysql.threads value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: cached|connected|created|running + - name: kind + value_regex: cached|connected|created|running representative: true expected_logs: - log_name: mysql_error @@ -193,9 +208,6 @@ expected_logs: description: '' - log_name: mysql_general fields: - - name: severity - type: string - description: '' - name: jsonPayload.message value_regex: .*select table_catalog, table_schema, table_name from information_schema.tables.* type: string @@ -207,11 +219,11 @@ expected_logs: - name: jsonPayload.tid type: number description: 'Thread ID where the log originated' - - log_name: mysql_slow - fields: - name: severity type: string description: '' + - log_name: mysql_slow + fields: - name: jsonPayload.message value_regex: (?s).*select table_catalog, table_schema, table_name from information_schema.tables.* # The (?s) part will make the . match with newline as well. See https://github.com/google/re2/blob/main/doc/syntax.txt#L65,L68 type: string @@ -265,30 +277,52 @@ expected_logs: - name: jsonPayload.sortMergePasses type: number description: 'The number of merge passes that the sort algorithm has had to do' + notes: + - &log_slow_verbosity_note + These fields are only provided if the `log_slow_verbosity` system variable contains `'query_plan'`. - name: jsonPayload.createdTmpTables type: number description: 'The number of internal temporary tables created by the server' + notes: + - *log_slow_verbosity_note - name: jsonPayload.createdTmpDiskTables type: number description: 'The number of internal on-disk temporary tables created by the server' + notes: + - *log_slow_verbosity_note - name: jsonPayload.createdTmpTableSizes type: number description: 'The number of bytes used by internal temporary tables created by the server' + notes: + - *log_slow_verbosity_note - name: jsonPayload.fullScan type: boolean description: 'The statement used a full table scan' + notes: + - *log_slow_verbosity_note - name: jsonPayload.fullJoin type: boolean description: "The statement didn't use an index to join tables" + notes: + - *log_slow_verbosity_note - name: jsonPayload.filesort type: boolean description: 'The statement used filesort' + notes: + - *log_slow_verbosity_note - name: jsonPayload.filesortOnDisk type: boolean description: 'The statement used filesort that needed temporary tables on disk' + notes: + - *log_slow_verbosity_note - name: jsonPayload.priorityQueue type: boolean description: 'The statement used a priority queue filesort' + notes: + - *log_slow_verbosity_note + - name: severity + type: string + description: '' configuration_options: logs: - type: mysql_error @@ -349,17 +383,14 @@ configuration_options: default: null description: This value must be `mysql`. - name: endpoint - default: localhost:3306 - description: The url exposed by MySQL. + default: /var/run/mysqld/mysqld.sock + description: The `hostname:port` or Unix socket path starting with `/` used to connect to the MariaDB server. - name: username - default: null + default: root description: The username used to connect to the server. - name: password default: null description: The password used to connect to the server. - - name: application_version - default: null - description: The version of mysql (major.minor) being monitored. Replication metrics are supported for version 5.7 by setting this to the value `5.7`. - name: collection_interval default: 60s description: A [time duration](https://pkg.go.dev/time#ParseDuration) value, such as `30s` or `5m`. diff --git a/integration_test/third_party_apps_test/applications/memcached/metadata.yaml b/integration_test/third_party_apps_test/applications/memcached/metadata.yaml index db1e8dbc36..9bb4fb3216 100644 --- a/integration_test/third_party_apps_test/applications/memcached/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/memcached/metadata.yaml @@ -31,53 +31,58 @@ expected_metrics: - type: workload.googleapis.com/memcached.bytes value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] representative: true - type: workload.googleapis.com/memcached.commands value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - command: .* + - name: command + value_regex: .* - type: workload.googleapis.com/memcached.connections.current value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/memcached.connections.total value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/memcached.cpu.usage value_type: DOUBLE kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* + - name: state + value_regex: .* - type: workload.googleapis.com/memcached.current_items value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/memcached.evictions value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/memcached.network value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - direction: .* + - name: direction + value_regex: .* - type: workload.googleapis.com/memcached.operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: .* - type: .* + - name: operation + value_regex: .* + - name: type + value_regex: .* - type: workload.googleapis.com/memcached.threads value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] expected_logs: - log_name: syslog fields: diff --git a/integration_test/third_party_apps_test/applications/mongodb/metadata.yaml b/integration_test/third_party_apps_test/applications/mongodb/metadata.yaml index 143019cbc7..aa0666687d 100644 --- a/integration_test/third_party_apps_test/applications/mongodb/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/mongodb/metadata.yaml @@ -44,118 +44,135 @@ expected_metrics: - type: workload.googleapis.com/mongodb.cache.operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - type: .* + - name: type + value_regex: .* - type: workload.googleapis.com/mongodb.collection.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/mongodb.connection.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* - type: .* + - name: database + value_regex: .* + - name: type + value_regex: .* - type: workload.googleapis.com/mongodb.data.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/mongodb.global_lock.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mongodb.index.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/mongodb.index.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/mongodb.memory.usage value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* - type: .* + - name: database + value_regex: .* + - name: type + value_regex: .* representative: true - type: workload.googleapis.com/mongodb.object.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/mongodb.operation.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: .* + - name: operation + value_regex: .* - type: workload.googleapis.com/mongodb.storage.size value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/mongodb.database.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mongodb.index.access.count value_type: INT64 - monitored_resource: gce_instance + monitored_resources: [gce_instance] kind: GAUGE labels: - collection: .* - database: .* + - name: collection + value_regex: .* + - name: database + value_regex: .* - type: workload.googleapis.com/mongodb.document.operation.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* - operation: .* + - name: database + value_regex: .* + - name: operation + value_regex: .* - type: workload.googleapis.com/mongodb.network.io.receive value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mongodb.network.io.transmit value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mongodb.network.request.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mongodb.operation.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: insert|query|update|delete|getmore|command + - name: operation + value_regex: insert|query|update|delete|getmore|command - type: workload.googleapis.com/mongodb.session.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mongodb.cursor.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mongodb.cursor.timeout.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] expected_logs: - log_name: mongodb fields: diff --git a/integration_test/third_party_apps_test/applications/mongodb3.6/metadata.yaml b/integration_test/third_party_apps_test/applications/mongodb3.6/metadata.yaml index c51a13c281..1cc33a5174 100644 --- a/integration_test/third_party_apps_test/applications/mongodb3.6/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/mongodb3.6/metadata.yaml @@ -54,147 +54,185 @@ expected_metrics: - type: workload.googleapis.com/mongodb.cache.operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - type: .* - instrumentation_source: agent.googleapis.com/mongodb + - name: type + value_regex: .* + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.collection.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* - instrumentation_source: agent.googleapis.com/mongodb + - name: database + value_regex: .* + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.connection.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* - type: .* - instrumentation_source: agent.googleapis.com/mongodb + - name: database + value_regex: .* + - name: type + value_regex: .* + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.data.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* - instrumentation_source: agent.googleapis.com/mongodb + - name: database + value_regex: .* + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.global_lock.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - instrumentation_source: agent.googleapis.com/mongodb + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.index.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* - instrumentation_source: agent.googleapis.com/mongodb + - name: database + value_regex: .* + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.index.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* - instrumentation_source: agent.googleapis.com/mongodb + - name: database + value_regex: .* + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.memory.usage value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* - type: .* - instrumentation_source: agent.googleapis.com/mongodb + - name: database + value_regex: .* + - name: type + value_regex: .* + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb representative: true - type: workload.googleapis.com/mongodb.object.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* - instrumentation_source: agent.googleapis.com/mongodb + - name: database + value_regex: .* + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.operation.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: .* - instrumentation_source: agent.googleapis.com/mongodb + - name: operation + value_regex: .* + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.storage.size value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* - instrumentation_source: agent.googleapis.com/mongodb + - name: database + value_regex: .* + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.database.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - instrumentation_source: agent.googleapis.com/mongodb + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.index.access.count value_type: INT64 - monitored_resource: gce_instance + monitored_resources: [gce_instance] kind: GAUGE labels: - collection: .* - database: .* - instrumentation_source: agent.googleapis.com/mongodb + - name: collection + value_regex: .* + - name: database + value_regex: .* + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.document.operation.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* - operation: .* - instrumentation_source: agent.googleapis.com/mongodb + - name: database + value_regex: .* + - name: operation + value_regex: .* + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.network.io.receive value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - instrumentation_source: agent.googleapis.com/mongodb + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.network.io.transmit value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - instrumentation_source: agent.googleapis.com/mongodb + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.network.request.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - instrumentation_source: agent.googleapis.com/mongodb + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.operation.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: insert|query|update|delete|getmore|command - instrumentation_source: agent.googleapis.com/mongodb + - name: operation + value_regex: insert|query|update|delete|getmore|command + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.session.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - instrumentation_source: agent.googleapis.com/mongodb + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.cursor.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - instrumentation_source: agent.googleapis.com/mongodb + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb - type: workload.googleapis.com/mongodb.cursor.timeout.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - instrumentation_source: agent.googleapis.com/mongodb + - name: instrumentation_source + value_regex: agent.googleapis.com/mongodb expected_logs: - log_name: mongodb fields: diff --git a/integration_test/third_party_apps_test/applications/mssql/metadata.yaml b/integration_test/third_party_apps_test/applications/mssql/metadata.yaml index 4a8f78a47e..76c1d310cd 100644 --- a/integration_test/third_party_apps_test/applications/mssql/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/mssql/metadata.yaml @@ -13,7 +13,7 @@ # limitations under the License. public_url: "https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/third-party/mssql" -app_url: "https://docs.microsoft.com/en-us/sql/sql-server" +app_url: "https://docs.microsoft.com/sql/sql-server/" short_name: SQL Server long_name: Microsoft SQL Server logo_path: /stackdriver/images/mssql.png # supplied by google technical writer @@ -27,127 +27,125 @@ description: |- is provided at the instance level. Transaction and transaction log information is provided at the database level. - For more information on SQL Server, see the - [SQL Server](https://docs.microsoft.com/en-us/sql/sql-server) - documentation. + This integration doesn't support SQL Server named instances. minimum_supported_agent_version: metrics: 2.15.0 supported_operating_systems: windows +platforms_to_skip: + # Skip non-sql images. + - windows-cloud:windows-2016-core + - windows-cloud:windows-2022 supported_app_version: ["11.x", "12.x", "13.x", "14.x", "15.x"] expected_metrics: - # v1 metrics - - type: agent.googleapis.com/mssql/connections/user - value_type: DOUBLE - kind: GAUGE - monitored_resource: gce_instance - representative: true - - type: agent.googleapis.com/mssql/transaction_rate - value_type: DOUBLE - kind: GAUGE - monitored_resource: gce_instance - - type: agent.googleapis.com/mssql/write_transaction_rate - value_type: DOUBLE - kind: GAUGE - monitored_resource: gce_instance # v2 metrics - type: workload.googleapis.com/sqlserver.user.connection.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] + representative: true - type: workload.googleapis.com/sqlserver.lock.wait_time.avg value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/sqlserver.lock.wait.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/sqlserver.batch.request.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/sqlserver.batch.sql_compilation.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/sqlserver.batch.sql_recompilation.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/sqlserver.page.buffer_cache.hit_ratio value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/sqlserver.page.life_expectancy value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/sqlserver.page.split.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/sqlserver.page.lazy_write.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/sqlserver.page.checkpoint.flush.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/sqlserver.page.operation.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - type: .* + - name: type + value_regex: .* - type: workload.googleapis.com/sqlserver.transaction_log.growth.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/sqlserver.transaction_log.shrink.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/sqlserver.transaction_log.percent_used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/sqlserver.transaction_log.flush.wait.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/sqlserver.transaction_log.flush.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/sqlserver.transaction_log.flush.data.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/sqlserver.transaction.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* - type: workload.googleapis.com/sqlserver.transaction.write.rate value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database: .* + - name: database + value_regex: .* configuration_options: metrics: - type: mssql diff --git a/integration_test/third_party_apps_test/applications/mssqlv1/enable b/integration_test/third_party_apps_test/applications/mssqlv1/enable new file mode 100644 index 0000000000..4f2959b24c --- /dev/null +++ b/integration_test/third_party_apps_test/applications/mssqlv1/enable @@ -0,0 +1,16 @@ +$ErrorActionPreference = 'Stop' + +# This config gets merged with the built-in Ops Agent config, which already +# includes the v1 receiver in the default pipeline. + +# Create a back up of the existing file so existing configurations are not lost. +Copy-Item -Path 'C:\Program Files\Google\Cloud Operations\Ops Agent\config\config.yaml' -Destination 'C:\Program Files\Google\Cloud Operations\Ops Agent\config\config.yaml.bak' + +# Configure the Ops Agent. +Add-Content 'C:\Program Files\Google\Cloud Operations\Ops Agent\config\config.yaml' " +" + +# Stop-Service may fail if the service isn't in a Running state yet. +(Get-Service google-cloud-ops-agent*).WaitForStatus('Running', '00:03:00') +Stop-Service google-cloud-ops-agent -Force +Start-Service google-cloud-ops-agent* diff --git a/integration_test/third_party_apps_test/applications/mssqlv1/metadata.yaml b/integration_test/third_party_apps_test/applications/mssqlv1/metadata.yaml new file mode 100644 index 0000000000..075c8c9ac4 --- /dev/null +++ b/integration_test/third_party_apps_test/applications/mssqlv1/metadata.yaml @@ -0,0 +1,66 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +public_url: "https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/third-party/mssql" +app_url: "https://docs.microsoft.com/sql/sql-server/" +short_name: SQL Server +long_name: Microsoft SQL Server +logo_path: /stackdriver/images/mssql.png # supplied by google technical writer +description: |- + The v1 Microsoft SQL Server integration collects metrics from your SQL Server + instances. The metrics provide transaction-rate information and also data on + open connections. + + The v2 Microsoft SQL Server integration collects metrics from your SQL Server + instances and databases. Page, batch, lock, and user connection count information + is provided at the instance level. Transaction and transaction log information + is provided at the database level. + + This integration doesn't support SQL Server named instances. +minimum_supported_agent_version: + metrics: 1.0.0 +supported_operating_systems: windows +platforms_to_skip: + # Skip non-sql images. + - windows-cloud:windows-2016-core + - windows-cloud:windows-2022 +supported_app_version: ["11.x", "12.x", "13.x", "14.x", "15.x"] +expected_metrics: + # v1 metrics + - type: agent.googleapis.com/mssql/connections/user + value_type: DOUBLE + kind: GAUGE + monitored_resources: [gce_instance] + representative: true + - type: agent.googleapis.com/mssql/transaction_rate + value_type: DOUBLE + kind: GAUGE + monitored_resources: [gce_instance] + - type: agent.googleapis.com/mssql/write_transaction_rate + value_type: DOUBLE + kind: GAUGE + monitored_resources: [gce_instance] +configuration_options: + metrics: + - type: mssql + fields: + - name: type + default: null + description: This value must be `mssql`. + - name: collection_interval + default: 60s + description: A [time duration](https://pkg.go.dev/time#ParseDuration) value, such as `30s` or `5m`. + - name: receiver_version + default: "1" + description: Version of the metrics collected; use `2` to collect v2 metrics. diff --git a/integration_test/third_party_apps_test/applications/mssqlv1/windows/install b/integration_test/third_party_apps_test/applications/mssqlv1/windows/install new file mode 100644 index 0000000000..890af2e288 --- /dev/null +++ b/integration_test/third_party_apps_test/applications/mssqlv1/windows/install @@ -0,0 +1 @@ +# MSSQL integration will be tested on images with MSSQL pre-installed \ No newline at end of file diff --git a/integration_test/third_party_apps_test/applications/mysql/metadata.yaml b/integration_test/third_party_apps_test/applications/mysql/metadata.yaml index 5acabbe9b6..291484379c 100644 --- a/integration_test/third_party_apps_test/applications/mysql/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/mysql/metadata.yaml @@ -18,18 +18,14 @@ short_name: MySQL long_name: MySQL logo_path: /images/launcher/logos/mysql.png # supplied by google technical writer description: |- - The MySQL/MariaDB integration collects performance metrics related to + The MySQL integration collects performance metrics related to InnoDB, the buffer pool, and various other operations. It also collects general, error, and slow-query logs and parses them into a JSON payload. Error logs are parsed for their error code and subsystem. Slow-query logs are parsed into key-value pairs that describe the performance of a query, including query time and rows examined. configure_integration: |- - MariaDB is a community-developed, commercially supported fork of the MySQL - relational database management system (RDBMS). To collect logs and metrics for - MariaDB, use the `mysql` receivers. - - The `mysql` receiver connects by default to a local MySQL/MariaDB + The `mysql` receiver connects by default to a local MySQL server using a Unix socket and Unix authentication as the `root` user. minimum_supported_agent_version: metrics: 2.32.0 @@ -46,109 +42,124 @@ expected_metrics: - type: workload.googleapis.com/mysql.buffer_pool_data_pages value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - status: dirty|clean + - name: status + value_regex: dirty|clean - type: workload.googleapis.com/mysql.buffer_pool_limit value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mysql.buffer_pool_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: read_ahead|read_ahead_evicted|read_ahead_rnd|read_requests|reads|wait_free|write_requests + - name: operation + value_regex: read_ahead|read_ahead_evicted|read_ahead_rnd|read_requests|reads|wait_free|write_requests - type: workload.googleapis.com/mysql.buffer_pool_page_flushes value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mysql.buffer_pool_pages value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: data|free|misc + - name: kind + value_regex: data|free|misc - type: workload.googleapis.com/mysql.buffer_pool_size value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: clean|dirty + - name: kind + value_regex: clean|dirty - type: workload.googleapis.com/mysql.commands value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - command: delete|insert|select|update + - name: command + value_regex: delete|insert|select|update - type: workload.googleapis.com/mysql.double_writes value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: writes|pages_written + - name: kind + value_regex: writes|pages_written - type: workload.googleapis.com/mysql.handlers value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: commit|delete|discover|lock|mrr_init|prepare|read_first|read_key|read_last|read_next|read_prev|read_rnd|read_rnd_next|rollback|savepoint|savepoint_rollback|update|write + - name: kind + value_regex: commit|delete|discover|lock|mrr_init|prepare|read_first|read_key|read_last|read_next|read_prev|read_rnd|read_rnd_next|rollback|savepoint|savepoint_rollback|update|write - type: workload.googleapis.com/mysql.locks value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: immediate|waited + - name: kind + value_regex: immediate|waited - type: workload.googleapis.com/mysql.log_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: requests|waits|writes + - name: operation + value_regex: requests|waits|writes - type: workload.googleapis.com/mysql.operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: fsyncs|reads|writes + - name: operation + value_regex: fsyncs|reads|writes - type: workload.googleapis.com/mysql.page_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: created|read|written + - name: operation + value_regex: created|read|written - type: workload.googleapis.com/mysql.replica.time_behind_source value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mysql.replica.sql_delay value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/mysql.row_locks value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: time|waits + - name: kind + value_regex: time|waits - type: workload.googleapis.com/mysql.row_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: deleted|inserted|read|updated + - name: operation + value_regex: deleted|inserted|read|updated - type: workload.googleapis.com/mysql.sorts value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: merge_passes|range|rows|scan + - name: kind + value_regex: merge_passes|range|rows|scan - type: workload.googleapis.com/mysql.threads value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: cached|connected|created|running + - name: kind + value_regex: cached|connected|created|running representative: true expected_logs: - log_name: mysql_error @@ -231,60 +242,99 @@ expected_logs: - name: jsonPayload.errorNumber type: number description: 'The statement error number, or 0 if no error occurred' + notes: + - &log_slow_extra_note + These fields are only provided if the `log_slow_extra` system variable is set to `'ON'`. This variable is available as of MySQL 8.0.14. - name: jsonPayload.killed type: number description: 'If the statement was terminated, the error number indicating why, or 0 if the statement terminated normally' + notes: + - *log_slow_extra_note - name: jsonPayload.bytesReceived type: number description: 'The number of bytes received from all clients' + notes: + - *log_slow_extra_note - name: jsonPayload.bytesSent type: number description: 'The number of bytes sent to all clients' + notes: + - *log_slow_extra_note - name: jsonPayload.readFirst type: number description: 'The number of times the first entry in an index was read' + notes: + - *log_slow_extra_note - name: jsonPayload.readLast type: number description: 'The number of requests to read the last key in an index' + notes: + - *log_slow_extra_note - name: jsonPayload.readKey type: number description: 'The number of requests to read a row based on a key' + notes: + - *log_slow_extra_note - name: jsonPayload.readNext type: number description: 'The number of requests to read the next row in key order' + notes: + - *log_slow_extra_note - name: jsonPayload.readPrev type: number description: 'The number of requests to read the previous row in key order' + notes: + - *log_slow_extra_note - name: jsonPayload.readRnd type: number description: 'The number of requests to read a row based on a fixed position' + notes: + - *log_slow_extra_note - name: jsonPayload.readRndNext type: number description: 'The number of requests to read the next row in the data file' + notes: + - *log_slow_extra_note - name: jsonPayload.sortMergePasses type: number description: 'The number of merge passes that the sort algorithm has had to do' + notes: + - *log_slow_extra_note - name: jsonPayload.sortRangeCount type: number description: 'The number of sorts that were done using ranges' + notes: + - *log_slow_extra_note - name: jsonPayload.sortRows type: number description: 'The number of sorted rows' + notes: + - *log_slow_extra_note - name: jsonPayload.sortScanCount type: number description: 'The number of sorts that were done by scanning the table' + notes: + - *log_slow_extra_note - name: jsonPayload.createdTmpDiskTables type: number description: 'The number of internal on-disk temporary tables created by the server' + notes: + - *log_slow_extra_note - name: jsonPayload.createdTmpTables type: number description: 'The number of internal temporary tables created by the server' + notes: + - *log_slow_extra_note - name: jsonPayload.startTime type: string description: 'The statement execution start time' + notes: + - *log_slow_extra_note - name: jsonPayload.endTime type: string description: 'The statement execution end time' + notes: + - *log_slow_extra_note - name: severity type: string description: '' @@ -292,6 +342,8 @@ expected_logs: type: string description: Log entry level optional: true + notes: + - For information about these fields, refer to the [MySQL documentation](https://dev.mysql.com/doc/refman/8.0/en/slow-query-log.html). configuration_options: logs: - type: mysql_error @@ -352,17 +404,14 @@ configuration_options: default: null description: This value must be `mysql`. - name: endpoint - default: localhost:3306 - description: The url exposed by MySQL. + default: /var/run/mysqld/mysqld.sock + description: The `hostname:port` or Unix socket path starting with `/` used to connect to the MySQL server. - name: username - default: null + default: root description: The username used to connect to the server. - name: password default: null description: The password used to connect to the server. - - name: application_version - default: null - description: The version of mysql (major.minor) being monitored. Replication metrics are supported for version 5.7 by setting this to the value `5.7`. - name: collection_interval default: 60s description: A [time duration](https://pkg.go.dev/time#ParseDuration) value, such as `30s` or `5m`. diff --git a/integration_test/third_party_apps_test/applications/mysql5.7/metadata.yaml b/integration_test/third_party_apps_test/applications/mysql5.7/metadata.yaml index ed2d942377..1a9bbe4e26 100644 --- a/integration_test/third_party_apps_test/applications/mysql5.7/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/mysql5.7/metadata.yaml @@ -58,132 +58,166 @@ expected_metrics: - type: workload.googleapis.com/mysql.buffer_pool_data_pages value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - status: dirty|clean - instrumentation_source: agent.googleapis.com/mysql + - name: status + value_regex: dirty|clean + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.buffer_pool_limit value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - instrumentation_source: agent.googleapis.com/mysql + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.buffer_pool_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: read_ahead|read_ahead_evicted|read_ahead_rnd|read_requests|reads|wait_free|write_requests - instrumentation_source: agent.googleapis.com/mysql + - name: operation + value_regex: read_ahead|read_ahead_evicted|read_ahead_rnd|read_requests|reads|wait_free|write_requests + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.buffer_pool_page_flushes value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - instrumentation_source: agent.googleapis.com/mysql + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.buffer_pool_pages value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: data|free|misc - instrumentation_source: agent.googleapis.com/mysql + - name: kind + value_regex: data|free|misc + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.buffer_pool_size value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: clean|dirty - instrumentation_source: agent.googleapis.com/mysql + - name: kind + value_regex: clean|dirty + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.commands value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - command: delete|insert|select|update - instrumentation_source: agent.googleapis.com/mysql + - name: command + value_regex: delete|insert|select|update + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.double_writes value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: writes|pages_written - instrumentation_source: agent.googleapis.com/mysql + - name: kind + value_regex: writes|pages_written + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.handlers value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: commit|delete|discover|lock|mrr_init|prepare|read_first|read_key|read_last|read_next|read_prev|read_rnd|read_rnd_next|rollback|savepoint|savepoint_rollback|update|write - instrumentation_source: agent.googleapis.com/mysql + - name: kind + value_regex: commit|delete|discover|lock|mrr_init|prepare|read_first|read_key|read_last|read_next|read_prev|read_rnd|read_rnd_next|rollback|savepoint|savepoint_rollback|update|write + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.locks value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: immediate|waited - instrumentation_source: agent.googleapis.com/mysql + - name: kind + value_regex: immediate|waited + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.log_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: requests|waits|writes - instrumentation_source: agent.googleapis.com/mysql + - name: operation + value_regex: requests|waits|writes + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: fsyncs|reads|writes - instrumentation_source: agent.googleapis.com/mysql + - name: operation + value_regex: fsyncs|reads|writes + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.page_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: created|read|written - instrumentation_source: agent.googleapis.com/mysql + - name: operation + value_regex: created|read|written + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.replica.time_behind_source value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - instrumentation_source: agent.googleapis.com/mysql + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.replica.sql_delay value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - instrumentation_source: agent.googleapis.com/mysql + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.row_locks value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: time|waits - instrumentation_source: agent.googleapis.com/mysql + - name: kind + value_regex: time|waits + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.row_operations value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: deleted|inserted|read|updated - instrumentation_source: agent.googleapis.com/mysql + - name: operation + value_regex: deleted|inserted|read|updated + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.sorts value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: merge_passes|range|rows|scan - instrumentation_source: agent.googleapis.com/mysql + - name: kind + value_regex: merge_passes|range|rows|scan + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql - type: workload.googleapis.com/mysql.threads value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: cached|connected|created|running - instrumentation_source: agent.googleapis.com/mysql + - name: kind + value_regex: cached|connected|created|running + - name: instrumentation_source + value_regex: agent.googleapis.com/mysql representative: true expected_logs: # Mysql 5.7 error logs go to syslog by default @@ -331,17 +365,14 @@ configuration_options: default: null description: This value must be `mysql`. - name: endpoint - default: localhost:3306 - description: The url exposed by MySQL. + default: /var/run/mysqld/mysqld.sock + description: The `hostname:port` or Unix socket path starting with `/` used to connect to the MySQL server. - name: username - default: null + default: root description: The username used to connect to the server. - name: password default: null description: The password used to connect to the server. - - name: application_version - default: null - description: The version of mysql (major.minor) being monitored. Replication metrics are supported for version 5.7 by setting this to the value `5.7`. - name: collection_interval default: 60s description: A [time duration](https://pkg.go.dev/time#ParseDuration) value, such as `30s` or `5m`. diff --git a/integration_test/third_party_apps_test/applications/nginx/metadata.yaml b/integration_test/third_party_apps_test/applications/nginx/metadata.yaml index 64955f258e..a99fa873f2 100644 --- a/integration_test/third_party_apps_test/applications/nginx/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/nginx/metadata.yaml @@ -124,21 +124,22 @@ expected_metrics: - type: workload.googleapis.com/nginx.connections_accepted value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/nginx.connections_current value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* + - name: state + value_regex: .* - type: workload.googleapis.com/nginx.connections_handled value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/nginx.requests value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] representative: true expected_logs: - log_name: nginx_access diff --git a/integration_test/third_party_apps_test/applications/nvml/metadata.yaml b/integration_test/third_party_apps_test/applications/nvml/metadata.yaml index cee7c2ba1f..488952a4ed 100644 --- a/integration_test/third_party_apps_test/applications/nvml/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/nvml/metadata.yaml @@ -53,47 +53,70 @@ expected_metrics: - type: agent.googleapis.com/gpu/utilization value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - model: .* - uuid: .* - gpu_number: "[0-9]*" + - name: model + value_regex: .* + - name: uuid + value_regex: .* + - name: gpu_number + value_regex: "[0-9]*" representative: true - type: agent.googleapis.com/gpu/memory/bytes_used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - model: .* - uuid: .* - gpu_number: "[0-9]*" - memory_state: free|used + - name: model + value_regex: .* + - name: uuid + value_regex: .* + - name: gpu_number + value_regex: "[0-9]*" + - name: memory_state + value_regex: free|used - type: agent.googleapis.com/gpu/processes/utilization value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - model: .* - uuid: .* - gpu_number: "[0-9]*" - pid: "[0-9]*" - process: .* - command: .* - command_line: .* - owner: .* + - name: model + value_regex: .* + - name: uuid + value_regex: .* + - name: gpu_number + value_regex: "[0-9]*" + - name: pid + value_regex: "[0-9]*" + - name: process + value_regex: .* + - name: command + value_regex: .* + - name: command_line + value_regex: .* + - name: owner + value_regex: .* - type: agent.googleapis.com/gpu/processes/max_bytes_used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - model: .* - uuid: .* - gpu_number: "[0-9]*" - pid: "[0-9]*" - process: .* - command: .* - command_line: .* - owner: .* + - name: model + value_regex: .* + - name: uuid + value_regex: .* + - name: gpu_number + value_regex: "[0-9]*" + - name: pid + value_regex: "[0-9]*" + - name: process + value_regex: .* + - name: command + value_regex: .* + - name: command_line + value_regex: .* + - name: owner + value_regex: .* configuration_options: metrics: - type: hostmetrics diff --git a/integration_test/third_party_apps_test/applications/oracledb/metadata.yaml b/integration_test/third_party_apps_test/applications/oracledb/metadata.yaml index 34916bd524..ad3227cf07 100644 --- a/integration_test/third_party_apps_test/applications/oracledb/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/oracledb/metadata.yaml @@ -71,253 +71,372 @@ expected_metrics: - type: workload.googleapis.com/oracle.backup.latest value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* - type: workload.googleapis.com/oracle.buffer.cache.ratio value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.cursor.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.cursor.current value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.disk.operation.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - direction: read|write - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: direction + value_regex: read|write + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.disk.operation.size value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - direction: read|write - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: direction + value_regex: read|write + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.logon.count value_type: INT64 kind: CUMULATIVE representative: true - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.logon.current value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.network.data value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - direction: sent|received - global_name: .* - instance_id: .* - target: dblink|client + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: direction + value_regex: sent|received + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* + - name: target + value_regex: dblink|client - type: workload.googleapis.com/oracle.process.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.process.limit value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.process.pga_memory.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* - program: .* - state: free|used + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* + - name: program + value_regex: .* + - name: state + value_regex: free|used - type: workload.googleapis.com/oracle.row.cache.ratio value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.service.response_time value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.session.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.session.limit value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.sort.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* - type: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* + - name: type + value_regex: .* - type: workload.googleapis.com/oracle.sort.row.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.tablespace.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - contents: UNDO|PERMANENT|TEMP - database_id: .* - db_system: oracle - global_name: .* - status: ONLINE|OFFLINE|READONLY + - name: contents + value_regex: UNDO|PERMANENT|TEMP + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: status + value_regex: ONLINE|OFFLINE|READONLY - type: workload.googleapis.com/oracle.tablespace.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - contents: UNDO|PERMANENT|TEMP - database_id: .* - db_system: oracle - global_name: .* - state: used|free - tablespace_name: .* + - name: contents + value_regex: UNDO|PERMANENT|TEMP + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: state + value_regex: used|free + - name: tablespace_name + value_regex: .* - type: workload.googleapis.com/oracle.user.calls value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.user.commits value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.user.rollbacks value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* - type: workload.googleapis.com/oracle.wait.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* - type: foreground|background - wait_class: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* + - name: type + value_regex: foreground|background + - name: wait_class + value_regex: .* - type: workload.googleapis.com/oracle.wait.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* - type: foreground|background - wait_class: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* + - name: type + value_regex: foreground|background + - name: wait_class + value_regex: .* - type: workload.googleapis.com/oracle.wait.timeouts value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - database_id: .* - db_system: oracle - global_name: .* - instance_id: .* - type: foreground|background - wait_class: .* + - name: database_id + value_regex: .* + - name: db_system + value_regex: oracle + - name: global_name + value_regex: .* + - name: instance_id + value_regex: .* + - name: type + value_regex: foreground|background + - name: wait_class + value_regex: .* expected_logs: - log_name: oracledb_alert fields: diff --git a/integration_test/third_party_apps_test/applications/postgresql/metadata.yaml b/integration_test/third_party_apps_test/applications/postgresql/metadata.yaml index 4cb9b94a65..74c59c6f03 100644 --- a/integration_test/third_party_apps_test/applications/postgresql/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/postgresql/metadata.yaml @@ -38,138 +38,168 @@ supported_app_version: ["10.18+"] expected_metrics: - kind: GAUGE labels: - database: .* - monitored_resource: gce_instance + - name: database + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.backends value_type: INT64 representative: true - kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.bgwriter.buffers.allocated value_type: INT64 - kind: CUMULATIVE labels: - source: backend|backend_fsync|checkpoints|bgwriter - monitored_resource: gce_instance + - name: source + value_regex: backend|backend_fsync|checkpoints|bgwriter + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.bgwriter.buffers.writes value_type: INT64 - kind: CUMULATIVE labels: - type: requested|scheduled - monitored_resource: gce_instance + - name: type + value_regex: requested|scheduled + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.bgwriter.checkpoint.count value_type: INT64 - kind: CUMULATIVE labels: - type: sync|write - monitored_resource: gce_instance + - name: type + value_regex: sync|write + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.bgwriter.duration value_type: INT64 - kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.bgwriter.maxwritten value_type: INT64 - kind: CUMULATIVE labels: - database: .* - table: .* - source: heap_read|heap_hit|idx_read|idx_hit|toast_read|toast_hit|tidx_read|tidx_hit - monitored_resource: gce_instance + - name: database + value_regex: .* + - name: table + value_regex: .* + - name: source + value_regex: heap_read|heap_hit|idx_read|idx_hit|toast_read|toast_hit|tidx_read|tidx_hit + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.blocks_read value_type: INT64 - kind: CUMULATIVE labels: - database: .* - monitored_resource: gce_instance + - name: database + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.commits value_type: INT64 - kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.connection.max value_type: INT64 - kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.database.count value_type: INT64 - kind: GAUGE labels: - database: .* - monitored_resource: gce_instance + - name: database + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.db_size value_type: INT64 - kind: CUMULATIVE labels: - database: .* - table: .* - index: .* - monitored_resource: gce_instance + - name: database + value_regex: .* + - name: table + value_regex: .* + - name: index + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.index.scans value_type: INT64 - kind: GAUGE labels: - database: .* - table: .* - index: .* - monitored_resource: gce_instance + - name: database + value_regex: .* + - name: table + value_regex: .* + - name: index + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.index.size value_type: INT64 - kind: CUMULATIVE labels: - database: .* - table: .* - operation: ins|upd|del|hot_upd - monitored_resource: gce_instance + - name: database + value_regex: .* + - name: table + value_regex: .* + - name: operation + value_regex: ins|upd|del|hot_upd + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.operations value_type: INT64 - kind: GAUGE labels: - replication_client: .* - monitored_resource: gce_instance + - name: replication_client + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.replication.data_delay value_type: INT64 - kind: CUMULATIVE labels: - database: .* - monitored_resource: gce_instance + - name: database + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.rollbacks value_type: INT64 - kind: GAUGE labels: - database: .* - state: dead|live - table: .* - monitored_resource: gce_instance + - name: database + value_regex: .* + - name: state + value_regex: dead|live + - name: table + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.rows value_type: INT64 - kind: GAUGE labels: - database: .* - monitored_resource: gce_instance + - name: database + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.table.count value_type: INT64 - kind: GAUGE labels: - database: .* - table: .* - monitored_resource: gce_instance + - name: database + value_regex: .* + - name: table + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.table.size value_type: INT64 - kind: CUMULATIVE labels: - database: .* - table: .* - monitored_resource: gce_instance + - name: database + value_regex: .* + - name: table + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.table.vacuum.count value_type: INT64 - kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.wal.age value_type: INT64 - kind: GAUGE labels: - operation: flush|replay|write - replication_client: .* - monitored_resource: gce_instance + - name: operation + value_regex: flush|replay|write + - name: replication_client + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/postgresql.wal.lag value_type: INT64 expected_logs: diff --git a/integration_test/third_party_apps_test/applications/rabbitmq/metadata.yaml b/integration_test/third_party_apps_test/applications/rabbitmq/metadata.yaml index 519aa4c193..31267344d2 100644 --- a/integration_test/third_party_apps_test/applications/rabbitmq/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/rabbitmq/metadata.yaml @@ -43,20 +43,27 @@ expected_metrics: - type: workload.googleapis.com/rabbitmq.consumer.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - node_name: .* - queue_name: .* - vhost_name: .* + - name: node_name + value_regex: .* + - name: queue_name + value_regex: .* + - name: vhost_name + value_regex: .* - type: workload.googleapis.com/rabbitmq.message.current value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* - node_name: .* - queue_name: .* - vhost_name: .* + - name: state + value_regex: .* + - name: node_name + value_regex: .* + - name: queue_name + value_regex: .* + - name: vhost_name + value_regex: .* representative: true expected_logs: - log_name: rabbitmq diff --git a/integration_test/third_party_apps_test/applications/redis/metadata.yaml b/integration_test/third_party_apps_test/applications/redis/metadata.yaml index a11676947f..7f617c6ad4 100644 --- a/integration_test/third_party_apps_test/applications/redis/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/redis/metadata.yaml @@ -37,102 +37,103 @@ expected_metrics: - type: workload.googleapis.com/redis.clients.blocked value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.clients.connected value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.clients.max_input_buffer value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] representative: true - type: workload.googleapis.com/redis.clients.max_output_buffer value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.commands.processed value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.connections.received value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.connections.rejected value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.cpu.time value_type: DOUBLE kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* + - name: state + value_regex: .* - type: workload.googleapis.com/redis.keys.evicted value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.keys.expired value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.keyspace.hits value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.keyspace.misses value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.latest_fork value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.memory.fragmentation_ratio value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.memory.lua value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.memory.peak value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.memory.rss value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.memory.used value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.net.input value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.net.output value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.rdb.changes_since_last_save value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.replication.backlog_first_byte_offset value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.replication.offset value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/redis.slaves.connected value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] expected_logs: - log_name: redis fields: diff --git a/integration_test/third_party_apps_test/applications/saphana/metadata.yaml b/integration_test/third_party_apps_test/applications/saphana/metadata.yaml index ea2a9ed98c..b2c33d6bf2 100644 --- a/integration_test/third_party_apps_test/applications/saphana/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/saphana/metadata.yaml @@ -63,328 +63,429 @@ supported_app_version: ["2.0"] expected_metrics: - kind: GAUGE labels: - rating: .* - monitored_resource: gce_instance + - name: rating + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.alert.count value_type: INT64 - kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.backup.latest optional: true value_type: INT64 - kind: GAUGE labels: - host: .* - subtype: data|dict|index|misc - type: main|delta - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: subtype + value_regex: data|dict|index|misc + - name: type + value_regex: main|delta + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.column.memory.used value_type: INT64 - kind: GAUGE labels: - component: .* - host: .* - monitored_resource: gce_instance + - name: component + value_regex: .* + - name: host + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.component.memory.used value_type: INT64 - kind: GAUGE labels: - host: .* - status: running|idle|queueing - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: status + value_regex: running|idle|queueing + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.connection.count representative: true value_type: INT64 - kind: CUMULATIVE labels: - host: .* - type: user|system|io_wait|idle - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: type + value_regex: user|system|io_wait|idle + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.cpu.used value_type: INT64 - kind: GAUGE labels: - host: .* - path: .* - state: used|free - usage_type: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: path + value_regex: .* + - name: state + value_regex: used|free + - name: usage_type + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.disk.size.current value_type: INT64 - kind: GAUGE labels: - host: .* - state: used|free - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: state + value_regex: used|free + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.host.memory.current value_type: INT64 - kind: GAUGE labels: - host: .* - state: used|free - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: state + value_regex: used|free + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.host.swap.current value_type: INT64 - kind: GAUGE labels: - host: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.instance.code_size value_type: INT64 - kind: GAUGE labels: - host: .* - state: used|free - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: state + value_regex: used|free + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.instance.memory.current value_type: INT64 - kind: GAUGE labels: - host: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.instance.memory.shared.allocated value_type: INT64 - kind: GAUGE labels: - host: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.instance.memory.used.peak value_type: INT64 - kind: GAUGE labels: - product: .* - system: .* - monitored_resource: gce_instance + - name: product + value_regex: .* + - name: system + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.license.expiration.time value_type: INT64 - kind: GAUGE labels: - product: .* - system: .* - monitored_resource: gce_instance + - name: product + value_regex: .* + - name: system + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.license.limit value_type: INT64 - kind: GAUGE labels: - product: .* - system: .* - monitored_resource: gce_instance + - name: product + value_regex: .* + - name: system + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.license.peak value_type: INT64 - kind: GAUGE labels: - host: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.network.request.average_time value_type: DOUBLE - kind: GAUGE labels: - host: .* - state: active|pending - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: state + value_regex: active|pending + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.network.request.count value_type: INT64 - kind: CUMULATIVE labels: - host: .* - type: internal|external - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: type + value_regex: internal|external + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.network.request.finished.count value_type: INT64 - kind: GAUGE labels: - mode: .* - port: .* - primary: .* - secondary: .* - monitored_resource: gce_instance + - name: mode + value_regex: .* + - name: port + value_regex: .* + - name: primary + value_regex: .* + - name: secondary + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.replication.average_time optional: true value_type: DOUBLE - kind: GAUGE labels: - mode: .* - port: .* - primary: .* - secondary: .* - monitored_resource: gce_instance + - name: mode + value_regex: .* + - name: port + value_regex: .* + - name: primary + value_regex: .* + - name: secondary + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.replication.backlog.size optional: true value_type: INT64 - kind: GAUGE labels: - mode: .* - port: .* - primary: .* - secondary: .* - monitored_resource: gce_instance + - name: mode + value_regex: .* + - name: port + value_regex: .* + - name: primary + value_regex: .* + - name: secondary + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.replication.backlog.time optional: true value_type: INT64 - kind: GAUGE labels: - host: .* - type: fixed|variable - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: type + value_regex: fixed|variable + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.row_store.memory.used value_type: INT64 - kind: GAUGE labels: - host: .* - schema: .* - type: main|delta|history_main|history_delta - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: schema + value_regex: .* + - name: type + value_regex: main|delta|history_main|history_delta + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.schema.memory.used.current value_type: INT64 - kind: GAUGE labels: - host: .* - schema: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: schema + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.schema.memory.used.max value_type: INT64 - kind: CUMULATIVE labels: - host: .* - schema: .* - type: read|write|merge - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: schema + value_regex: .* + - name: type + value_regex: read|write|merge + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.schema.operation.count value_type: INT64 - kind: GAUGE labels: - host: .* - schema: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: schema + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.schema.record.compressed.count value_type: INT64 - kind: GAUGE labels: - host: .* - schema: .* - type: main|delta|history_main|history_delta - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: schema + value_regex: .* + - name: type + value_regex: main|delta|history_main|history_delta + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.schema.record.count value_type: INT64 - kind: GAUGE labels: - host: .* - service: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: service + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.service.code_size value_type: INT64 - kind: GAUGE labels: - host: .* - status: active|inactive - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: status + value_regex: active|inactive + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.service.count value_type: INT64 - kind: GAUGE labels: - host: .* - service: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: service + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.service.memory.compactors.allocated value_type: INT64 - kind: GAUGE labels: - host: .* - service: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: service + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.service.memory.compactors.freeable value_type: INT64 - kind: GAUGE labels: - host: .* - service: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: service + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.service.memory.effective_limit value_type: INT64 - kind: GAUGE labels: - host: .* - service: .* - state: used|free - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: service + value_regex: .* + - name: state + value_regex: used|free + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.service.memory.heap.current value_type: INT64 - kind: GAUGE labels: - host: .* - service: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: service + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.service.memory.limit value_type: INT64 - kind: GAUGE labels: - host: .* - service: .* - state: used|free - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: service + value_regex: .* + - name: state + value_regex: used|free + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.service.memory.shared.current value_type: INT64 - kind: GAUGE labels: - host: .* - service: .* - type: logical|physical - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: service + value_regex: .* + - name: type + value_regex: logical|physical + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.service.memory.used value_type: INT64 - kind: GAUGE labels: - host: .* - service: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: service + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.service.stack_size value_type: INT64 - kind: GAUGE labels: - host: .* - status: active|inactive - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: status + value_regex: active|inactive + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.service.thread.count value_type: INT64 - kind: GAUGE labels: - host: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.transaction.blocked optional: true value_type: INT64 - kind: CUMULATIVE labels: - host: .* - type: update|commit|rollback - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: type + value_regex: update|commit|rollback + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.transaction.count value_type: INT64 - kind: CUMULATIVE labels: - host: .* - path: .* - type: read|write - usage_type: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: path + value_regex: .* + - name: type + value_regex: read|write + - name: usage_type + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.volume.operation.count value_type: INT64 - kind: CUMULATIVE labels: - host: .* - path: .* - type: read|write - usage_type: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: path + value_regex: .* + - name: type + value_regex: read|write + - name: usage_type + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.volume.operation.size value_type: INT64 - kind: CUMULATIVE labels: - host: .* - path: .* - type: read|write - usage_type: .* - monitored_resource: gce_instance + - name: host + value_regex: .* + - name: path + value_regex: .* + - name: type + value_regex: read|write + - name: usage_type + value_regex: .* + monitored_resources: [gce_instance] type: workload.googleapis.com/saphana.volume.operation.time value_type: INT64 expected_logs: diff --git a/integration_test/third_party_apps_test/applications/solr/metadata.yaml b/integration_test/third_party_apps_test/applications/solr/metadata.yaml index 2290b54561..240a8200d1 100644 --- a/integration_test/third_party_apps_test/applications/solr/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/solr/metadata.yaml @@ -50,83 +50,107 @@ expected_metrics: - type: workload.googleapis.com/solr.cache.eviction.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - cache: .* - core: .* + - name: cache + value_regex: .* + - name: core + value_regex: .* - type: workload.googleapis.com/solr.cache.hit.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - cache: .* - core: .* + - name: cache + value_regex: .* + - name: core + value_regex: .* - type: workload.googleapis.com/solr.cache.insert.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - cache: .* - core: .* + - name: cache + value_regex: .* + - name: core + value_regex: .* - type: workload.googleapis.com/solr.cache.lookup.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - cache: .* - core: .* + - name: cache + value_regex: .* + - name: core + value_regex: .* - type: workload.googleapis.com/solr.cache.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - cache: .* - core: .* + - name: cache + value_regex: .* + - name: core + value_regex: .* representative: true - type: workload.googleapis.com/solr.document.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - core: .* + - name: core + value_regex: .* - type: workload.googleapis.com/solr.index.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - core: .* + - name: core + value_regex: .* - type: workload.googleapis.com/solr.request.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - core: .* - handler: .* - type: .* + - name: core + value_regex: .* + - name: handler + value_regex: .* + - name: type + value_regex: .* - type: workload.googleapis.com/solr.request.error.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - core: .* - handler: .* - type: .* + - name: core + value_regex: .* + - name: handler + value_regex: .* + - name: type + value_regex: .* - type: workload.googleapis.com/solr.request.time.average value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - core: .* - handler: .* - type: .* + - name: core + value_regex: .* + - name: handler + value_regex: .* + - name: type + value_regex: .* - type: workload.googleapis.com/solr.request.timeout.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - core: .* - handler: .* - type: .* + - name: core + value_regex: .* + - name: handler + value_regex: .* + - name: type + value_regex: .* expected_logs: - log_name: solr_system fields: diff --git a/integration_test/third_party_apps_test/applications/tomcat/metadata.yaml b/integration_test/third_party_apps_test/applications/tomcat/metadata.yaml index 59bc8d7bff..f91726850d 100644 --- a/integration_test/third_party_apps_test/applications/tomcat/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/tomcat/metadata.yaml @@ -51,46 +51,54 @@ expected_metrics: - type: workload.googleapis.com/tomcat.errors value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - proto_handler: .* + - name: proto_handler + value_regex: .* - type: workload.googleapis.com/tomcat.max_time value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - proto_handler: .* + - name: proto_handler + value_regex: .* - type: workload.googleapis.com/tomcat.processing_time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - proto_handler: .* + - name: proto_handler + value_regex: .* - type: workload.googleapis.com/tomcat.request_count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - proto_handler: .* + - name: proto_handler + value_regex: .* - type: workload.googleapis.com/tomcat.sessions value_type: DOUBLE kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/tomcat.threads value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - proto_handler: .* - state: .* + - name: proto_handler + value_regex: .* + - name: state + value_regex: .* representative: true - type: workload.googleapis.com/tomcat.traffic value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - direction: .* - proto_handler: .* + - name: direction + value_regex: .* + - name: proto_handler + value_regex: .* expected_logs: - log_name: tomcat_system fields: diff --git a/integration_test/third_party_apps_test/applications/varnish/metadata.yaml b/integration_test/third_party_apps_test/applications/varnish/metadata.yaml index fe8920b1d5..591f963c02 100644 --- a/integration_test/third_party_apps_test/applications/varnish/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/varnish/metadata.yaml @@ -37,60 +37,66 @@ expected_metrics: - type: workload.googleapis.com/varnish.backend.connection.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: .* + - name: kind + value_regex: .* representative: true - type: workload.googleapis.com/varnish.backend.request.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/varnish.cache.operation.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: .* + - name: operation + value_regex: .* - type: workload.googleapis.com/varnish.client.request.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - state: .* + - name: state + value_regex: .* - type: workload.googleapis.com/varnish.client.request.error.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - status_code: .* + - name: status_code + value_regex: .* - type: workload.googleapis.com/varnish.object.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/varnish.object.expired value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/varnish.object.moved value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/varnish.object.nuked value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/varnish.session.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - kind: .* + - name: kind + value_regex: .* - type: workload.googleapis.com/varnish.thread.operation.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - operation: .* + - name: operation + value_regex: .* configuration_options: logs: - type: varnish diff --git a/integration_test/third_party_apps_test/applications/vault/metadata.yaml b/integration_test/third_party_apps_test/applications/vault/metadata.yaml index cbe5d0e10d..8a7af8cfc0 100644 --- a/integration_test/third_party_apps_test/applications/vault/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/vault/metadata.yaml @@ -75,107 +75,118 @@ supported_app_version: ["1.6+"] expected_metrics: - type: workload.googleapis.com/vault.core.request.count kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: INT64 labels: - cluster: .* + - name: cluster + value_regex: .* - type: workload.googleapis.com/vault.core.leader.duration optional: true kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: DOUBLE - type: workload.googleapis.com/vault.token.lease.count optional: true kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: INT64 - type: workload.googleapis.com/vault.token.count optional: true kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: INT64 labels: - namespace: .* - cluster: .* + - name: namespace + value_regex: .* + - name: cluster + value_regex: .* - type: workload.googleapis.com/vault.token.revoke.time optional: true kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: INT64 - type: workload.googleapis.com/vault.token.renew.time optional: true kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: INT64 - type: workload.googleapis.com/vault.audit.request.failed kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: INT64 - type: workload.googleapis.com/vault.audit.response.failed kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: INT64 - type: workload.googleapis.com/vault.memory.usage representative: true kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: DOUBLE - type: workload.googleapis.com/vault.storage.operation.put.time optional: true kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: DOUBLE labels: - storage: .* + - name: storage + value_regex: .* - type: workload.googleapis.com/vault.storage.operation.delete.time optional: true kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: DOUBLE labels: - storage: .* + - name: storage + value_regex: .* - type: workload.googleapis.com/vault.storage.operation.list.time optional: true kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: DOUBLE labels: - storage: .* + - name: storage + value_regex: .* - type: workload.googleapis.com/vault.storage.operation.get.time optional: true kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: DOUBLE labels: - storage: .* + - name: storage + value_regex: .* - type: workload.googleapis.com/vault.storage.operation.put.count optional: true kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: INT64 labels: - storage: .* + - name: storage + value_regex: .* - type: workload.googleapis.com/vault.storage.operation.delete.count optional: true kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: INT64 labels: - storage: .* + - name: storage + value_regex: .* - type: workload.googleapis.com/vault.storage.operation.list.count optional: true kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: INT64 labels: - storage: .* + - name: storage + value_regex: .* - type: workload.googleapis.com/vault.storage.operation.get.count optional: true kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] value_type: INT64 labels: - storage: .* + - name: storage + value_regex: .* expected_logs: - log_name: vault_audit fields: diff --git a/integration_test/third_party_apps_test/applications/wildfly/metadata.yaml b/integration_test/third_party_apps_test/applications/wildfly/metadata.yaml index 6f4d061ced..56a2729a42 100644 --- a/integration_test/third_party_apps_test/applications/wildfly/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/wildfly/metadata.yaml @@ -48,84 +48,101 @@ expected_metrics: - type: workload.googleapis.com/wildfly.session.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - deployment: .* + - name: deployment + value_regex: .* optional: true - type: workload.googleapis.com/wildfly.session.active value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - deployment: .* + - name: deployment + value_regex: .* optional: true - type: workload.googleapis.com/wildfly.session.expired value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - deployment: .* + - name: deployment + value_regex: .* optional: true - type: workload.googleapis.com/wildfly.session.rejected value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - deployment: .* + - name: deployment + value_regex: .* optional: true - type: workload.googleapis.com/wildfly.request.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - listener: .* - server: .* + - name: listener + value_regex: .* + - name: server + value_regex: .* - type: workload.googleapis.com/wildfly.request.time value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - listener: .* - server: .* + - name: listener + value_regex: .* + - name: server + value_regex: .* - type: workload.googleapis.com/wildfly.request.server_error value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - listener: .* - server: .* + - name: listener + value_regex: .* + - name: server + value_regex: .* - type: workload.googleapis.com/wildfly.network.io value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - listener: .* - server: .* - state: .* + - name: listener + value_regex: .* + - name: server + value_regex: .* + - name: state + value_regex: .* representative: true - type: workload.googleapis.com/wildfly.jdbc.connection.open value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - data_source: .* - state: .* + - name: data_source + value_regex: .* + - name: state + value_regex: .* - type: workload.googleapis.com/wildfly.jdbc.request.wait value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - data_source: .* + - name: data_source + value_regex: .* - type: workload.googleapis.com/wildfly.jdbc.transaction.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/wildfly.jdbc.rollback.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - cause: .* + - name: cause + value_regex: .* expected_logs: - log_name: wildfly_system fields: diff --git a/integration_test/third_party_apps_test/applications/zookeeper/metadata.yaml b/integration_test/third_party_apps_test/applications/zookeeper/metadata.yaml index 35af18a0a7..f5b0dacf3b 100644 --- a/integration_test/third_party_apps_test/applications/zookeeper/metadata.yaml +++ b/integration_test/third_party_apps_test/applications/zookeeper/metadata.yaml @@ -31,65 +31,66 @@ expected_metrics: - type: workload.googleapis.com/zookeeper.connection.active value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/zookeeper.data_tree.ephemeral_node.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/zookeeper.data_tree.size value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/zookeeper.file_descriptor.limit value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] representative: true - type: workload.googleapis.com/zookeeper.file_descriptor.open value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/zookeeper.fsync.exceeded_threshold.count optional: true value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/zookeeper.latency.avg optional: true value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/zookeeper.latency.max value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/zookeeper.latency.min value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/zookeeper.packet.count value_type: INT64 kind: CUMULATIVE - monitored_resource: gce_instance + monitored_resources: [gce_instance] labels: - direction: .* + - name: direction + value_regex: .* - type: workload.googleapis.com/zookeeper.request.active value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/zookeeper.watch.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] - type: workload.googleapis.com/zookeeper.znode.count value_type: INT64 kind: GAUGE - monitored_resource: gce_instance + monitored_resources: [gce_instance] expected_logs: - log_name: zookeeper_general fields: - name: jsonPayload.message - value_regex: (?s)binding to port 0.0.0.0/0.0.0.0:2181.* # The (?s) part will make the . match with newline as well. See https://github.com/google/re2/blob/main/doc/syntax.txt#L65,L68 + value_regex: (?s)binding to port 0.0.0.0/0.0.0.0:2181.* # The (?s) part will make the . match with newline as well. See https://github.com/google/re2/blob/main/doc/syntax.txt#L65,L68 type: string description: Log message, including detailed stacktrace where provided - name: jsonPayload.thread diff --git a/integration_test/third_party_apps_test/main_test.go b/integration_test/third_party_apps_test/main_test.go index 78d8a8fbf2..92d8206496 100644 --- a/integration_test/third_party_apps_test/main_test.go +++ b/integration_test/third_party_apps_test/main_test.go @@ -518,7 +518,7 @@ func runMetricsTestCases(ctx context.Context, logger *log.Logger, vm *gce.VM, me err = multierr.Append(err, <-c) } - if fc == nil { + if fc == nil || len(fc.Features) == 0 { logger.Printf("skipping feature tracking integration tests") return err } @@ -547,7 +547,7 @@ func assertMetric(ctx context.Context, logger *log.Logger, vm *gce.VM, metric *m // and ensures that the agent uploads data from the app. // Returns an error (nil on success), and a boolean indicating whether the error // is retryable. -func runSingleTest(ctx context.Context, logger *logging.DirectoryLogger, vm *gce.VM, app string, metadata metadata.IntegrationMetadata) (retry bool, err error) { +func runSingleTest(ctx context.Context, logger *logging.DirectoryLogger, vm *gce.VM, app string, integrationMetadata metadata.IntegrationMetadata) (retry bool, err error) { folder, err := distroFolder(vm) if err != nil { return nonRetryable, err @@ -575,7 +575,7 @@ func runSingleTest(ctx context.Context, logger *logging.DirectoryLogger, vm *gce } } - if metadata.RestartAfterInstall { + if integrationMetadata.RestartAfterInstall { logger.ToMainLog().Printf("Restarting VM instance...") restartLogger := logger.ToFile("VM_restart.txt") err := gce.RestartInstance(ctx, restartLogger, vm) @@ -609,17 +609,17 @@ func runSingleTest(ctx context.Context, logger *logging.DirectoryLogger, vm *gce } } - if metadata.ExpectedLogs != nil { + if integrationMetadata.ExpectedLogs != nil { logger.ToMainLog().Println("found expectedLogs, running logging test cases...") // TODO(b/254325217): bad bad bad, remove this horrible hack once we fix Aerospike on SLES if app == AerospikeApp && folder == "sles" { logger.ToMainLog().Printf("skipping aerospike logging tests (b/254325217)") - } else if err = runLoggingTestCases(ctx, logger.ToMainLog(), vm, metadata.ExpectedLogs); err != nil { + } else if err = runLoggingTestCases(ctx, logger.ToMainLog(), vm, integrationMetadata.ExpectedLogs); err != nil { return nonRetryable, err } } - if metadata.ExpectedMetrics != nil { + if integrationMetadata.ExpectedMetrics != nil { logger.ToMainLog().Println("found expectedMetrics, running metrics test cases...") // All integrations are expected to set the instrumentation_* labels. @@ -628,26 +628,41 @@ func runSingleTest(ctx context.Context, logger *logging.DirectoryLogger, vm *gce if app == "mariadb" { instrumentedApp = "mysql" } - for _, m := range metadata.ExpectedMetrics { + for _, m := range integrationMetadata.ExpectedMetrics { // The windows metrics that do not target workload.googleapis.com cannot set // the instrumentation_* labels if strings.HasPrefix(m.Type, "agent.googleapis.com") { continue } if m.Labels == nil { - m.Labels = map[string]string{} + m.Labels = []*metadata.MetricLabel{} } - if _, ok := m.Labels["instrumentation_source"]; !ok { - m.Labels["instrumentation_source"] = regexp.QuoteMeta(fmt.Sprintf("agent.googleapis.com/%s", instrumentedApp)) + foundInstrumentationSource := false + foundInstrumentationVersion := false + for _, l := range m.Labels { + if l.Name == "instrumentation_source" { + foundInstrumentationSource = true + } else if l.Name == "instrumentation_version" { + foundInstrumentationVersion = true + } + } + if !foundInstrumentationSource { + m.Labels = append(m.Labels, &metadata.MetricLabel{ + Name: "instrumentation_source", + ValueRegex: regexp.QuoteMeta(fmt.Sprintf("agent.googleapis.com/%s", instrumentedApp)), + }) } - if _, ok := m.Labels["instrumentation_version"]; !ok { - m.Labels["instrumentation_version"] = `.*` + if !foundInstrumentationVersion { + m.Labels = append(m.Labels, &metadata.MetricLabel{ + Name: "instrumentation_version", + ValueRegex: `.*`, + }) } } fc, err := getExpectedFeatures(app) - if err = runMetricsTestCases(ctx, logger.ToMainLog(), vm, metadata.ExpectedMetrics, fc); err != nil { + if err = runMetricsTestCases(ctx, logger.ToMainLog(), vm, integrationMetadata.ExpectedMetrics, fc); err != nil { return nonRetryable, err } } @@ -922,22 +937,27 @@ func determineTestsToSkip(tests []test, impactedApps map[string]bool) { } if metadata.SliceContains(test.metadata.PlatformsToSkip, test.imageSpec) { tests[i].skipReason = "Skipping test due to 'platforms_to_skip' entry in metadata.yaml" + continue } for _, gpuPlatform := range test.metadata.GpuPlatforms { if test.gpu != nil && test.gpu.model == gpuPlatform.Model && !metadata.SliceContains(gpuPlatform.Platforms, test.imageSpec) { tests[i].skipReason = "Skipping test due to 'gpu_platforms.platforms' entry in metadata.yaml" + continue } } if reason := incompatibleOperatingSystem(test); reason != "" { tests[i].skipReason = reason + continue } - if test.app == "mssql" && strings.HasPrefix(test.imageSpec, "windows-cloud") { + if strings.HasPrefix(test.app, "mssql") && strings.HasPrefix(test.imageSpec, "windows-cloud") { tests[i].skipReason = "Skipping MSSQL test because this version of Windows doesn't have MSSQL" + continue } isSAPHANAImageSpec := test.imageSpec == SAPHANAImageSpec isSAPHANAApp := test.app == SAPHANAApp if isSAPHANAImageSpec != isSAPHANAApp { tests[i].skipReason = fmt.Sprintf("Skipping %v because we only want to test %v on %v", test.app, SAPHANAApp, SAPHANAImageSpec) + continue } } } diff --git a/submodules/fluent-bit b/submodules/fluent-bit index 7de2c45227..bda73d8850 160000 --- a/submodules/fluent-bit +++ b/submodules/fluent-bit @@ -1 +1 @@ -Subproject commit 7de2c45227468b51d6337141efbe2827dc48ea5f +Subproject commit bda73d88500166a2b8cce95aa0bad9316a9639b9