Supported telemetry types
The MySQL integration supports these telemetry types:Prerequisites
The MySQL integration has the following prerequisites:-
Enable the MySQL Performance Schema. To confirm the setting, run:
Confirm that the value is
ON. -
Create a MySQL account for the collector. For the complete metric set, grant the
account the following privileges:
Replace
cxdotand%with the account name and allowed host for your environment. -
Make port
3306, or your custom MySQL port, reachable from the collector.
Configure
To configure the MySQL integration, follow these steps:- For discovered MySQL targets, provide the endpoint and credentials through autodiscovery annotations. For more information, see autodiscovery.
-
Optional: Configure static targets as an alternative to autodiscovery, and provide
the password through your deployment’s secret management. For example, the
following Helm values reference the
MYSQL_PASSWORDenvironment variable:
Validate
To validate the MySQL integration, follow these steps:-
In the Live Telemetry Analyzer, filter for
cxdot.integration.name=mysql. Confirm that the MySQL metric names appear. -
In Metrics Explorer, run the following query while the MySQL servers handle query
traffic:
Confirm that the query returns the expected time series for each target.
Configuration reference
Configure one MySQL integration instance with the following settings. In Helm values, place these settings underconfig.integrations.mysql. In a Collector configuration file, place them
under cxdot.integrations.mysql.
Optional settings
-
enabledType:boolean. Optional. Default:true. Whether to run the MySQL integration. If true, the Collector collects MySQL metrics. If false, the Collector doesn’t run this integration. -
usernameType:string. Optional. Default:root. MySQL username for connections to statically configured targets. -
passwordType:string. Optional. MySQL password for connections to statically configured targets. The Collector masks this value in diagnostic output, logs, and errors. -
databaseType:string. Optional. Database to use for connections to statically configured targets. -
allow_native_passwordsType:boolean. Optional. Default:true. If true, permits MySQL native password authentication. If false, rejects connections that require the native password authentication method. -
collection_intervalType:duration. Optional. Default:10s. Time between metric collections from each MySQL target. -
timeoutType:duration. Optional. Default:10s. Maximum time to wait for each MySQL metric collection. -
instancesType:array of object. Optional. Static MySQL targets. Each entry’sendpointishost:port, for example,mysql.default.svc:3306. When this list isn’t empty, the integration collects from exactly these targets instead of targets found through discovery annotations. If no static or discovered targets exist, the integration doesn’t collect metrics. -
instances[].endpointType:string. Required. MySQL target inhost:portformat. -
tlsType:object. Optional. TLS settings for connections to statically configured MySQL targets. When set, the connection uses TLS and verifies the server certificate. Setinsecure_skip_verifyto true to skip certificate verification, or setinsecureto true to use an unencrypted connection. -
tls.ca_fileType:string. Optional. Path to the CA cert. For a client this verifies the server certificate. For a server this verifies client certificates. If empty uses system root CA. (optional) -
tls.ca_pemType:string. Optional. In memory PEM encoded cert. (optional) -
tls.cert_fileType:string. Optional. Path to the TLS cert to use for TLS required connections. (optional) -
tls.cert_pemType:string. Optional. In memory PEM encoded TLS cert to use for TLS required connections. (optional) -
tls.cipher_suitesType:array of string. Optional. CipherSuites is a list of TLS cipher suites that the TLS transport can use. If left blank, a safe default list is used. See https://go.dev/src/crypto/tls/cipher_suites.go for a list of supported cipher suites. -
tls.curve_preferencesType:array of string. Optional. contains the elliptic curves that will be used in an ECDHE handshake, in preference order Defaults to empty list and “crypto/tls” defaults are used, internally. -
tls.include_system_ca_certs_poolType:boolean. Optional. If true, load system CA certificates pool in addition to the certificates configured in this struct. -
tls.insecureType:boolean. Optional. In gRPC and HTTP when set to true, this is used to disable the client transport security. See https://godoc.org/google.golang.org/grpc#WithInsecure for gRPC. Please refer to https://godoc.org/crypto/tls#Config for more information. (optional, default false) -
tls.insecure_skip_verifyType:boolean. Optional. InsecureSkipVerify will enable TLS but not verify the certificate. -
tls.key_fileType:string. Optional. Path to the TLS key to use for TLS required connections. (optional) -
tls.key_pemType:string. Optional. In memory PEM encoded TLS key to use for TLS required connections. (optional) -
tls.max_versionType:string. Optional. MaxVersion sets the maximum TLS version that is acceptable. If not set, refer to crypto/tls for defaults. (optional) -
tls.min_versionType:string. Optional. MinVersion sets the minimum TLS version that is acceptable. If not set, TLS 1.2 will be used. (optional) -
tls.reload_intervalType:duration. Optional. ReloadInterval specifies the duration after which the certificate will be reloaded If not set, it will never be reloaded (optional) -
tls.server_name_overrideType:string. Optional. ServerName requested by client for virtual hosting. This sets the ServerName in the TLSConfig. Please refer to https://godoc.org/crypto/tls#Config for more information. (optional) -
tls.tpmType:object. Optional. Trusted platform module configuration -
tls.tpm.authType:string. Optional. Authorization value for the trusted platform module key. -
tls.tpm.enabledType:boolean. Optional. Whether to use a trusted platform module for the TLS private key. If true, the Collector loads the key from the configured device or socket. If false, the Collector uses the configured key file or in-memory key. -
tls.tpm.owner_authType:string. Optional. Owner authorization value for the trusted platform module. -
tls.tpm.pathType:string. Optional. The path to the TPM device or Unix domain socket. For instance /dev/tpm0 or /dev/tpmrm0.

