fluent-plugin-td 0.10.12 → 0.10.13

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ Release 0.10.13 - 2012/12/02
3
+
4
+ * Normalize invalid database/table names instead of raising errors
5
+
6
+
2
7
  Release 0.10.12 - 2012/10/15
3
8
 
4
9
  * Overwrite buffer_chunk_limit to 32MB
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.12
1
+ 0.10.13
@@ -1,14 +1,30 @@
1
+ ####
2
+ ## Output descriptions:
3
+ ##
1
4
 
2
- ## match tag=apache.access and upload to Treasure Data
3
- #<match apache.access>
4
- # type tdlog
5
- # apikey APIKEY
6
- #</match>
5
+ # Treasure Data output
6
+ # match events whose tag is td.DATABASE.TABLE
7
+ <match td.*.*>
8
+ type tdlog
9
+ apikey YOUR_API_KEY
7
10
 
11
+ auto_create_table
12
+ buffer_type file
13
+ buffer_path /var/log/td-agent/buffer/td
14
+ </match>
15
+
16
+ ## match tag=debug.** and dump to console
17
+ <match debug.**>
18
+ type stdout
19
+ </match>
20
+
21
+ ####
22
+ ## Source descriptions:
23
+ ##
8
24
 
9
25
  ## built-in TCP input
10
26
  <source>
11
- type tcp
27
+ type forward
12
28
  </source>
13
29
 
14
30
  ## built-in UNIX socket input
@@ -17,62 +33,64 @@
17
33
  #</source>
18
34
 
19
35
  # HTTP input
20
- # http://localhost:8888/<tag>?json=<json>
36
+ # POST http://localhost:8888/<tag>?json=<json>
37
+ # POST http://localhost:8888/td.myapp.login?json={"user"%3A"me"}
21
38
  <source>
22
39
  type http
23
40
  port 8888
24
41
  </source>
25
42
 
43
+ ## live debugging agent
44
+ <source>
45
+ type debug_agent
46
+ bind 127.0.0.1
47
+ port 24230
48
+ </source>
49
+
50
+ ####
51
+ ## Examples:
52
+ ##
53
+
26
54
  ## File input
27
- ## read apache logs with tag=apache.access
55
+ ## read apache logs continuously and tags td.apache.access
28
56
  #<source>
29
57
  # type tail
30
58
  # format apache
31
59
  # path /var/log/httpd-access.log
32
- # tag apache.access
60
+ # tag td.apache.access
33
61
  #</source>
34
62
 
35
-
36
- ## match tag=apache.access and write to file
37
- #<match apache.access>
63
+ ## File output
64
+ ## match tag=local.** and write to file
65
+ #<match local.**>
38
66
  # type file
39
67
  # path /var/log/td-agent/access
40
68
  #</match>
41
69
 
42
- ## match tag=debug.** and dump to console
43
- <match debug.**>
44
- type stdout
45
- </match>
46
-
70
+ ## Forwarding
47
71
  ## match tag=system.** and forward to another td-agent server
48
72
  #<match system.**>
49
- # type tcp
73
+ # type forward
50
74
  # host 192.168.0.11
75
+ # # secondary host is optional
51
76
  # <secondary>
52
77
  # host 192.168.0.12
53
78
  # </secondary>
54
79
  #</match>
55
80
 
56
- ## match tag=myapp.** and forward and write to file
57
- #<match myapp.**>
81
+ ## Multiple output
82
+ ## match tag=td.*.* and output to Treasure Data AND file
83
+ #<match td.*.*>
58
84
  # type copy
59
85
  # <store>
60
- # type tcp
61
- # host 192.168.0.13
86
+ # type tdlog
87
+ # apikey API_KEY
88
+ # auto_create_table
62
89
  # buffer_type file
63
- # buffer_path /var/log/td-agent/myapp-forward
64
- # retry_limit 50
65
- # flush_interval 10s
90
+ # buffer_path /var/log/td-agent/buffer/td
66
91
  # </store>
67
92
  # <store>
68
93
  # type file
69
- # path /var/log/td-agent/myapp
94
+ # path /var/log/td-agent/td-%Y-%m-%d/%H.log
70
95
  # </store>
71
96
  #</match>
72
-
73
- ## match not matched logs and write to file
74
- #<match **>
75
- # type file
76
- # path /var/log/td-agent/else/%Y-%m-%d/%H.log
77
- #</match>
78
-
@@ -129,12 +129,12 @@ class TreasureDataLogOutput < BufferedOutput
129
129
  raise ConfigError, "'database' and 'table' parameter are required on tdlog output"
130
130
  end
131
131
  begin
132
- TreasureData::API.normalize_database_name(database)
132
+ TreasureData::API.validate_database_name(database)
133
133
  rescue
134
134
  raise ConfigError, "Invalid database name #{database.inspect}: #{$!}: #{conf}"
135
135
  end
136
136
  begin
137
- TreasureData::API.normalize_table_name(table)
137
+ TreasureData::API.validate_table_name(table)
138
138
  rescue
139
139
  raise ConfigError, "Invalid table name #{table.inspect}: #{$!}: #{conf}"
140
140
  end
@@ -179,8 +179,8 @@ class TreasureDataLogOutput < BufferedOutput
179
179
  key = @key
180
180
  else
181
181
  database, table = tag.split('.')[-2,2]
182
- TreasureData::API.normalize_database_name(database)
183
- TreasureData::API.normalize_table_name(table)
182
+ database = TreasureData::API.normalize_database_name(database)
183
+ table = TreasureData::API.normalize_table_name(table)
184
184
  key = "#{database}.#{table}"
185
185
  end
186
186
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-td
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.12
4
+ version: 0.10.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-15 00:00:00.000000000 Z
12
+ date: 2012-12-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd