Skip to content

[receiver/discovery] Remove first_only field from the matching rule #4593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- (Splunk) `receiver/discovery`: Update metrics and logs evaluation statements schema:
- Remove `severity_text` field from log evaluation statements ([#4583](https://github.com/signalfx/splunk-otel-collector/pull/4583))
- Remove `first_only` field from match struct. Events are always emitted only once for first matching metric or log statement ([#4593](https://github.com/signalfx/splunk-otel-collector/pull/4593))
- Combine matching conditions with different statuses in one list ([#4588](https://github.com/signalfx/splunk-otel-collector/pull/4588))

## v0.97.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,16 @@
# metrics:
# - status: successful
# strict: mysql.locks
# first_only: true
# log_record:
# body: Mysql receiver is working!
# statements:
# - status: failed
# regexp: "Can't connect to MySQL server on .* [(]111[)]"
# first_only: true
# log_record:
# append_pattern: true
# body: The container cannot be reached by the Collector. The container is refusing MySQL connections.
# - status: partial
# regexp: 'Access denied for user'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,31 @@
# metrics:
# - status: successful
# strict: oracledb.cpu_time
# first_only: true
# log_record:
# body: oracledb receiver is working!
# statements:
# - status: failed
# regexp: "connection refused"
# first_only: true
# log_record:
# append_pattern: true
# body: The container is not serving http connections.
# - status: failed
# regexp: "received goaway and there are no active streams"
# first_only: true
# log_record:
# append_pattern: true
# body: Unable to connect and scrape metrics.
# - status: failed
# regexp: "dial tcp: lookup"
# first_only: true
# log_record:
# append_pattern: true
# body: Unable to resolve oracledb tcp endpoint
# - status: failed
# regexp: 'error executing select .*: EOF'
# first_only: true
# log_record:
# append_pattern: true
# body: Unable to execute select from oracledb. Verify endpoint and user permissions.
# - status: partial
# regexp: "listener does not currently know of service requested"
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand All @@ -60,7 +54,6 @@
# `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_service="<service>"` environment variable.
# - status: partial
# regexp: 'invalid username/password'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,21 @@
# metrics:
# - status: successful
# strict: postgresql.commits
# first_only: true
# log_record:
# body: PostgreSQL receiver is working!
# statements:
# - status: failed
# regexp: 'connect: network is unreachable'
# first_only: true
# log_record:
# append_pattern: true
# body: The container cannot be reached by the Collector. Make sure they're in the same network.
# - status: failed
# regexp: 'connect: connection refused'
# first_only: true
# log_record:
# append_pattern: true
# body: The container is refusing PostgreSQL connections.
# - status: partial
# regexp: 'pq: password authentication failed for user'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand All @@ -49,7 +45,6 @@
# `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_password="<password>"` environment variables.
# - status: partial
# regexp: 'pq: database .* does not exist'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand All @@ -58,7 +53,6 @@
# `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_databases="[<db>]"` environment variable.
# - status: partial
# regexp: 'pq: SSL is not enabled on the server'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand All @@ -67,7 +61,6 @@
# `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_tls_x3a__x3a_insecure="<boolean>"` environment variable.
# - status: partial
# regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,26 @@
# metrics:
# - status: successful
# strict: redis.uptime
# first_only: true
# log_record:
# body: redis receiver is working!
# statements:
# - status: failed
# regexp: "connection refused"
# first_only: true
# log_record:
# append_pattern: true
# body: The container is not serving http connections.
# - status: failed
# regexp: "received goaway and there are no active streams"
# first_only: true
# log_record:
# append_pattern: true
# body: Unable to connect and scrape metrics.
# - status: failed
# regexp: "dial tcp: lookup"
# first_only: true
# log_record:
# append_pattern: true
# body: Unable to resolve redis tcp endpoint
# - status: partial
# regexp: 'NOAUTH Authentication required.'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand All @@ -53,7 +48,6 @@
# `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password="<password>"` environment variables.
# - status: partial
# regexp: 'called without any password configured for the default user'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand All @@ -62,7 +56,6 @@
# `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password="<password>"` environment variables.
# - status: partial
# regexp: 'WRONGPASS invalid username-password pair or user is disabled'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,16 @@
# metrics:
# - status: successful
# strict: mysql_octets.rx
# first_only: true
# log_record:
# body: smartagent/collectd/mysql receiver is working!
# statements:
# - status: failed
# regexp: "mysql plugin: Failed to connect to database .* at server .* Can't connect to MySQL server on .* [(]111[)]"
# first_only: true
# log_record:
# append_pattern: true
# body: The container is refusing MySQL connections.
# - status: partial
# regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* [(]using password: .*[)]'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand All @@ -47,7 +44,6 @@
# `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_password="<password>"` environment variables.
# - status: partial
# regexp: 'mysql plugin: Failed to connect to database .* at server .* Unknown database'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand All @@ -56,7 +52,6 @@
# `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_collectd_x2f_mysql_CONFIG_databases="[{name: '<db-name-0>'}, {name: '<db-name-1>', username: '<username>', password: '<password>'}]"` environment variable.
# - status: partial
# regexp: 'mysql plugin: Failed to connect to database .* at server .* Access denied for user .* to database'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,16 @@
# metrics:
# - status: successful
# strict: connections.accepted
# first_only: true
# log_record:
# body: smartagent/collectd/nginx receiver is working!
# statements:
# - status: failed
# regexp: "nginx plugin: curl_easy_perform failed: Operation timed out after"
# first_only: true
# log_record:
# append_pattern: true
# body: The container is not serving http connections.
# - status: failed
# regexp: "read-function of plugin .* failed"
# first_only: true
# log_record:
# append_pattern: true
# body: The integration is unable to read metrics from this endpoint.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@
# metrics:
# - status: successful
# strict: postgres_query_count
# first_only: true
# log_record:
# body: PostgreSQL receiver is working!
# - status: partial
# strict: postgres_rows_inserted
# first_only: true
# log_record:
# body: >-
# Make sure that
Expand All @@ -40,19 +38,16 @@
# statements:
# - status: failed
# regexp: 'connect: network is unreachable'
# first_only: true
# log_record:
# append_pattern: true
# body: The container cannot be reached by the Collector. Make sure they're in the same network.
# - status: failed
# regexp: 'connect: connection refused'
# first_only: true
# log_record:
# append_pattern: true
# body: The container is refusing PostgreSQL connections.
# - status: partial
# regexp: 'pq: password authentication failed for user'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand All @@ -63,7 +58,6 @@
# `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_params_x3a__x3a_password="<password>"` environment variables.
# - status: partial
# regexp: 'pq: database .* does not exist'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand All @@ -72,7 +66,6 @@
# `SPLUNK_DISCOVERY_RECEIVERS_smartagent_x2f_postgresql_CONFIG_masterDBName="<db>"` environment variable.
# - status: partial
# regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
Expand Down
2 changes: 0 additions & 2 deletions internal/confmapprovider/discovery/bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Example `redis.discovery.yaml.tmpl`:
statements:
partial:
- regexp: 'ERR AUTH.*'
first_only: true
log_record:
body: >-
Please ensure your redis password is correctly specified with
Expand All @@ -54,7 +53,6 @@ redis:
statements:
partial:
- regexp: 'ERR AUTH.*'
first_only: true
log_record:
body: >-
Please ensure your redis password is correctly specified with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@ mysql:
metrics:
- status: successful
strict: mysql.locks
first_only: true
log_record:
body: Mysql receiver is working!
statements:
- status: failed
regexp: "Can't connect to MySQL server on .* [(]111[)]"
first_only: true
log_record:
append_pattern: true
body: The container cannot be reached by the Collector. The container is refusing MySQL connections.
- status: partial
regexp: 'Access denied for user'
first_only: true
log_record:
append_pattern: true
body: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,16 @@
metrics:
- status: successful
strict: mysql.locks
first_only: true
log_record:
body: Mysql receiver is working!
statements:
- status: failed
regexp: "Can't connect to MySQL server on .* [(]111[)]"
first_only: true
log_record:
append_pattern: true
body: The container cannot be reached by the Collector. The container is refusing MySQL connections.
- status: partial
regexp: 'Access denied for user'
first_only: true
log_record:
append_pattern: true
body: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,31 @@ oracledb:
metrics:
- status: successful
strict: oracledb.cpu_time
first_only: true
log_record:
body: oracledb receiver is working!
statements:
- status: failed
regexp: "connection refused"
first_only: true
log_record:
append_pattern: true
body: The container is not serving http connections.
- status: failed
regexp: "received goaway and there are no active streams"
first_only: true
log_record:
append_pattern: true
body: Unable to connect and scrape metrics.
- status: failed
regexp: "dial tcp: lookup"
first_only: true
log_record:
append_pattern: true
body: Unable to resolve oracledb tcp endpoint
- status: failed
regexp: 'error executing select .*: EOF'
first_only: true
log_record:
append_pattern: true
body: Unable to execute select from oracledb. Verify endpoint and user permissions.
- status: partial
regexp: "listener does not currently know of service requested"
first_only: true
log_record:
append_pattern: true
body: >-
Expand All @@ -56,7 +50,6 @@ oracledb:
`SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_service="<service>"` environment variable.
- status: partial
regexp: 'invalid username/password'
first_only: true
log_record:
append_pattern: true
body: >-
Expand Down
Loading