I have mysqld_node running on my mysql server to get statistics to be used by grafana + prometheus to graph dashboard for this MySQL server. However, i noticed that 90% of the queries in my slow query logs are created by mysqld_node, and hence hard to filter queries from Application servers. Is there a way to block queries from being logged in the slow query logged based on the port or some other criteria? The port for mysqld_node is 9104.
long_query_time is a session variable and could be set to a large value in the
log_queries_not_using_indexes(it's virtually useless anyway), or turn on
log_throttle_queries_not_using_indexes(if your version has such; what version are you using?).
mysqldumpslow -s tto filter the slow log down to 'actionable' info.
Cycle the slowlog.
If mysql_node is a single user, then have it's
init_connectturn off logging (or set
long_query_timeto a high value). (This assumes it is not