opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

[receiver/mysql] add support for more metrics

Open aboguszewski-sumo opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Sumo Logic MySQL app uses metrics that are not scraped by the mysqlreceiver. The exact list of metrics needed is here (some are already supported, but some, like the perf ones, are missing).

Describe the solution you'd like

New metrics can be added by modifying metadata.yaml file and generating code using mdatagen. However, the amount of missing metrics is quite big. If I'm not mistaken, there are 71 missing metrics in total. Because of that, my suggestion is to add them in several separate pull requests.

Describe alternatives you've considered

No response

Additional context

This issue is very similar to #14095. However, it requires way more metrics to be added and I'd like to have your opinion on whether it's worth adding them before starting the work.

Telegraf plugin docs: https://www.influxdata.com/integration/mysql-performance-monitoring/ Telegraf plugin on GitHub: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/mysql Full list of metrics needed by Sumo Logic: https://help.sumologic.com/07Sumo-Logic-Apps/12Databases/MySQL/MySQL_Metrics

Metrics that are missing:

Click to expand
mysql_aborted_clients
mysql_aborted_connects
mysql_bytes_received
mysql_bytes_sent
mysql_commands_delete
mysql_commands_insert
mysql_commands_select
mysql_commands_update
mysql_connection_errors_internal
mysql_connection_errors_max_connections
mysql_connections
mysql_created_tmp_disk_tables
mysql_created_tmp_files
mysql_created_tmp_tables
mysql_innodb_buffer_pool_pages_total
mysql_innodb_row_lock_current_waits
mysql_locked_connects
mysql_mysqlx_connections_accepted
mysql_mysqlx_connections_closed
mysql_mysqlx_connections_rejected
mysql_mysqlx_worker_threads
mysql_mysqlx_worker_threads_active
mysql_opened_files
mysql_opened_tables
mysql_perf_schema_events_statements_errors_total
mysql_perf_schema_events_statements_no_index_used_total
mysql_perf_schema_events_statements_rows_affected_total
mysql_perf_schema_events_statements_rows_examined_total
mysql_perf_schema_events_statements_rows_sent_total
mysql_perf_schema_events_statements_seconds_total
mysql_perf_schema_events_statements_sort_merge_passes_total
mysql_perf_schema_events_statements_sort_rows_total
mysql_perf_schema_events_statements_tmp_disk_tables_total
mysql_perf_schema_events_statements_tmp_tables_total
mysql_perf_schema_events_statements_total
mysql_perf_schema_events_statements_warnings_total
mysql_perf_schema_index_io_waits_seconds_total_delete
mysql_perf_schema_index_io_waits_seconds_total_fetch
mysql_perf_schema_index_io_waits_seconds_total_insert
mysql_perf_schema_index_io_waits_seconds_total_update
mysql_perf_schema_index_io_waits_total_delete
mysql_perf_schema_index_io_waits_total_fetch
mysql_perf_schema_index_io_waits_total_insert
mysql_perf_schema_index_io_waits_total_update
mysql_perf_schema_read
mysql_perf_schema_read_high_priority
mysql_perf_schema_read_no_insert
mysql_perf_schema_read_normal
mysql_perf_schema_read_with_shared_locks
mysql_perf_schema_table_io_waits_seconds_total_delete
mysql_perf_schema_table_io_waits_seconds_total_fetch
mysql_perf_schema_table_io_waits_seconds_total_insert
mysql_perf_schema_table_io_waits_seconds_total_update
mysql_perf_schema_table_io_waits_total_delete
mysql_perf_schema_table_io_waits_total_fetch
mysql_perf_schema_table_io_waits_total_insert
mysql_perf_schema_table_io_waits_total_update
mysql_perf_schema_write
mysql_perf_schema_write_allow_write
mysql_perf_schema_write_concurrent_insert
mysql_perf_schema_write_low_priority
mysql_perf_schema_write_normal
mysql_qcache_hits
mysql_qcache_inserts
mysql_queries
mysql_questions
mysql_select_full_join
mysql_select_full_range_join
mysql_select_range
mysql_select_range_check
mysql_select_scan
mysql_slow_queries
mysql_table_open_cache_hits
mysql_table_open_cache_misses
mysql_table_open_cache_overflows
mysql_uptime 

aboguszewski-sumo avatar Sep 15 '22 13:09 aboguszewski-sumo

Pinging code owners: @djaglowski. See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Sep 16 '22 16:09 github-actions[bot]

Most of these appear to be reasonable to add. I don't think the query ones will work, unless they are counts of queries.

In any case, I would certainly appreciate if you'd break this into several PRs so I can process them.

djaglowski avatar Sep 16 '22 17:09 djaglowski

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

  • receiver/mysql: @djaglowski

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Dec 05 '22 03:12 github-actions[bot]

It seems that we managed to introduce all needed metrics into otelcol. Thanks to everyone who helped in that.

aboguszewski-sumo avatar Feb 20 '23 15:02 aboguszewski-sumo

@aboguszewski-sumo @sumo-drosiek Looks like mysql_aborted_connects and mysql_aborted_clients is still not added to mysql receiver.

makeavish avatar Jun 06 '23 18:06 makeavish