diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fb77dc5a3..c3e7b29629 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased + ## v0.92.0 This Splunk OpenTelemetry Collector release includes changes from the [opentelemetry-collector v0.92.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.92.0) and the [opentelemetry-collector-contrib v0.92.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.92.0) releases where appropriate. @@ -113,7 +114,6 @@ This Splunk OpenTelemetry Collector release includes changes from the [opentelem - (Splunk) Adopt `awss3` exporter ([#4117](https://github.com/signalfx/splunk-otel-collector/pull/4117)) - (Splunk) Convert loglevel to verbosity on logging exporter ([#4097](https://github.com/signalfx/splunk-otel-collector/pull/4097)) - ## v0.91.1 ### 💡 Enhancements 💡 diff --git a/cmd/otelcol/config/collector/config.d.linux/properties.discovery.yaml.example b/cmd/otelcol/config/collector/config.d.linux/properties.discovery.yaml.example index 996df50aa7..6200e3ded4 100644 --- a/cmd/otelcol/config/collector/config.d.linux/properties.discovery.yaml.example +++ b/cmd/otelcol/config/collector/config.d.linux/properties.discovery.yaml.example @@ -11,6 +11,8 @@ splunk.discovery: k8s_observer: enabled: true receivers: + mysql: + enabled: false postgresql: enabled: true smartagent/collectd/mysql: @@ -18,4 +20,4 @@ splunk.discovery: smartagent/collectd/nginx: enabled: true smartagent/postgresql: - enabled: false + enabled: false \ No newline at end of file diff --git a/cmd/otelcol/config/collector/config.d.linux/receivers/mysql.discovery.yaml b/cmd/otelcol/config/collector/config.d.linux/receivers/mysql.discovery.yaml new file mode 100644 index 0000000000..b8bd8cd04d --- /dev/null +++ b/cmd/otelcol/config/collector/config.d.linux/receivers/mysql.discovery.yaml @@ -0,0 +1,46 @@ +##################################################################################### +# This file is generated by the Splunk Distribution of the OpenTelemetry Collector. # +# # +# It reflects the default configuration bundled in the Collector executable for use # +# in discovery mode (--discovery) and is provided for reference or customization. # +# Please note that any changes made to this file will need to be reconciled during # +# upgrades of the Collector. # +##################################################################################### +# mysql: +# enabled: false +# rule: +# docker_observer: type == "container" and port != 33060 and any([name, image, command], {# matches "(?i)mysql"}) and not (command matches "splunk.discovery") +# host_observer: type == "hostport" and port != 33060 and command matches "(?i)mysqld" +# k8s_observer: type == "port" and port != 33060 and pod.name matches "(?i)mysql" +# config: +# default: +# username: splunk.discovery.default +# password: splunk.discovery.default +# status: +# metrics: +# successful: +# - strict: mysql.locks +# first_only: true +# log_record: +# severity_text: info +# body: Mysql receiver is working! +# statements: +# failed: +# - regexp: "Can't connect to MySQL server on .* [(]111[)]" +# first_only: true +# log_record: +# severity_text: info +# append_pattern: true +# body: The container cannot be reached by the Collector. The container is refusing MySQL connections. +# partial: +# - regexp: 'Access denied for user' +# first_only: true +# log_record: +# severity_text: info +# append_pattern: true +# body: >- +# Make sure your user credentials are correctly specified using the +# `--set splunk.discovery.receivers.mysql.config.username=""` and +# `--set splunk.discovery.receivers.mysql.config.password=""` command or the +# `SPLUNK_DISCOVERY_RECEIVERS_mysql_CONFIG_username=""` and +# `SPLUNK_DISCOVERY_RECEIVERS_mysql_CONFIG_password=""` environment variables. \ No newline at end of file diff --git a/internal/confmapprovider/discovery/README.md b/internal/confmapprovider/discovery/README.md index e1d23a7ef3..c33c8d63b3 100644 --- a/internal/confmapprovider/discovery/README.md +++ b/internal/confmapprovider/discovery/README.md @@ -136,6 +136,7 @@ By default, the discovery mode is provided with pre-made discovery config compon The following components have bundled discovery configurations in the last Splunk OpenTelemetry Collector release: I. Receivers +* `mysql` ([Linux and Windows](./bundle/bundle.d/receivers/mysql.discovery.yaml)) * `oracledb` ([Linux and Windows](./bundle/bundle.d/receivers/oracledb.discovery.yaml)) * `postgresql` ([Linux and Windows](./bundle/bundle.d/receivers/postgresql.discovery.yaml)) * `redis` ([Linux and Windows](./bundle/bundle.d/receivers/redis.discovery.yaml)) diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml new file mode 100644 index 0000000000..0dbbb510e5 --- /dev/null +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml @@ -0,0 +1,42 @@ +##################################################################################### +# Do not edit manually! # +# All changes must be made to associated .tmpl file before running 'make bundle.d'. # +##################################################################################### +mysql: + enabled: false + rule: + docker_observer: type == "container" and port != 33060 and any([name, image, command], {# matches "(?i)mysql"}) and not (command matches "splunk.discovery") + host_observer: type == "hostport" and port != 33060 and command matches "(?i)mysqld" + k8s_observer: type == "port" and port != 33060 and pod.name matches "(?i)mysql" + config: + default: + username: splunk.discovery.default + password: splunk.discovery.default + status: + metrics: + successful: + - strict: mysql.locks + first_only: true + log_record: + severity_text: info + body: Mysql receiver is working! + statements: + failed: + - regexp: "Can't connect to MySQL server on .* [(]111[)]" + first_only: true + log_record: + severity_text: info + append_pattern: true + body: The container cannot be reached by the Collector. The container is refusing MySQL connections. + partial: + - regexp: 'Access denied for user' + first_only: true + log_record: + severity_text: info + append_pattern: true + body: >- + Make sure your user credentials are correctly specified using the + `--set splunk.discovery.receivers.mysql.config.username=""` and + `--set splunk.discovery.receivers.mysql.config.password=""` command or the + `SPLUNK_DISCOVERY_RECEIVERS_mysql_CONFIG_username=""` and + `SPLUNK_DISCOVERY_RECEIVERS_mysql_CONFIG_password=""` environment variables. \ No newline at end of file diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml.tmpl b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml.tmpl new file mode 100644 index 0000000000..8cdd736c60 --- /dev/null +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml.tmpl @@ -0,0 +1,38 @@ +{{ receiver "mysql" }}: + enabled: false + rule: + docker_observer: type == "container" and port != 33060 and any([name, image, command], {# matches "(?i)mysql"}) and not (command matches "splunk.discovery") + host_observer: type == "hostport" and port != 33060 and command matches "(?i)mysqld" + k8s_observer: type == "port" and port != 33060 and pod.name matches "(?i)mysql" + config: + default: + username: {{ defaultValue }} + password: {{ defaultValue }} + status: + metrics: + successful: + - strict: mysql.locks + first_only: true + log_record: + severity_text: info + body: Mysql receiver is working! + statements: + failed: + - regexp: "Can't connect to MySQL server on .* [(]111[)]" + first_only: true + log_record: + severity_text: info + append_pattern: true + body: The container cannot be reached by the Collector. The container is refusing MySQL connections. + partial: + - regexp: 'Access denied for user' + first_only: true + log_record: + severity_text: info + append_pattern: true + body: >- + Make sure your user credentials are correctly specified using the + `--set {{ configProperty "username" "" }}` and + `--set {{ configProperty "password" "" }}` command or the + `{{ configPropertyEnvVar "username" "" }}` and + `{{ configPropertyEnvVar "password" "" }}` environment variables. \ No newline at end of file diff --git a/internal/confmapprovider/discovery/bundle/bundle_gen.go b/internal/confmapprovider/discovery/bundle/bundle_gen.go index 68f1c86424..54f899d949 100644 --- a/internal/confmapprovider/discovery/bundle/bundle_gen.go +++ b/internal/confmapprovider/discovery/bundle/bundle_gen.go @@ -23,6 +23,8 @@ //go:generate discoverybundler -r -t bundle.d/extensions/k8s-observer.discovery.yaml.tmpl //go:generate discoverybundler -r -c -d ../../../../cmd/otelcol/config/collector/config.d.linux/extensions -t bundle.d/extensions/k8s-observer.discovery.yaml.tmpl +//go:generate discoverybundler -r -t bundle.d/receivers/mysql.discovery.yaml.tmpl +//go:generate discoverybundler -r -c -d ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/mysql.discovery.yaml.tmpl //go:generate discoverybundler -r -t bundle.d/receivers/oracledb.discovery.yaml.tmpl //go:generate discoverybundler -r -c -d ../../../../cmd/otelcol/config/collector/config.d.linux/receivers -t bundle.d/receivers/oracledb.discovery.yaml.tmpl //go:generate discoverybundler -r -t bundle.d/receivers/postgresql.discovery.yaml.tmpl diff --git a/internal/confmapprovider/discovery/bundle/bundledfs_other_test.go b/internal/confmapprovider/discovery/bundle/bundledfs_other_test.go index 2230c9756c..6c9662bbe1 100644 --- a/internal/confmapprovider/discovery/bundle/bundledfs_other_test.go +++ b/internal/confmapprovider/discovery/bundle/bundledfs_other_test.go @@ -27,6 +27,7 @@ func TestBundleDir(t *testing.T) { receivers, err := fs.Glob(BundledFS, "bundle.d/receivers/*.discovery.yaml") require.NoError(t, err) require.Equal(t, []string{ + "bundle.d/receivers/mysql.discovery.yaml", "bundle.d/receivers/oracledb.discovery.yaml", "bundle.d/receivers/postgresql.discovery.yaml", "bundle.d/receivers/redis.discovery.yaml", diff --git a/internal/confmapprovider/discovery/bundle/bundledfs_others.go b/internal/confmapprovider/discovery/bundle/bundledfs_others.go index b46c7ca5ce..4baa732a34 100644 --- a/internal/confmapprovider/discovery/bundle/bundledfs_others.go +++ b/internal/confmapprovider/discovery/bundle/bundledfs_others.go @@ -25,6 +25,7 @@ import ( //go:embed bundle.d/extensions/docker-observer.discovery.yaml //go:embed bundle.d/extensions/host-observer.discovery.yaml //go:embed bundle.d/extensions/k8s-observer.discovery.yaml +//go:embed bundle.d/receivers/mysql.discovery.yaml //go:embed bundle.d/receivers/oracledb.discovery.yaml //go:embed bundle.d/receivers/postgresql.discovery.yaml //go:embed bundle.d/receivers/redis.discovery.yaml diff --git a/internal/confmapprovider/discovery/bundle/bundledfs_windows.go b/internal/confmapprovider/discovery/bundle/bundledfs_windows.go index 45c49f9cda..98fde1e07d 100644 --- a/internal/confmapprovider/discovery/bundle/bundledfs_windows.go +++ b/internal/confmapprovider/discovery/bundle/bundledfs_windows.go @@ -25,6 +25,7 @@ import ( //go:embed bundle.d/extensions/docker-observer.discovery.yaml //go:embed bundle.d/extensions/host-observer.discovery.yaml //go:embed bundle.d/extensions/k8s-observer.discovery.yaml +//go:embed bundle.d/receivers/mysql.discovery.yaml //go:embed bundle.d/receivers/oracledb.discovery.yaml //go:embed bundle.d/receivers/postgresql.discovery.yaml //go:embed bundle.d/receivers/redis.discovery.yaml diff --git a/internal/confmapprovider/discovery/bundle/bundledfs_windows_test.go b/internal/confmapprovider/discovery/bundle/bundledfs_windows_test.go index 1f77367baa..1368cd52dd 100644 --- a/internal/confmapprovider/discovery/bundle/bundledfs_windows_test.go +++ b/internal/confmapprovider/discovery/bundle/bundledfs_windows_test.go @@ -27,6 +27,7 @@ func TestBundleDir(t *testing.T) { receivers, err := fs.Glob(BundledFS, "bundle.d/receivers/*.discovery.yaml") require.NoError(t, err) require.Equal(t, []string{ + "bundle.d/receivers/mysql.discovery.yaml", "bundle.d/receivers/oracledb.discovery.yaml", "bundle.d/receivers/postgresql.discovery.yaml", "bundle.d/receivers/redis.discovery.yaml", diff --git a/internal/confmapprovider/discovery/bundle/components.go b/internal/confmapprovider/discovery/bundle/components.go index b936bb46b2..3a0d4705be 100644 --- a/internal/confmapprovider/discovery/bundle/components.go +++ b/internal/confmapprovider/discovery/bundle/components.go @@ -31,6 +31,7 @@ var ( // If they are desired for !windows BundledFS inclusion (and a default linux conf.d entry), ensure they are included // in Components.Linux. If desired in windows BundledFS, ensure they are included in Components.Windows. receivers = []string{ + "mysql", "oracledb", "postgresql", "redis", @@ -60,6 +61,7 @@ var ( }(), Windows: func() map[string]struct{} { windows := map[string]struct{}{ + "mysql": {}, "oracledb": {}, "postgresql": {}, "redis": {}, diff --git a/tests/receivers/mysql/bundled_test.go b/tests/receivers/mysql/bundled_test.go new file mode 100644 index 0000000000..27fe8eeecb --- /dev/null +++ b/tests/receivers/mysql/bundled_test.go @@ -0,0 +1,62 @@ +// Copyright Splunk, Inc. +// +// 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. + +//go:build integration + +package tests + +import ( + "fmt" + "path" + "runtime" + "testing" + + "github.com/signalfx/splunk-otel-collector/tests/testutils" +) + +func TestMysqlDockerObserver(t *testing.T) { + if runtime.GOOS == "darwin" { + t.Skip("unable to share sockets between mac and d4m vm: https://github.com/docker/for-mac/issues/483#issuecomment-758836836") + } + port := "3306" + mysql := []testutils.Container{testutils.NewContainer().WithContext( + path.Join(".", "testdata", "server"), + ).WithName("mysql").WithExposedPorts(port + ":" + port).WillWaitForPorts(port).WillWaitForLogs("")} + testutils.SkipIfNotContainerTest(t) + + testutils.AssertAllMetricsReceived(t, "bundled.yaml", "otlp_exporter.yaml", + mysql, []testutils.CollectorBuilder{ + func(c testutils.Collector) testutils.Collector { + cc := c.(*testutils.CollectorContainer) + cc.Container = cc.Container.WithBinds("/var/run/docker.sock:/var/run/docker.sock:ro") + cc.Container = cc.Container.WillWaitForLogs("Discovering for next") + cc.Container = cc.Container.WithUser(fmt.Sprintf("999:%d", testutils.GetDockerGID(t))) + return cc + }, + func(collector testutils.Collector) testutils.Collector { + return collector.WithEnv(map[string]string{ + "SPLUNK_DISCOVERY_DURATION": "10s", + "SPLUNK_DISCOVERY_LOG_LEVEL": "debug", + }).WithArgs( + "--discovery", + "--set", `splunk.discovery.extensions.k8s_observer.enabled=false`, + "--set", `splunk.discovery.extensions.host_observer.enabled=false`, + "--set", `splunk.discovery.receivers.mysql.config.username=root`, + "--set", `splunk.discovery.receivers.mysql.config.password=testuser`, + "--set", `splunk.discovery.receivers.mysql.enabled=true`, + ) + }, + }, + ) +} diff --git a/tests/receivers/mysql/testdata/otlp_exporter.yaml b/tests/receivers/mysql/testdata/otlp_exporter.yaml new file mode 100644 index 0000000000..f3c8ea0b57 --- /dev/null +++ b/tests/receivers/mysql/testdata/otlp_exporter.yaml @@ -0,0 +1,13 @@ +exporters: + otlp: + endpoint: "${OTLP_ENDPOINT}" + tls: + insecure: true + +service: + telemetry: + logs: + level: debug + pipelines: + metrics: + exporters: [otlp] \ No newline at end of file diff --git a/tests/receivers/mysql/testdata/resource_metrics/bundled.yaml b/tests/receivers/mysql/testdata/resource_metrics/bundled.yaml new file mode 100644 index 0000000000..381a6a8255 --- /dev/null +++ b/tests/receivers/mysql/testdata/resource_metrics/bundled.yaml @@ -0,0 +1,758 @@ +resource_metrics: + - scope_metrics: + - instrumentation_scope: + attributes: {} + name: otelcol/mysqlreceiver + version: + metrics: + - attributes: + status: dirty + description: The number of data pages in the InnoDB buffer pool. + name: mysql.buffer_pool.data_pages + type: IntNonmonotonicCumulativeSum + unit: "1" + + - attributes: + status: clean + description: The number of data pages in the InnoDB buffer pool. + name: mysql.buffer_pool.data_pages + type: IntNonmonotonicCumulativeSum + unit: "1" + + - description: The configured size of the InnoDB buffer pool. + name: mysql.buffer_pool.limit + type: IntNonmonotonicCumulativeSum + unit: By + + - attributes: + operation: reads + description: The number of operations on the InnoDB buffer pool. + name: mysql.buffer_pool.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: write_requests + description: The number of operations on the InnoDB buffer pool. + name: mysql.buffer_pool.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: read_requests + description: The number of operations on the InnoDB buffer pool. + name: mysql.buffer_pool.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: read_ahead_evicted + description: The number of operations on the InnoDB buffer pool. + name: mysql.buffer_pool.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: read_ahead + description: The number of operations on the InnoDB buffer pool. + name: mysql.buffer_pool.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: wait_free + description: The number of operations on the InnoDB buffer pool. + name: mysql.buffer_pool.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: read_ahead_rnd + description: The number of operations on the InnoDB buffer pool. + name: mysql.buffer_pool.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - description: The number of requests to flush pages from the InnoDB buffer pool. + name: mysql.buffer_pool.page_flushes + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: data + description: The number of pages in the InnoDB buffer pool. + name: mysql.buffer_pool.pages + type: IntNonmonotonicCumulativeSum + unit: "1" + + - attributes: + kind: free + description: The number of pages in the InnoDB buffer pool. + name: mysql.buffer_pool.pages + type: IntNonmonotonicCumulativeSum + unit: "1" + + - attributes: + kind: misc + description: The number of pages in the InnoDB buffer pool. + name: mysql.buffer_pool.pages + type: IntNonmonotonicCumulativeSum + unit: "1" + + - attributes: + status: dirty + description: The number of bytes in the InnoDB buffer pool. + name: mysql.buffer_pool.usage + type: IntNonmonotonicCumulativeSum + unit: By + + - attributes: + status: clean + description: The number of bytes in the InnoDB buffer pool. + name: mysql.buffer_pool.usage + type: IntNonmonotonicCumulativeSum + unit: By + + - attributes: + kind: writes + description: The number of writes to the InnoDB doublewrite buffer. + name: mysql.double_writes + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: pages_written + description: The number of writes to the InnoDB doublewrite buffer. + name: mysql.double_writes + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: read_rnd_next + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: read_first + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: read_prev + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: delete + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: savepoint + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: read_key + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: update + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: write + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: commit + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: read_next + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: read_rnd + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: mrr_init + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: prepare + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: external_lock + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: savepoint_rollback + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: discover + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: read_last + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: rollback + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: waited + description: The number of MySQL locks. + name: mysql.locks + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: immediate + description: The number of MySQL locks. + name: mysql.locks + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: write_requests + description: The number of InnoDB log operations. + name: mysql.log_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: writes + description: The number of InnoDB log operations. + name: mysql.log_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: waits + description: The number of InnoDB log operations. + name: mysql.log_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + status: closed + description: The number of mysqlx connections. + name: mysql.mysqlx_connections + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + status: rejected + description: The number of mysqlx connections. + name: mysql.mysqlx_connections + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + status: accepted + description: The number of mysqlx connections. + name: mysql.mysqlx_connections + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: table_definition + description: The number of opened resources. + name: mysql.opened_resources + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: file + description: The number of opened resources. + name: mysql.opened_resources + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: table + description: The number of opened resources. + name: mysql.opened_resources + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: reads + description: The number of InnoDB operations. + name: mysql.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: fsyncs + description: The number of InnoDB operations. + name: mysql.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: writes + description: The number of InnoDB operations. + name: mysql.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: read + description: The number of InnoDB page operations. + name: mysql.page_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: written + description: The number of InnoDB page operations. + name: mysql.page_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: created + description: The number of InnoDB page operations. + name: mysql.page_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + command: send_long_data + description: The number of times each type of prepared statement command has been issued. + name: mysql.prepared_statements + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + command: fetch + description: The number of times each type of prepared statement command has been issued. + name: mysql.prepared_statements + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + command: reset + description: The number of times each type of prepared statement command has been issued. + name: mysql.prepared_statements + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + command: close + description: The number of times each type of prepared statement command has been issued. + name: mysql.prepared_statements + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + command: execute + description: The number of times each type of prepared statement command has been issued. + name: mysql.prepared_statements + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + command: prepare + description: The number of times each type of prepared statement command has been issued. + name: mysql.prepared_statements + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: waits + description: The number of InnoDB row locks. + name: mysql.row_locks + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: time + description: The number of InnoDB row locks. + name: mysql.row_locks + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: read + description: The number of InnoDB row operations. + name: mysql.row_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: inserted + description: The number of InnoDB row operations. + name: mysql.row_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: updated + description: The number of InnoDB row operations. + name: mysql.row_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: deleted + description: The number of InnoDB row operations. + name: mysql.row_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: scan + description: The number of MySQL sorts. + name: mysql.sorts + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: merge_passes + description: The number of MySQL sorts. + name: mysql.sorts + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: rows + description: The number of MySQL sorts. + name: mysql.sorts + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: range + description: The number of MySQL sorts. + name: mysql.sorts + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: created + description: The state of MySQL threads. + name: mysql.threads + type: IntNonmonotonicCumulativeSum + unit: "1" + + - attributes: + kind: cached + description: The state of MySQL threads. + name: mysql.threads + type: IntNonmonotonicCumulativeSum + unit: "1" + + - attributes: + kind: running + description: The state of MySQL threads. + name: mysql.threads + type: IntNonmonotonicCumulativeSum + unit: "1" + + - attributes: + kind: connected + description: The state of MySQL threads. + name: mysql.threads + type: IntNonmonotonicCumulativeSum + unit: "1" + + - attributes: + resource: tables + description: The number of created temporary resources. + name: mysql.tmp_resources + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + resource: disk_tables + description: The number of created temporary resources. + name: mysql.tmp_resources + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + resource: files + description: The number of created temporary resources. + name: mysql.tmp_resources + type: IntMonotonicCumulativeSum + unit: "1" + + - description: The number of seconds that the server has been up. + name: mysql.uptime + type: IntMonotonicCumulativeSum + unit: s + + - attributes: + status: dirty + description: The number of data pages in the InnoDB buffer pool. + name: mysql.buffer_pool.data_pages + type: IntNonmonotonicCumulativeSum + unit: "1" + + - attributes: + status: clean + description: The number of data pages in the InnoDB buffer pool. + name: mysql.buffer_pool.data_pages + type: IntNonmonotonicCumulativeSum + unit: "1" + + - attributes: + operation: read_requests + description: The number of operations on the InnoDB buffer pool. + name: mysql.buffer_pool.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: write_requests + description: The number of operations on the InnoDB buffer pool. + name: mysql.buffer_pool.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - description: The number of requests to flush pages from the InnoDB buffer pool. + name: mysql.buffer_pool.page_flushes + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + status: dirty + description: The number of bytes in the InnoDB buffer pool. + name: mysql.buffer_pool.usage + type: IntNonmonotonicCumulativeSum + unit: By + + - attributes: + status: clean + description: The number of bytes in the InnoDB buffer pool. + name: mysql.buffer_pool.usage + type: IntNonmonotonicCumulativeSum + unit: By + + - attributes: + kind: writes + description: The number of writes to the InnoDB doublewrite buffer. + name: mysql.double_writes + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: pages_written + description: The number of writes to the InnoDB doublewrite buffer. + name: mysql.double_writes + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: write + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: external_lock + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: read_rnd + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: read_rnd_next + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: immediate + description: The number of MySQL locks. + name: mysql.locks + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: writes + description: The number of InnoDB log operations. + name: mysql.log_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: write_requests + description: The number of InnoDB log operations. + name: mysql.log_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: writes + description: The number of InnoDB operations. + name: mysql.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: fsyncs + description: The number of InnoDB operations. + name: mysql.operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + operation: written + description: The number of InnoDB page operations. + name: mysql.page_operations + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: scan + description: The number of MySQL sorts. + name: mysql.sorts + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: rows + description: The number of MySQL sorts. + name: mysql.sorts + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + resource: tables + description: The number of created temporary resources. + name: mysql.tmp_resources + type: IntMonotonicCumulativeSum + unit: "1" + + - description: The number of seconds that the server has been up. + name: mysql.uptime + type: IntMonotonicCumulativeSum + unit: s + + - attributes: + kind: read_rnd_next + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: write + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: external_lock + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: read_rnd + description: The number of requests to various MySQL handlers. + name: mysql.handlers + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: immediate + description: The number of MySQL locks. + name: mysql.locks + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: scan + description: The number of MySQL sorts. + name: mysql.sorts + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + kind: rows + description: The number of MySQL sorts. + name: mysql.sorts + type: IntMonotonicCumulativeSum + unit: "1" + + - attributes: + resource: tables + description: The number of created temporary resources. + name: mysql.tmp_resources + type: IntMonotonicCumulativeSum + unit: "1" + + - description: The number of seconds that the server has been up. + name: mysql.uptime + type: IntMonotonicCumulativeSum + unit: s + \ No newline at end of file