Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.
/ slow_query_exporter Public archive

A daemon which exports a MySQL slow query log to a Graylog server

License

Notifications You must be signed in to change notification settings

clio/slow_query_exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: This project is no longer in active use at Clio, since we have a different database cluster configuration and a different logging system now. It should remain publicly accessible, though, because it's linked from a Clio Labs blog post about making slow queries visible to developers.

slow_query_exporter

A daemon which monitors a MySQL slow query log and sends every entry it sees to Graylog.

It sends slow queries to Graylog via UDP in GELF format. The key names are somewhat idiosyncratic to the particular corporate environment it hails from, so you might want to change them. It's only been tested against Percona Server 5.6, not stock MySQL; I'm uncertain if there are any substantial differences in the slow query log format between them.

Usage

Usage: slow_query_exporter [-fv] [-d delay] [-h host] [-p port] /path/to/slow_query.log
    -d, --delay SECONDS    An interval to pause after each GELF message, in (possibly fractional) seconds
    -f, --foreground       Don't daemonize on startup
    -?, --help             Display this help text
    -h, --host HOST        The GELF host
    -p, --port PORT        The GELF UDP port
    -v, --[no-]verbose     Print entries to stdout as they're parsed
        --version          Display application version information

About

A daemon which exports a MySQL slow query log to a Graylog server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages