Prerequisites
- A Bronto account and API key (how to create one)
- MySQL writing logs to disk. The default error log on Debian/Ubuntu is
/var/log/mysql/error.log - An OpenTelemetry Collector (recommended) or Fluent Bit installed on the same host
my.cnf to capture queries worth investigating:
my.cnf
Configure the Collector
Error and slow-query entries can span multiple lines. Usemultiline keyed on the leading timestamp or the slow-log # Time: header:
/etc/otel/config.yaml
<REGION> to eu or us.
What you will see in Bronto
Open Search and filter byservice.name = mysql. The error log carries startup/shutdown, errors, and warnings (timestamp, thread ID, severity, subsystem); the slow query log carries each slow statement with Query_time, Lock_time, Rows_examined, and the SQL text. Bronto’s Custom Parser extracts these fields server-side.
Troubleshooting
- Where are the logs? Run
SHOW VARIABLES LIKE 'log_error';andSHOW VARIABLES LIKE 'slow_query_log_file';. Adjust theincludepaths to match. - General query log: disabled by default and very verbose — enable (
general_log = 1) only for short debugging sessions. - For general issues, see OTel Collector troubleshooting.
Alternative: Fluent Bit
If you already run Fluent Bit, tail the MySQL log files and forward them over HTTP:fluent-bit.conf
json_lines, not json. For slow-query entries that span lines, add a multiline.parser keyed on the # Time: header. See Connect Fluent Bit to Bronto.
