Skip to content
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

[receiver/discovery] Combine matching conditions with different statuses #4588

Merged
merged 1 commit into from
Apr 3, 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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

### 🛑 Breaking changes 🛑

- (Splunk) `receiver/discovery`: Remove `severity_text` field from log evaluation statements. ([#4583](https://github.com/signalfx/splunk-otel-collector/pull/4583))
- (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))
- 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 @@ -18,26 +18,26 @@
# password: splunk.discovery.default
# status:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be changed to something like status_detection as the next step to avoid different status fields

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change absolutely necessary for entity events?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unnecessary, but having two status fields is confusing. The higher level status doesn't seem like a good name for what it's defining. Do you have any concerns with renaming it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Giving that we are significantly changing this interface, I don't see why we need to restrain any further changes

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would go with your change as it makes things more deterministic.

# metrics:
# successful:
# - strict: mysql.locks
# first_only: true
# log_record:
# body: Mysql receiver is working!
# - status: successful
# strict: mysql.locks
# first_only: true
# log_record:
# body: Mysql receiver is working!
# statements:
# 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.
# partial:
# - regexp: 'Access denied for user'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
# Make sure your user credentials are correctly specified using the
# `--set splunk.discovery.receivers.mysql.config.username="<username>"` and
# `--set splunk.discovery.receivers.mysql.config.password="<password>"` command or the
# `SPLUNK_DISCOVERY_RECEIVERS_mysql_CONFIG_username="<username>"` and
# `SPLUNK_DISCOVERY_RECEIVERS_mysql_CONFIG_password="<password>"` environment variables.
# - 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: >-
# Make sure your user credentials are correctly specified using the
# `--set splunk.discovery.receivers.mysql.config.username="<username>"` and
# `--set splunk.discovery.receivers.mysql.config.password="<password>"` command or the
# `SPLUNK_DISCOVERY_RECEIVERS_mysql_CONFIG_username="<username>"` and
# `SPLUNK_DISCOVERY_RECEIVERS_mysql_CONFIG_password="<password>"` environment variables.
Original file line number Diff line number Diff line change
Expand Up @@ -19,50 +19,53 @@
# service: splunk.discovery.default
# status:
# metrics:
# successful:
# - strict: oracledb.cpu_time
# first_only: true
# log_record:
# body: oracledb receiver is working!
# - status: successful
# strict: oracledb.cpu_time
# first_only: true
# log_record:
# body: oracledb receiver is working!
# statements:
# failed:
# - regexp: "connection refused"
# first_only: true
# log_record:
# append_pattern: true
# body: The container is not serving http connections.
# - regexp: "received goaway and there are no active streams"
# first_only: true
# log_record:
# append_pattern: true
# body: Unable to connect and scrape metrics.
# - regexp: "dial tcp: lookup"
# first_only: true
# log_record:
# append_pattern: true
# body: Unable to resolve oracledb tcp endpoint
# - 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.
# partial:
# - regexp: "listener does not currently know of service requested"
# first_only: true
# log_record:
# append_pattern: true
# body: >-
# Make sure your oracledb service is correctly specified using the
# `--set splunk.discovery.receivers.oracledb.config.service="<service>"` command or the
# `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_service="<service>"` environment variable.
# - regexp: 'invalid username/password'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
# Make sure your user credentials are correctly specified using the
# `--set splunk.discovery.receivers.oracledb.config.username="<username>"` and
# `--set splunk.discovery.receivers.oracledb.config.password="<password>"` command or the
# `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_username="<username>"` and
# `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_password="<password>"` environment variables.
#
# - 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: >-
# Make sure your oracledb service is correctly specified using the
# `--set splunk.discovery.receivers.oracledb.config.service="<service>"` command or the
# `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_service="<service>"` environment variable.
# - status: partial
# regexp: 'invalid username/password'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
# Make sure your user credentials are correctly specified using the
# `--set splunk.discovery.receivers.oracledb.config.username="<username>"` and
# `--set splunk.discovery.receivers.oracledb.config.password="<password>"` command or the
# `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_username="<username>"` and
# `SPLUNK_DISCOVERY_RECEIVERS_oracledb_CONFIG_password="<password>"` environment variables.
Original file line number Diff line number Diff line change
Expand Up @@ -18,59 +18,63 @@
# password: splunk.discovery.default
# status:
# metrics:
# successful:
# - strict: postgresql.commits
# first_only: true
# log_record:
# body: PostgreSQL receiver is working!
# - status: successful
# strict: postgresql.commits
# first_only: true
# log_record:
# body: PostgreSQL receiver is working!
# statements:
# 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.
# - regexp: 'connect: connection refused'
# first_only: true
# log_record:
# append_pattern: true
# body: The container is refusing PostgreSQL connections.
# partial:
# - regexp: 'pq: password authentication failed for user'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
# Please ensure your user credentials are correctly specified with
# `--set splunk.discovery.receivers.postgresql.config.username="<username>"` and
# `--set splunk.discovery.receivers.postgresql.config.password="<password>"` or
# `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_username="<username>"` and
# `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_password="<password>"` environment variables.
# - regexp: 'pq: database .* does not exist'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
# Make sure the target database is correctly specified using the
# `--set splunk.discovery.receivers.postgresql.config.databases="[<db>]"` command or the
# `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_databases="[<db>]"` environment variable.
# - regexp: 'pq: SSL is not enabled on the server'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
# Make sure the target database has SSL enabled or set insecure using the
# `--set splunk.discovery.receivers.postgresql.config.tls::insecure="<boolean>"` command or the
# `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_tls_x3a__x3a_insecure="<boolean>"` environment variable.
# - regexp: 'pq: pg_stat_statements must be loaded via shared_preload_libraries'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
# Make sure your PostgreSQL database has
# `shared_preload_libraries = 'pg_stat_statements'`
# in the postgresql.conf file and that
# `CREATE EXTENSION IF NOT EXISTS pg_stat_statements;`
# has been run for each database you would like to monitor.
# For example:
# `psql --dbname "<db-name>" -c "CREATE EXTENSION pg_stat_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: >-
# Please ensure your user credentials are correctly specified with
# `--set splunk.discovery.receivers.postgresql.config.username="<username>"` and
# `--set splunk.discovery.receivers.postgresql.config.password="<password>"` or
# `SPLUNK_DISCOVERY_RECEIVERS_postgresql_CONFIG_username="<username>"` and
# `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: >-
# Make sure the target database is correctly specified using the
# `--set splunk.discovery.receivers.postgresql.config.databases="[<db>]"` command or the
# `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: >-
# Make sure the target database has SSL enabled or set insecure using the
# `--set splunk.discovery.receivers.postgresql.config.tls::insecure="<boolean>"` command or the
# `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: >-
# Make sure your PostgreSQL database has
# `shared_preload_libraries = 'pg_stat_statements'`
# in the postgresql.conf file and that
# `CREATE EXTENSION IF NOT EXISTS pg_stat_statements;`
# has been run for each database you would like to monitor.
# For example:
# `psql --dbname "<db-name>" -c "CREATE EXTENSION pg_stat_statements;"`
Original file line number Diff line number Diff line change
Expand Up @@ -16,54 +16,58 @@
# default: {}
# status:
# metrics:
# successful:
# - strict: redis.uptime
# first_only: true
# log_record:
# body: redis receiver is working!
# - status: successful
# strict: redis.uptime
# first_only: true
# log_record:
# body: redis receiver is working!
# statements:
# failed:
# - regexp: "connection refused"
# first_only: true
# log_record:
# append_pattern: true
# body: The container is not serving http connections.
# - regexp: "received goaway and there are no active streams"
# first_only: true
# log_record:
# append_pattern: true
# body: Unable to connect and scrape metrics.
# - regexp: "dial tcp: lookup"
# first_only: true
# log_record:
# append_pattern: true
# body: Unable to resolve redis tcp endpoint
# partial:
# - regexp: 'NOAUTH Authentication required.'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
# Make sure your user credentials are correctly specified using the
# `--set splunk.discovery.receivers.redis.config.password="<password>"` and
# `--set splunk.discovery.receivers.redis.config.username="<username>"` commands or the
# `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password="<password>"` and
# `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password="<password>"` environment variables.
# - regexp: 'called without any password configured for the default user'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
# Make sure your user credentials are correctly specified using the
# `--set splunk.discovery.receivers.redis.config.password="<password>"` command or the
# `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password="<password>"` environment variables.
# - regexp: 'WRONGPASS invalid username-password pair or user is disabled'
# first_only: true
# log_record:
# append_pattern: true
# body: >-
# Make sure your user credentials are correctly specified using the
# `--set splunk.discovery.receivers.redis.config.password="<password>"` and
# `--set splunk.discovery.receivers.redis.config.username="<username>"` commands or the
# `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password="<password>"` and
# `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password="<password>"` environment variables.
# - 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: >-
# Make sure your user credentials are correctly specified using the
# `--set splunk.discovery.receivers.redis.config.password="<password>"` and
# `--set splunk.discovery.receivers.redis.config.username="<username>"` commands or the
# `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password="<password>"` and
# `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: >-
# Make sure your user credentials are correctly specified using the
# `--set splunk.discovery.receivers.redis.config.password="<password>"` command or the
# `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: >-
# Make sure your user credentials are correctly specified using the
# `--set splunk.discovery.receivers.redis.config.password="<password>"` and
# `--set splunk.discovery.receivers.redis.config.username="<username>"` commands or the
# `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password="<password>"` and
# `SPLUNK_DISCOVERY_RECEIVERS_redis_CONFIG_password="<password>"` environment variables.
Loading
Loading