Skip to content

Commit 7588cd0

Browse files
authored
[receiver/discovery] Remove append_pattern option from log statements (#4838)
Remove `append_pattern` option from log evaluation statements. - The matched log message is now set as `discovery.matched_log` entity attributes instead of being appended to the `discovery.message` attribute. - The matched log fields like `caller` and `stacktrace` are not sent as attributes anymore since it's not relevant to the emitted entities anymore and don't provide any value to the end users
1 parent d279af7 commit 7588cd0

35 files changed

+92
-252
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## Unreleased
44

5+
### 🛑 Breaking changes 🛑
6+
7+
- (Splunk) `receiver/discovery`: Remove `append_pattern` option from log evaluation statements ([#4583](https://github.com/signalfx/splunk-otel-collector/pull/4583))
8+
- The matched log message is now set as `discovery.matched_log` entity attributes instead of being appended to
9+
the `discovery.message` attribute.
10+
- The matched log fields like `caller` and `stacktrace` are not sent as attributes anymore.
11+
512
### 💡 Enhancements 💡
613

714
- (Splunk) [`splunk-otel-collector` Salt formula](https://github.com/signalfx/splunk-otel-collector/tree/main/deployments/salt): Initial support for

cmd/otelcol/config/collector/config.d.linux/receivers/mongodb.discovery.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,14 @@
2929
# - status: failed
3030
# regexp: 'connect: network is unreachable'
3131
# log_record:
32-
# append_pattern: true
3332
# body: The container cannot be reached by the Collector. Make sure they're in the same network.
3433
# - status: failed
3534
# regexp: 'connect: connection refused'
3635
# log_record:
37-
# append_pattern: true
3836
# body: The container is refusing mongodb connections.
3937
# - status: partial
4038
# regexp: '.* unable to authenticate using mechanism .*'
4139
# log_record:
42-
# append_pattern: true
4340
# body: >-
4441
# Please ensure your user credentials are correctly specified with
4542
# `--set splunk.discovery.receivers.mongodb.config.username="<username>"` and
@@ -49,7 +46,6 @@
4946
# - status: partial
5047
# regexp: '.* failed to fetch index stats metrics: (Unauthorized) not authorized on admin to execute command .*'
5148
# log_record:
52-
# append_pattern: true
5349
# body: >-
5450
# Make sure the account used to access Mongodb has been given a clusterMonitor role in order to collect metrics.
5551
# `db.grantRolesToUser('someUser', [{ role: 'clusterMonitor', db: 'admin' }])`

cmd/otelcol/config/collector/config.d.linux/receivers/mysql.discovery.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@
2626
# - status: failed
2727
# regexp: "Can't connect to MySQL server on .* [(]111[)]"
2828
# log_record:
29-
# append_pattern: true
3029
# body: The container cannot be reached by the Collector. The container is refusing MySQL connections.
3130
# - status: partial
3231
# regexp: 'Access denied for user'
3332
# log_record:
34-
# append_pattern: true
3533
# body: >-
3634
# Make sure your user credentials are correctly specified using the
3735
# `--set splunk.discovery.receivers.mysql.config.username="<username>"` and

cmd/otelcol/config/collector/config.d.linux/receivers/oracledb.discovery.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,35 +27,29 @@
2727
# - status: failed
2828
# regexp: "connection refused"
2929
# log_record:
30-
# append_pattern: true
3130
# body: The container is not serving http connections.
3231
# - status: failed
3332
# regexp: "received goaway and there are no active streams"
3433
# log_record:
35-
# append_pattern: true
3634
# body: Unable to connect and scrape metrics.
3735
# - status: failed
3836
# regexp: "dial tcp: lookup"
3937
# log_record:
40-
# append_pattern: true
4138
# body: Unable to resolve oracledb tcp endpoint
4239
# - status: failed
4340
# regexp: 'error executing select .*: EOF'
4441
# log_record:
45-
# append_pattern: true
4642
# body: Unable to execute select from oracledb. Verify endpoint and user permissions.
4743
# - status: partial
4844
# regexp: "listener does not currently know of service requested"
4945
# log_record:
50-
# append_pattern: true
5146
# body: >-
5247
# Make sure your oracledb service is correctly specified using the
5348
# `--set splunk.discovery.receivers.oracledb.config.service="<service>"` command or the
5449
# `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_service="<service>"` environment variable.
5550
# - status: partial
5651
# regexp: 'invalid username/password'
5752
# log_record:
58-
# append_pattern: true
5953
# body: >-
6054
# Make sure your user credentials are correctly specified using the
6155
# `--set splunk.discovery.receivers.oracledb.config.username="<username>"` and

cmd/otelcol/config/collector/config.d.linux/receivers/postgresql.discovery.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,14 @@
2626
# - status: failed
2727
# regexp: 'connect: network is unreachable'
2828
# log_record:
29-
# append_pattern: true
3029
# body: The container cannot be reached by the Collector. Make sure they're in the same network.
3130
# - status: failed
3231
# regexp: 'connect: connection refused'
3332
# log_record:
34-
# append_pattern: true
3533
# body: The container is refusing PostgreSQL connections.
3634
# - status: partial
3735
# regexp: 'pq: password authentication failed for user'
3836
# log_record:
39-
# append_pattern: true
4037
# body: >-
4138
# Please ensure your user credentials are correctly specified with
4239
# `--set splunk.discovery.receivers.postgresql.config.username="<username>"` and
@@ -46,23 +43,20 @@
4643
# - status: partial
4744
# regexp: 'pq: database .* does not exist'
4845
# log_record:
49-
# append_pattern: true
5046
# body: >-
5147
# Make sure the target database is correctly specified using the
5248
# `--set splunk.discovery.receivers.postgresql.config.databases="[<db>]"` command or the
5349
# `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_databases="[<db>]"` environment variable.
5450
# - status: partial
5551
# regexp: 'pq: SSL is not enabled on the server'
5652
# log_record:
57-
# append_pattern: true
5853
# body: >-
5954
# Make sure the target database has SSL enabled or set insecure using the
6055
# `--set splunk.discovery.receivers.postgresql.config.tls::insecure="<boolean>"` command or the
6156
# `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_tls_x3a__x3a_insecure="<boolean>"` environment variable.
6257
# - status: partial
6358
# regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries'
6459
# log_record:
65-
# append_pattern: true
6660
# body: >-
6761
# Make sure your PostgreSQL database has
6862
# `shared_preload_libraries = 'pg_stat_statements'`

cmd/otelcol/config/collector/config.d.linux/receivers/redis.discovery.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,18 @@
2424
# - status: failed
2525
# regexp: "connection refused"
2626
# log_record:
27-
# append_pattern: true
2827
# body: The container is not serving http connections.
2928
# - status: failed
3029
# regexp: "received goaway and there are no active streams"
3130
# log_record:
32-
# append_pattern: true
3331
# body: Unable to connect and scrape metrics.
3432
# - status: failed
3533
# regexp: "dial tcp: lookup"
3634
# log_record:
37-
# append_pattern: true
3835
# body: Unable to resolve redis tcp endpoint
3936
# - status: partial
4037
# regexp: 'NOAUTH Authentication required.'
4138
# log_record:
42-
# append_pattern: true
4339
# body: >-
4440
# Make sure your user credentials are correctly specified using the
4541
# `--set splunk.discovery.receivers.redis.config.password="<password>"` and
@@ -49,15 +45,13 @@
4945
# - status: partial
5046
# regexp: 'called without any password configured for the default user'
5147
# log_record:
52-
# append_pattern: true
5348
# body: >-
5449
# Make sure your user credentials are correctly specified using the
5550
# `--set splunk.discovery.receivers.redis.config.password="<password>"` command or the
5651
# `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password="<password>"` environment variables.
5752
# - status: partial
5853
# regexp: 'WRONGPASS invalid username-password pair or user is disabled'
5954
# log_record:
60-
# append_pattern: true
6155
# body: >-
6256
# Make sure your user credentials are correctly specified using the
6357
# `--set splunk.discovery.receivers.redis.config.password="<password>"` and

cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-collectd-mysql.discovery.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@
3030
# - status: failed
3131
# regexp: "mysql plugin: Failed to connect to database .* at server .* Can't connect to MySQL server on .* [(]111[)]"
3232
# log_record:
33-
# append_pattern: true
3433
# body: The container is refusing MySQL connections.
3534
# - status: partial
3635
# regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* [(]using password: .*[)]'
3736
# log_record:
38-
# append_pattern: true
3937
# body: >-
4038
# Make sure your user credentials are correctly specified using the
4139
# `--set splunk.discovery.receivers.smartagent/collectd/mysql.config.username="<username>"` and
@@ -45,15 +43,13 @@
4543
# - status: partial
4644
# regexp: 'mysql plugin: Failed to connect to database .* at server .* Unknown database'
4745
# log_record:
48-
# append_pattern: true
4946
# body: >-
5047
# Make sure your MySQL databases are correctly specified using the
5148
# `--set splunk.discovery.receivers.smartagent/collectd/mysql.config.databases="[{name: '<db-name-0>'}, {name: '<db-name-1>', username: '<username>', password: '<password>'}]"` command or the
5249
# `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_databases="[{name: '<db-name-0>'}, {name: '<db-name-1>', username: '<username>', password: '<password>'}]"` environment variable.
5350
# - status: partial
5451
# regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* to database'
5552
# log_record:
56-
# append_pattern: true
5753
# body: >-
5854
# Make sure your MySQL databases and auth information are correctly specified using the
5955
# `--set splunk.discovery.receivers.smartagent/collectd/mysql.config.databases="[{name: '<db-name-0>'}, {name: '<db-name-1>', username: '<username>', password: '<password>'}]"` command or the

cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-collectd-nginx.discovery.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@
2828
# - status: failed
2929
# regexp: "nginx plugin: curl_easy_perform failed: Operation timed out after"
3030
# log_record:
31-
# append_pattern: true
3231
# body: The container is not serving http connections.
3332
# - status: failed
3433
# regexp: "read-function of plugin .* failed"
3534
# log_record:
36-
# append_pattern: true
3735
# body: The integration is unable to read metrics from this endpoint.

cmd/otelcol/config/collector/config.d.linux/receivers/smartagent-postgresql.discovery.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,14 @@
3939
# - status: failed
4040
# regexp: 'connect: network is unreachable'
4141
# log_record:
42-
# append_pattern: true
4342
# body: The container cannot be reached by the Collector. Make sure they're in the same network.
4443
# - status: failed
4544
# regexp: 'connect: connection refused'
4645
# log_record:
47-
# append_pattern: true
4846
# body: The container is refusing PostgreSQL connections.
4947
# - status: partial
5048
# regexp: 'pq: password authentication failed for user'
5149
# log_record:
52-
# append_pattern: true
5350
# body: >-
5451
# Please ensure your user credentials are correctly specified with
5552
# `--set splunk.discovery.receivers.smartagent/postgresql.config.params::username="<username>"` and
@@ -59,15 +56,13 @@
5956
# - status: partial
6057
# regexp: 'pq: database .* does not exist'
6158
# log_record:
62-
# append_pattern: true
6359
# body: >-
6460
# Make sure the target database is correctly specified using the
6561
# `--set splunk.discovery.receivers.smartagent/postgresql.config.masterDBName="<db>"` command or the
6662
# `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_masterDBName="<db>"` environment variable.
6763
# - status: partial
6864
# regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries'
6965
# log_record:
70-
# append_pattern: true
7166
# body: >-
7267
# Make sure your PostgreSQL database has
7368
# `shared_preload_libraries = 'pg_stat_statements'`

internal/confmapprovider/discovery/bundle/bundle.d/receivers/mongodb.discovery.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@ mongodb:
2525
- status: failed
2626
regexp: 'connect: network is unreachable'
2727
log_record:
28-
append_pattern: true
2928
body: The container cannot be reached by the Collector. Make sure they're in the same network.
3029
- status: failed
3130
regexp: 'connect: connection refused'
3231
log_record:
33-
append_pattern: true
3432
body: The container is refusing mongodb connections.
3533
- status: partial
3634
regexp: '.* unable to authenticate using mechanism .*'
3735
log_record:
38-
append_pattern: true
3936
body: >-
4037
Please ensure your user credentials are correctly specified with
4138
`--set splunk.discovery.receivers.mongodb.config.username="<username>"` and
@@ -45,7 +42,6 @@ mongodb:
4542
- status: partial
4643
regexp: '.* failed to fetch index stats metrics: (Unauthorized) not authorized on admin to execute command .*'
4744
log_record:
48-
append_pattern: true
4945
body: >-
5046
Make sure the account used to access Mongodb has been given a clusterMonitor role in order to collect metrics.
5147
`db.grantRolesToUser('someUser', [{ role: 'clusterMonitor', db: 'admin' }])`

internal/confmapprovider/discovery/bundle/bundle.d/receivers/mongodb.discovery.yaml.tmpl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,14 @@
2121
- status: failed
2222
regexp: 'connect: network is unreachable'
2323
log_record:
24-
append_pattern: true
2524
body: The container cannot be reached by the Collector. Make sure they're in the same network.
2625
- status: failed
2726
regexp: 'connect: connection refused'
2827
log_record:
29-
append_pattern: true
3028
body: The container is refusing mongodb connections.
3129
- status: partial
3230
regexp: '.* unable to authenticate using mechanism .*'
3331
log_record:
34-
append_pattern: true
3532
body: >-
3633
Please ensure your user credentials are correctly specified with
3734
`--set {{ configProperty "username" "<username>" }}` and
@@ -41,7 +38,6 @@
4138
- status: partial
4239
regexp: '.* failed to fetch index stats metrics: (Unauthorized) not authorized on admin to execute command .*'
4340
log_record:
44-
append_pattern: true
4541
body: >-
4642
Make sure the account used to access Mongodb has been given a clusterMonitor role in order to collect metrics.
4743
`db.grantRolesToUser('someUser', [{ role: 'clusterMonitor', db: 'admin' }])`

internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ mysql:
2222
- status: failed
2323
regexp: "Can't connect to MySQL server on .* [(]111[)]"
2424
log_record:
25-
append_pattern: true
2625
body: The container cannot be reached by the Collector. The container is refusing MySQL connections.
2726
- status: partial
2827
regexp: 'Access denied for user'
2928
log_record:
30-
append_pattern: true
3129
body: >-
3230
Make sure your user credentials are correctly specified using the
3331
`--set splunk.discovery.receivers.mysql.config.username="<username>"` and

internal/confmapprovider/discovery/bundle/bundle.d/receivers/mysql.discovery.yaml.tmpl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@
1818
- status: failed
1919
regexp: "Can't connect to MySQL server on .* [(]111[)]"
2020
log_record:
21-
append_pattern: true
2221
body: The container cannot be reached by the Collector. The container is refusing MySQL connections.
2322
- status: partial
2423
regexp: 'Access denied for user'
2524
log_record:
26-
append_pattern: true
2725
body: >-
2826
Make sure your user credentials are correctly specified using the
2927
`--set {{ configProperty "username" "<username>" }}` and

internal/confmapprovider/discovery/bundle/bundle.d/receivers/oracledb.discovery.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,29 @@ oracledb:
2323
- status: failed
2424
regexp: "connection refused"
2525
log_record:
26-
append_pattern: true
2726
body: The container is not serving http connections.
2827
- status: failed
2928
regexp: "received goaway and there are no active streams"
3029
log_record:
31-
append_pattern: true
3230
body: Unable to connect and scrape metrics.
3331
- status: failed
3432
regexp: "dial tcp: lookup"
3533
log_record:
36-
append_pattern: true
3734
body: Unable to resolve oracledb tcp endpoint
3835
- status: failed
3936
regexp: 'error executing select .*: EOF'
4037
log_record:
41-
append_pattern: true
4238
body: Unable to execute select from oracledb. Verify endpoint and user permissions.
4339
- status: partial
4440
regexp: "listener does not currently know of service requested"
4541
log_record:
46-
append_pattern: true
4742
body: >-
4843
Make sure your oracledb service is correctly specified using the
4944
`--set splunk.discovery.receivers.oracledb.config.service="<service>"` command or the
5045
`SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_service="<service>"` environment variable.
5146
- status: partial
5247
regexp: 'invalid username/password'
5348
log_record:
54-
append_pattern: true
5549
body: >-
5650
Make sure your user credentials are correctly specified using the
5751
`--set splunk.discovery.receivers.oracledb.config.username="<username>"` and

internal/confmapprovider/discovery/bundle/bundle.d/receivers/oracledb.discovery.yaml.tmpl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,29 @@
1919
- status: failed
2020
regexp: "connection refused"
2121
log_record:
22-
append_pattern: true
2322
body: The container is not serving http connections.
2423
- status: failed
2524
regexp: "received goaway and there are no active streams"
2625
log_record:
27-
append_pattern: true
2826
body: Unable to connect and scrape metrics.
2927
- status: failed
3028
regexp: "dial tcp: lookup"
3129
log_record:
32-
append_pattern: true
3330
body: Unable to resolve oracledb tcp endpoint
3431
- status: failed
3532
regexp: 'error executing select .*: EOF'
3633
log_record:
37-
append_pattern: true
3834
body: Unable to execute select from oracledb. Verify endpoint and user permissions.
3935
- status: partial
4036
regexp: "listener does not currently know of service requested"
4137
log_record:
42-
append_pattern: true
4338
body: >-
4439
Make sure your oracledb service is correctly specified using the
4540
`--set {{ configProperty "service" "<service>" }}` command or the
4641
`{{ configPropertyEnvVar "service" "<service>" }}` environment variable.
4742
- status: partial
4843
regexp: 'invalid username/password'
4944
log_record:
50-
append_pattern: true
5145
body: >-
5246
Make sure your user credentials are correctly specified using the
5347
`--set {{ configProperty "username" "<username>" }}` and

0 commit comments

Comments
 (0)