fluent-plugin-rds-mysql-log 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e0cb7bdaabe8aba123118d767991c34e2fd388712a8615e2349d1e1e479eef8
4
- data.tar.gz: 5ce5f71f1d55da0abd18bbecf17a8b003e5d628f452e969431446054bfb6dfa3
3
+ metadata.gz: 77b346ae8c0eab97d93915d459002b6573a545b94f4fd2bba8bad896e3d866e8
4
+ data.tar.gz: bada832355054a08bdba2eb4a093b2d2f82f6d3f6b9a7ab645dcdebfdec96cef
5
5
  SHA512:
6
- metadata.gz: 93c286cb8d436beff1c0c354e7df195cf8ad7e153c8956d1e0af99ae7c4b4903ab9a97148f4a005c2b9de2a720b6e4166b9cc877fa0b300919d51920ad7c73ce
7
- data.tar.gz: 9e3506a4e2e5cebed34794a37ec29cd8bf2b6818ea6812a1841fec706e4288c0c06f52dcb203b8faca1b782f26e792f2171b9e3ba80a072200c1dbc781ff357d
6
+ metadata.gz: b20780f5f24d8b0ed76773e2d3c035be23cc6ef465523851346502e34428d5c777cd886946b05c793ec82e917bc9d40fdf185da3d1f002fa1dc69d3ae039406e
7
+ data.tar.gz: 72f7f4a1919b610b36a27b18ce35268fa7f624ad169a528b9f58ae51bcdd459e0afe722bc45587999f2ccf2885d3439bac055f5b171949dbd9bd16c86a5ca86d
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'fluent-plugin-rds-mysql-log'
8
- spec.version = '0.1.12'
8
+ spec.version = '0.1.13'
9
9
  spec.authors = ['Junaid Ali']
10
10
  spec.email = ['jonnie36@yahoo.com']
11
11
  spec.summary = 'Amazon RDS Mysql logs input plugin'
@@ -8,7 +8,6 @@ class Fluent::Plugin::RdsMysqlLogInput < Fluent::Plugin::Input
8
8
  helpers :timer
9
9
 
10
10
  LOG_REGEXP = /^(?:(?<audit_logs>(?<timestamp>(\d{8})\s(\d{2}:\d{2}:\d{2})?),(?<serverhost>[^,]+?),(?<username>[^,]+?),(?<host>[^,]+?),(?<connectionid>[^,]+?),(?<queryid>[^,]+?),(?<operation>[^,]+?),(?<database>[^,]+?),'(?<query>.*?)',(?<retcode>[0-9]?),(?:,)?)|(?<other_logs>(?<time>(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}\.\d+Z)?)\s(?<thread_id>\d+?)\s\[(?<severity>([^\]]+)?)\]\s\[(?<error_code>([^\]]+)?)\]\s\[(?<subsystem>([^\]]+)?)\]\s((?<message>.+)?)))$/m
11
- AUDIT_LOG_PATTERN = /server_audit\.log(\.\d+)?$/i
12
11
 
13
12
  config_param :access_key_id, :string, :default => nil
14
13
  config_param :secret_access_key, :string, :default => nil
@@ -76,10 +75,6 @@ class Fluent::Plugin::RdsMysqlLogInput < Fluent::Plugin::Input
76
75
  end
77
76
  end
78
77
 
79
- def is_audit_logs?
80
- @pos_info.keys.any? { |log_file_name| log_file_name =~ AUDIT_LOG_PATTERN }
81
- end
82
-
83
78
  def should_track_marker?(log_file_name)
84
79
  return false if log_file_name == "audit/server_audit.log"
85
80
 
@@ -122,18 +117,11 @@ class Fluent::Plugin::RdsMysqlLogInput < Fluent::Plugin::Input
122
117
  begin
123
118
  log.debug "get logfile-list from rds: db_instance_identifier=#{@db_instance_identifier}, pos_last_written_timestamp=#{@pos_last_written_timestamp}"
124
119
 
125
- if is_audit_logs?
126
- @rds.describe_db_log_files(
127
- db_instance_identifier: @db_instance_identifier,
128
- max_records: 50
129
- )
130
- else
131
- @rds.describe_db_log_files(
132
- db_instance_identifier: @db_instance_identifier,
133
- file_last_written: @pos_last_written_timestamp,
134
- max_records: 50,
135
- )
136
- end
120
+ @rds.describe_db_log_files(
121
+ db_instance_identifier: @db_instance_identifier,
122
+ file_last_written: @pos_last_written_timestamp,
123
+ max_records: 10,
124
+ )
137
125
  rescue => e
138
126
  log.warn "RDS Client describe_db_log_files error occurred: #{e.message}"
139
127
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-rds-mysql-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Junaid Ali