Skip to content

Define ECS set of fields for SQL information #514

@simitt

Description

@simitt

Different beats modules exist that are collecting SQL information (MySQL, PostgreSQL). APM also collects SQL information when available. Aligning the information by defining a common field set in ECS would help retrieving information from the data in a unified way.

Following fields are currently defined in APM and beats and might help as a starting point for discussions:

packetbeat

transaction_event fields:
transaction_event
event.dataset
type
method
query

postgresql:
pgsql.error_code
pgsql.error_message
pgsql.error_severity
pgsql.num_fields
pgsql.num_rows

mysql:
mysql.affected_rows
mysql.insert_id
mysql.num_fields
mysql.num_rows
mysql.query
mysql.error_code
mysql.error_message

filebeat
ecs compliant
service.type
event.module
event.dataset

postgresql
postgresql.log.timestamp
postgresql.log.core_id
postgresql.log.database
postgresql.log.query
postgresql.log.timezone
postgresql.log.thread_id
postgresql.log.user
postgresql.log.level
postgresql.log.message

mysql
mysql.thread_id
mysql.error.thread_id
mysql.error.level
mysql.error.message
mysql.slowlog.lock_time.sec
mysql.slowlog.rows_sent
mysql.slowlog.rows_examined
mysql.slowlog.rows_affected
mysql.slowlog.bytes_sent
mysql.slowlog.bytes_received
mysql.slowlog.query
mysql.slowlog.id
mysql.slowlog.schema
mysql.slowlog.current_user
mysql.slowlog.last_errno
mysql.slowlog.killed
mysql.slowlog.query_cache_hit
mysql.slowlog.tmp_table
mysql.slowlog.tmp_table_on_disk
mysql.slowlog.tmp_tables
mysql.slowlog.tmp_disk_tables
mysql.slowlog.tmp_table_sizes
mysql.slowlog.filesort
mysql.slowlog.filesort_on_disk
mysql.slowlog.priority_queue
mysql.slowlog.full_scan
mysql.slowlog.full_join
mysql.slowlog.merge_passes
mysql.slowlog.sort_merge_passes
mysql.slowlog.sort_range_count
mysql.slowlog.sort_rows
mysql.slowlog.sort_scan_count
mysql.slowlog.log_slow_rate_type
mysql.slowlog.log_slow_rate_limit
mysql.slowlog.read_first
mysql.slowlog.read_last
mysql.slowlog.read_key
mysql.slowlog.read_next
mysql.slowlog.read_prev
mysql.slowlog.read_rnd
mysql.slowlog.read_rnd_next
mysql.slowlog.innodb.trx_id
mysql.slowlog.innodb.io_r_ops
mysql.slowlog.innodb.io_r_bytes
mysql.slowlog.innodb.io_r_wait.sec
mysql.slowlog.innodb.rec_lock_wait.sec
mysql.slowlog.innodb.queue_wait.sec
mysql.slowlog.innodb.pages_distinct
mysql.slowlog.user
mysql.slowlog.host
mysql.slowlog.ip

APM
span.type
span.subtype
span.name (query summary)
span.action
span.db.statement
span.db.type
span.db.instance
span.db.link
span.db.user

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFC:candidatereadyIssues we'd like to address in the future.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions