No description, website, or topics provided.
Switch branches/tags
Clone or download
Latest commit 1934310 Jan 4, 2018
Permalink
Failed to load latest commit information.
lib/fluent/plugin Supports fluentd-0.14.0 or later Dec 25, 2017
test first commit Jul 14, 2014
.gitignore first commit Jul 14, 2014
.travis.yml Supports fluentd-0.14.0 or later Dec 25, 2017
Gemfile first commit Jul 14, 2014
LICENSE.txt first commit Jul 14, 2014
README.md Update README.md Jul 18, 2014
Rakefile first commit Jul 14, 2014
fluent-plugin-nata2.gemspec Bump version Jan 4, 2018

README.md

fluent-plugin-nata2 Build Status Code Climate

fluent plugin to register slow query logs to Nata2

Installation

Add this line to your application's Gemfile:

gem 'fluent-plugin-nata2'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fluent-plugin-nata2

Plugins

fluent-plugin-nata bundles two plugins.

in_mysqlslowquery_ex

based Fluent::NewTailInput.
tail and parse slow query log.

config parameters
  • last_dbname_file

    • optional
    • specify the file to keep track of what was something of which database is slow query log which was produced at the end (slow query log of MySQL is not recorded each time it is either the slow query that occurred in any database)
    • must be specified a different path of pos_file
  • dbname_if_missing_dbname_in_log

    • optional
    • value to be filled in case you did not know what was the slow query in any database
  • format

    • alwayls none
    • impossible to specify virtually.
  • read_from_head

    • optional
    • read from the beginning to slow query log
  • path

    • required
    • path to slow query log
  • tag

    • required
    • when used in combination with out_nata, it is necessary that the end is as shown in servicename.hostname.

out_nata2

post parsed slow query log to Nata2 Server.

config parameters
  • server

    • required
    • server FQDN
  • port

    • required
    • port of Nata2 Server bind

Example configurations

<source>
  type mysqlslowquery_ex
  read_from_head
  path /path/to/slowquery.log
  tag slowquery.servicename.hostname
  pos_file /tmp/slowquery.log.pos
  last_dbname_file /tmp/slowquery.log.lastdb
</source>

<match slowquery.**>
  type nata2
  remove_tag_prefix slowquery.
  server nata2.server
  port 9292
</match>

Contributing

  1. Fork it ( http://github.com/studio3104/fluent-plugin-nata2/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request