From 2d91f067fa00f65e6a4e86850985a950588c14d3 Mon Sep 17 00:00:00 2001 From: Dmitrii Anoshin Date: Thu, 30 May 2024 20:50:18 -0700 Subject: [PATCH] [discovery] Simplify the instructions for partial success (#4912) We want to show the error messages in the UI. This change addresses the feedback from the UI team: provide specific instructions instead of options. So we keep the env variables approach as it's easily configurable in any environments and likely will be supported for longer. --- .../config.d.linux/receivers/mongodb.discovery.yaml | 2 -- .../collector/config.d.linux/receivers/mysql.discovery.yaml | 2 -- .../config.d.linux/receivers/oracledb.discovery.yaml | 3 --- .../config.d.linux/receivers/postgresql.discovery.yaml | 4 ---- .../collector/config.d.linux/receivers/redis.discovery.yaml | 5 ----- .../receivers/smartagent-collectd-mysql.discovery.yaml | 4 ---- .../receivers/smartagent-postgresql.discovery.yaml | 3 --- internal/confmapprovider/discovery/bundle/README.md | 1 - .../bundle/bundle.d/receivers/mongodb.discovery.yaml | 2 -- .../bundle/bundle.d/receivers/mongodb.discovery.yaml.tmpl | 2 -- .../discovery/bundle/bundle.d/receivers/mysql.discovery.yaml | 2 -- .../bundle/bundle.d/receivers/mysql.discovery.yaml.tmpl | 2 -- .../bundle/bundle.d/receivers/oracledb.discovery.yaml | 3 --- .../bundle/bundle.d/receivers/oracledb.discovery.yaml.tmpl | 3 --- .../bundle/bundle.d/receivers/postgresql.discovery.yaml | 4 ---- .../bundle/bundle.d/receivers/postgresql.discovery.yaml.tmpl | 4 ---- .../discovery/bundle/bundle.d/receivers/redis.discovery.yaml | 5 ----- .../bundle/bundle.d/receivers/redis.discovery.yaml.tmpl | 5 ----- .../receivers/smartagent-collectd-mysql.discovery.yaml | 4 ---- .../receivers/smartagent-collectd-mysql.discovery.yaml.tmpl | 4 ---- .../bundle.d/receivers/smartagent-postgresql.discovery.yaml | 3 --- .../receivers/smartagent-postgresql.discovery.yaml.tmpl | 3 --- internal/receiver/discoveryreceiver/README.md | 2 -- tests/receivers/mongodb/mongodb_discovery_test.go | 2 +- .../testdata/docker_observer_with_ssl_mongodb_config.yaml | 2 -- .../testdata/docker_observer_without_ssl_mongodb_config.yaml | 2 -- ...without_ssl_with_wrong_authentication_mongodb_config.yaml | 2 -- 27 files changed, 1 insertion(+), 79 deletions(-) diff --git a/cmd/otelcol/config/collector/config.d.linux/receivers/mongodb.discovery.yaml b/cmd/otelcol/config/collector/config.d.linux/receivers/mongodb.discovery.yaml index e1bea6456a..f1bd959cc2 100644 --- a/cmd/otelcol/config/collector/config.d.linux/receivers/mongodb.discovery.yaml +++ b/cmd/otelcol/config/collector/config.d.linux/receivers/mongodb.discovery.yaml @@ -43,8 +43,6 @@ # log_record: # body: >- # Please ensure your user credentials are correctly specified with -# `--set splunk.discovery.receivers.mongodb.config.username=""` and -# `--set splunk.discovery.receivers.mongodb.config.password=""` or # `SPLUNK_DISCOVERY_RECEIVERS_mongodb_CONFIG_username=""` and # `SPLUNK_DISCOVERY_RECEIVERS_mongodb_CONFIG_password=""` environment variables. # - status: partial 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 index 427028dfc1..ff49abd269 100644 --- a/cmd/otelcol/config/collector/config.d.linux/receivers/mysql.discovery.yaml +++ b/cmd/otelcol/config/collector/config.d.linux/receivers/mysql.discovery.yaml @@ -32,7 +32,5 @@ # log_record: # 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. diff --git a/cmd/otelcol/config/collector/config.d.linux/receivers/oracledb.discovery.yaml b/cmd/otelcol/config/collector/config.d.linux/receivers/oracledb.discovery.yaml index b651218de3..c4173169ae 100644 --- a/cmd/otelcol/config/collector/config.d.linux/receivers/oracledb.discovery.yaml +++ b/cmd/otelcol/config/collector/config.d.linux/receivers/oracledb.discovery.yaml @@ -45,14 +45,11 @@ # log_record: # body: >- # Make sure your oracledb service is correctly specified using the -# `--set splunk.discovery.receivers.oracledb.config.service=""` command or the # `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_service=""` environment variable. # - status: partial # regexp: 'invalid username/password' # log_record: # body: >- # Make sure your user credentials are correctly specified using the -# `--set splunk.discovery.receivers.oracledb.config.username=""` and -# `--set splunk.discovery.receivers.oracledb.config.password=""` command or the # `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_username=""` and # `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_password=""` environment variables. diff --git a/cmd/otelcol/config/collector/config.d.linux/receivers/postgresql.discovery.yaml b/cmd/otelcol/config/collector/config.d.linux/receivers/postgresql.discovery.yaml index e171718261..26ab59b171 100644 --- a/cmd/otelcol/config/collector/config.d.linux/receivers/postgresql.discovery.yaml +++ b/cmd/otelcol/config/collector/config.d.linux/receivers/postgresql.discovery.yaml @@ -36,8 +36,6 @@ # log_record: # body: >- # Please ensure your user credentials are correctly specified with -# `--set splunk.discovery.receivers.postgresql.config.username=""` and -# `--set splunk.discovery.receivers.postgresql.config.password=""` or # `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_username=""` and # `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_password=""` environment variables. # - status: partial @@ -45,14 +43,12 @@ # log_record: # body: >- # Make sure the target database is correctly specified using the -# `--set splunk.discovery.receivers.postgresql.config.databases="[]"` command or the # `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_databases="[]"` environment variable. # - status: partial # regexp: 'pq: SSL is not enabled on the server' # log_record: # body: >- # Make sure the target database has SSL enabled or set insecure using the -# `--set splunk.discovery.receivers.postgresql.config.tls::insecure=""` command or the # `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_tls_x3a__x3a_insecure=""` environment variable. # - status: partial # regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries' diff --git a/cmd/otelcol/config/collector/config.d.linux/receivers/redis.discovery.yaml b/cmd/otelcol/config/collector/config.d.linux/receivers/redis.discovery.yaml index c7cc6c4542..72b931e3a8 100644 --- a/cmd/otelcol/config/collector/config.d.linux/receivers/redis.discovery.yaml +++ b/cmd/otelcol/config/collector/config.d.linux/receivers/redis.discovery.yaml @@ -38,8 +38,6 @@ # log_record: # body: >- # Make sure your user credentials are correctly specified using the -# `--set splunk.discovery.receivers.redis.config.password=""` and -# `--set splunk.discovery.receivers.redis.config.username=""` commands or the # `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password=""` and # `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password=""` environment variables. # - status: partial @@ -47,14 +45,11 @@ # log_record: # body: >- # Make sure your user credentials are correctly specified using the -# `--set splunk.discovery.receivers.redis.config.password=""` command or the # `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password=""` environment variables. # - status: partial # regexp: 'WRONGPASS invalid username-password pair or user is disabled' # log_record: # body: >- # Make sure your user credentials are correctly specified using the -# `--set splunk.discovery.receivers.redis.config.password=""` and -# `--set splunk.discovery.receivers.redis.config.username=""` commands or the # `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password=""` and # `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password=""` environment variables. diff --git a/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-collectd-mysql.discovery.yaml b/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-collectd-mysql.discovery.yaml index c0a258d568..3a4be60187 100644 --- a/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-collectd-mysql.discovery.yaml +++ b/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-collectd-mysql.discovery.yaml @@ -36,8 +36,6 @@ # log_record: # body: >- # Make sure your user credentials are correctly specified using the -# `--set splunk.discovery.receivers.smartagent/collectd/mysql.config.username=""` and -# `--set splunk.discovery.receivers.smartagent/collectd/mysql.config.password=""` command or the # `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_username=""` and # `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_password=""` environment variables. # - status: partial @@ -45,12 +43,10 @@ # log_record: # body: >- # Make sure your MySQL databases are correctly specified using the -# `--set splunk.discovery.receivers.smartagent/collectd/mysql.config.databases="[{name: ''}, {name: '', username: '', password: ''}]"` command or the # `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_databases="[{name: ''}, {name: '', username: '', password: ''}]"` environment variable. # - status: partial # regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* to database' # log_record: # body: >- # Make sure your MySQL databases and auth information are correctly specified using the -# `--set splunk.discovery.receivers.smartagent/collectd/mysql.config.databases="[{name: ''}, {name: '', username: '', password: ''}]"` command or the # `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_databases="[{name: ''}, {name: '', username: '', password: ''}]"` environment variable. diff --git a/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-postgresql.discovery.yaml b/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-postgresql.discovery.yaml index 5ff9933538..ddfbc27e9a 100644 --- a/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-postgresql.discovery.yaml +++ b/cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-postgresql.discovery.yaml @@ -49,8 +49,6 @@ # log_record: # body: >- # Please ensure your user credentials are correctly specified with -# `--set splunk.discovery.receivers.smartagent/postgresql.config.params::username=""` and -# `--set splunk.discovery.receivers.smartagent/postgresql.config.params::password=""` or # `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_params_x3a__x3a_username=""` and # `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_params_x3a__x3a_password=""` environment variables. # - status: partial @@ -58,7 +56,6 @@ # log_record: # body: >- # Make sure the target database is correctly specified using the -# `--set splunk.discovery.receivers.smartagent/postgresql.config.masterDBName=""` command or the # `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_masterDBName=""` environment variable. # - status: partial # regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries' diff --git a/internal/confmapprovider/discovery/bundle/README.md b/internal/confmapprovider/discovery/bundle/README.md index 221fcfc29f..a5e6b47a41 100644 --- a/internal/confmapprovider/discovery/bundle/README.md +++ b/internal/confmapprovider/discovery/bundle/README.md @@ -32,7 +32,6 @@ Example `redis.discovery.yaml.tmpl`: log_record: body: >- Please ensure your redis password is correctly specified with - `--set {{ configProperty "password" "" }}` or `{{ configPropertyEnvVar "password" "" }}` environment variable. ``` diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mongodb.discovery.yaml b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mongodb.discovery.yaml index 0217cfbc62..fac44cd2d4 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mongodb.discovery.yaml +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mongodb.discovery.yaml @@ -39,8 +39,6 @@ mongodb: log_record: body: >- Please ensure your user credentials are correctly specified with - `--set splunk.discovery.receivers.mongodb.config.username=""` and - `--set splunk.discovery.receivers.mongodb.config.password=""` or `SPLUNK_DISCOVERY_RECEIVERS_mongodb_CONFIG_username=""` and `SPLUNK_DISCOVERY_RECEIVERS_mongodb_CONFIG_password=""` environment variables. - status: partial diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mongodb.discovery.yaml.tmpl b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mongodb.discovery.yaml.tmpl index f733d678fb..f09c401994 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mongodb.discovery.yaml.tmpl +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mongodb.discovery.yaml.tmpl @@ -35,8 +35,6 @@ log_record: body: >- Please ensure your user credentials are correctly specified with - `--set {{ configProperty "username" "" }}` and - `--set {{ configProperty "password" "" }}` or `{{ configPropertyEnvVar "username" "" }}` and `{{ configPropertyEnvVar "password" "" }}` environment variables. - status: partial diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml index cd34dddbc5..d4ae4d0317 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml @@ -28,7 +28,5 @@ mysql: log_record: 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. 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 index 9f37e0ec82..16c90dca6a 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml.tmpl +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml.tmpl @@ -24,7 +24,5 @@ log_record: 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. diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/oracledb.discovery.yaml b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/oracledb.discovery.yaml index e692fdf896..6e9c7246fe 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/oracledb.discovery.yaml +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/oracledb.discovery.yaml @@ -41,14 +41,11 @@ oracledb: log_record: body: >- Make sure your oracledb service is correctly specified using the - `--set splunk.discovery.receivers.oracledb.config.service=""` command or the `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_service=""` environment variable. - status: partial regexp: 'invalid username/password' log_record: body: >- Make sure your user credentials are correctly specified using the - `--set splunk.discovery.receivers.oracledb.config.username=""` and - `--set splunk.discovery.receivers.oracledb.config.password=""` command or the `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_username=""` and `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_password=""` environment variables. diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/oracledb.discovery.yaml.tmpl b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/oracledb.discovery.yaml.tmpl index 29cf56fd72..f7f82f2703 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/oracledb.discovery.yaml.tmpl +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/oracledb.discovery.yaml.tmpl @@ -37,14 +37,11 @@ log_record: body: >- Make sure your oracledb service is correctly specified using the - `--set {{ configProperty "service" "" }}` command or the `{{ configPropertyEnvVar "service" "" }}` environment variable. - status: partial regexp: 'invalid username/password' log_record: 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. diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/postgresql.discovery.yaml b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/postgresql.discovery.yaml index cbeccdd7d7..15d0f9ee7a 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/postgresql.discovery.yaml +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/postgresql.discovery.yaml @@ -32,8 +32,6 @@ postgresql: log_record: body: >- Please ensure your user credentials are correctly specified with - `--set splunk.discovery.receivers.postgresql.config.username=""` and - `--set splunk.discovery.receivers.postgresql.config.password=""` or `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_username=""` and `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_password=""` environment variables. - status: partial @@ -41,14 +39,12 @@ postgresql: log_record: body: >- Make sure the target database is correctly specified using the - `--set splunk.discovery.receivers.postgresql.config.databases="[]"` command or the `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_databases="[]"` environment variable. - status: partial regexp: 'pq: SSL is not enabled on the server' log_record: body: >- Make sure the target database has SSL enabled or set insecure using the - `--set splunk.discovery.receivers.postgresql.config.tls::insecure=""` command or the `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_tls_x3a__x3a_insecure=""` environment variable. - status: partial regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries' diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/postgresql.discovery.yaml.tmpl b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/postgresql.discovery.yaml.tmpl index 8fc014a826..58c3979ba3 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/postgresql.discovery.yaml.tmpl +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/postgresql.discovery.yaml.tmpl @@ -28,8 +28,6 @@ log_record: body: >- Please ensure your user credentials are correctly specified with - `--set {{ configProperty "username" "" }}` and - `--set {{ configProperty "password" "" }}` or `{{ configPropertyEnvVar "username" "" }}` and `{{ configPropertyEnvVar "password" "" }}` environment variables. - status: partial @@ -37,14 +35,12 @@ log_record: body: >- Make sure the target database is correctly specified using the - `--set {{ configProperty "databases" "[]" }}` command or the `{{ configPropertyEnvVar "databases" "[]" }}` environment variable. - status: partial regexp: 'pq: SSL is not enabled on the server' log_record: body: >- Make sure the target database has SSL enabled or set insecure using the - `--set {{ configProperty "tls::insecure" "" }}` command or the `{{ configPropertyEnvVar "tls::insecure" "" }}` environment variable. - status: partial regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries' diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/redis.discovery.yaml b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/redis.discovery.yaml index 4e5ccd6a2e..6c9b7e3bfb 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/redis.discovery.yaml +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/redis.discovery.yaml @@ -34,8 +34,6 @@ redis: log_record: body: >- Make sure your user credentials are correctly specified using the - `--set splunk.discovery.receivers.redis.config.password=""` and - `--set splunk.discovery.receivers.redis.config.username=""` commands or the `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password=""` and `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password=""` environment variables. - status: partial @@ -43,14 +41,11 @@ redis: log_record: body: >- Make sure your user credentials are correctly specified using the - `--set splunk.discovery.receivers.redis.config.password=""` command or the `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password=""` environment variables. - status: partial regexp: 'WRONGPASS invalid username-password pair or user is disabled' log_record: body: >- Make sure your user credentials are correctly specified using the - `--set splunk.discovery.receivers.redis.config.password=""` and - `--set splunk.discovery.receivers.redis.config.username=""` commands or the `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password=""` and `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password=""` environment variables. diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/redis.discovery.yaml.tmpl b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/redis.discovery.yaml.tmpl index 9b3bba1e36..dd4cfc3821 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/redis.discovery.yaml.tmpl +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/redis.discovery.yaml.tmpl @@ -30,8 +30,6 @@ log_record: body: >- Make sure your user credentials are correctly specified using the - `--set {{ configProperty "password" "" }}` and - `--set {{ configProperty "username" "" }}` commands or the `{{ configPropertyEnvVar "password" "" }}` and `{{ configPropertyEnvVar "password" "" }}` environment variables. - status: partial @@ -39,14 +37,11 @@ log_record: body: >- Make sure your user credentials are correctly specified using the - `--set {{ configProperty "password" "" }}` command or the `{{ configPropertyEnvVar "password" "" }}` environment variables. - status: partial regexp: 'WRONGPASS invalid username-password pair or user is disabled' log_record: body: >- Make sure your user credentials are correctly specified using the - `--set {{ configProperty "password" "" }}` and - `--set {{ configProperty "username" "" }}` commands or the `{{ configPropertyEnvVar "password" "" }}` and `{{ configPropertyEnvVar "password" "" }}` environment variables. diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml index 1d4cb07410..9f648c9ca2 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml @@ -32,8 +32,6 @@ smartagent/collectd/mysql: log_record: body: >- Make sure your user credentials are correctly specified using the - `--set splunk.discovery.receivers.smartagent/collectd/mysql.config.username=""` and - `--set splunk.discovery.receivers.smartagent/collectd/mysql.config.password=""` command or the `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_username=""` and `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_password=""` environment variables. - status: partial @@ -41,12 +39,10 @@ smartagent/collectd/mysql: log_record: body: >- Make sure your MySQL databases are correctly specified using the - `--set splunk.discovery.receivers.smartagent/collectd/mysql.config.databases="[{name: ''}, {name: '', username: '', password: ''}]"` command or the `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_databases="[{name: ''}, {name: '', username: '', password: ''}]"` environment variable. - status: partial regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* to database' log_record: body: >- Make sure your MySQL databases and auth information are correctly specified using the - `--set splunk.discovery.receivers.smartagent/collectd/mysql.config.databases="[{name: ''}, {name: '', username: '', password: ''}]"` command or the `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_databases="[{name: ''}, {name: '', username: '', password: ''}]"` environment variable. diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml.tmpl b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml.tmpl index f278eb9c97..4c899ff2df 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml.tmpl +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-collectd-mysql.discovery.yaml.tmpl @@ -28,8 +28,6 @@ log_record: 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. - status: partial @@ -37,12 +35,10 @@ log_record: body: >- Make sure your MySQL databases are correctly specified using the - `--set {{ configProperty "databases" "[{name: ''}, {name: '', username: '', password: ''}]" }}` command or the `{{ configPropertyEnvVar "databases" "[{name: ''}, {name: '', username: '', password: ''}]" }}` environment variable. - status: partial regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* to database' log_record: body: >- Make sure your MySQL databases and auth information are correctly specified using the - `--set {{ configProperty "databases" "[{name: ''}, {name: '', username: '', password: ''}]" }}` command or the `{{ configPropertyEnvVar "databases" "[{name: ''}, {name: '', username: '', password: ''}]" }}` environment variable. diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml index 31b11062d0..b474ebca0b 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml @@ -45,8 +45,6 @@ smartagent/postgresql: log_record: body: >- Please ensure your user credentials are correctly specified with - `--set splunk.discovery.receivers.smartagent/postgresql.config.params::username=""` and - `--set splunk.discovery.receivers.smartagent/postgresql.config.params::password=""` or `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_params_x3a__x3a_username=""` and `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_params_x3a__x3a_password=""` environment variables. - status: partial @@ -54,7 +52,6 @@ smartagent/postgresql: log_record: body: >- Make sure the target database is correctly specified using the - `--set splunk.discovery.receivers.smartagent/postgresql.config.masterDBName=""` command or the `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_masterDBName=""` environment variable. - status: partial regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries' diff --git a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml.tmpl b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml.tmpl index 19351f3017..1d83259b59 100644 --- a/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml.tmpl +++ b/internal/confmapprovider/discovery/bundle/bundle.d/receivers/smartagent-postgresql.discovery.yaml.tmpl @@ -41,8 +41,6 @@ log_record: body: >- Please ensure your user credentials are correctly specified with - `--set {{ configProperty "params" "username" "" }}` and - `--set {{ configProperty "params" "password" "" }}` or `{{ configPropertyEnvVar "params" "username" "" }}` and `{{ configPropertyEnvVar "params" "password" "" }}` environment variables. - status: partial @@ -50,7 +48,6 @@ log_record: body: >- Make sure the target database is correctly specified using the - `--set {{ configProperty "masterDBName" "" }}` command or the `{{ configPropertyEnvVar "masterDBName" "" }}` environment variable. - status: partial regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries' diff --git a/internal/receiver/discoveryreceiver/README.md b/internal/receiver/discoveryreceiver/README.md index 0859a09595..806d590198 100644 --- a/internal/receiver/discoveryreceiver/README.md +++ b/internal/receiver/discoveryreceiver/README.md @@ -105,8 +105,6 @@ receivers: log_record: 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. exporters: diff --git a/tests/receivers/mongodb/mongodb_discovery_test.go b/tests/receivers/mongodb/mongodb_discovery_test.go index d6b10eb04e..acba7333f5 100644 --- a/tests/receivers/mongodb/mongodb_discovery_test.go +++ b/tests/receivers/mongodb/mongodb_discovery_test.go @@ -167,7 +167,7 @@ func TestIntegrationMongoDBAutoDiscovery(t *testing.T) { } successfulDiscoveryMsg := `mongodb receiver is working!` - partialDiscoveryMsg := "Please ensure your user credentials are correctly specified with `--set {{ configProperty \"username\" \"\" }}` and `--set {{ configProperty \"password\" \"\" }}` or `{{ configPropertyEnvVar \"username\" \"\" }}` and `{{ configPropertyEnvVar \"password\" \"\" }}` environment variables." + partialDiscoveryMsg := "Please ensure your user credentials are correctly specified with `{{ configPropertyEnvVar \"username\" \"\" }}` and `{{ configPropertyEnvVar \"password\" \"\" }}` environment variables." ctx := context.Background() tests := map[string]struct { diff --git a/tests/receivers/mongodb/testdata/docker_observer_with_ssl_mongodb_config.yaml b/tests/receivers/mongodb/testdata/docker_observer_with_ssl_mongodb_config.yaml index bbc86b608f..ace14adbb6 100644 --- a/tests/receivers/mongodb/testdata/docker_observer_with_ssl_mongodb_config.yaml +++ b/tests/receivers/mongodb/testdata/docker_observer_with_ssl_mongodb_config.yaml @@ -33,8 +33,6 @@ receivers: log_record: body: >- Please ensure your user credentials are correctly specified with - `--set {{ configProperty "username" "" }}` and - `--set {{ configProperty "password" "" }}` or `{{ configPropertyEnvVar "username" "" }}` and `{{ configPropertyEnvVar "password" "" }}` environment variables. - status: partial diff --git a/tests/receivers/mongodb/testdata/docker_observer_without_ssl_mongodb_config.yaml b/tests/receivers/mongodb/testdata/docker_observer_without_ssl_mongodb_config.yaml index 6040c7c6a1..e70370d644 100644 --- a/tests/receivers/mongodb/testdata/docker_observer_without_ssl_mongodb_config.yaml +++ b/tests/receivers/mongodb/testdata/docker_observer_without_ssl_mongodb_config.yaml @@ -33,8 +33,6 @@ receivers: log_record: body: >- Please ensure your user credentials are correctly specified with - `--set {{ configProperty "username" "" }}` and - `--set {{ configProperty "password" "" }}` or `{{ configPropertyEnvVar "username" "" }}` and `{{ configPropertyEnvVar "password" "" }}` environment variables. - status: partial diff --git a/tests/receivers/mongodb/testdata/docker_observer_without_ssl_with_wrong_authentication_mongodb_config.yaml b/tests/receivers/mongodb/testdata/docker_observer_without_ssl_with_wrong_authentication_mongodb_config.yaml index e9b84a3011..ab78e832bd 100644 --- a/tests/receivers/mongodb/testdata/docker_observer_without_ssl_with_wrong_authentication_mongodb_config.yaml +++ b/tests/receivers/mongodb/testdata/docker_observer_without_ssl_with_wrong_authentication_mongodb_config.yaml @@ -33,8 +33,6 @@ receivers: log_record: body: >- Please ensure your user credentials are correctly specified with - `--set {{ configProperty "username" "" }}` and - `--set {{ configProperty "password" "" }}` or `{{ configPropertyEnvVar "username" "" }}` and `{{ configPropertyEnvVar "password" "" }}` environment variables. - status: partial