fluentd-ui 0.3.9 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fluentd-ui might be problematic. Click here for more details.
- data/ChangeLog +5 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +52 -40
- data/README.md +21 -1
- data/app/assets/javascripts/enable_bootstrap_tooltip.js +3 -0
- data/app/assets/javascripts/vue/fluent_log.js +1 -1
- data/app/assets/stylesheets/common.css.scss +9 -0
- data/app/controllers/fluentd/settings/in_forward_controller.rb +9 -0
- data/app/controllers/fluentd/settings/in_http_controller.rb +9 -0
- data/app/controllers/fluentd/settings/in_monitor_agent_controller.rb +9 -0
- data/app/controllers/fluentd/settings/out_stdout_controller.rb +9 -0
- data/app/controllers/fluentd/settings_controller.rb +2 -0
- data/app/helpers/application_helper.rb +10 -0
- data/app/models/fluent_gem.rb +1 -1
- data/app/models/fluentd/agent/local_common.rb +3 -2
- data/app/models/fluentd/setting/in_forward.rb +44 -0
- data/app/models/fluentd/setting/in_http.rb +45 -0
- data/app/models/fluentd/setting/in_monitor_agent.rb +38 -0
- data/app/models/fluentd/setting/out_stdout.rb +37 -0
- data/app/views/fluentd/settings/source_and_output.html.haml +10 -28
- data/app/views/layouts/application.html.erb +7 -0
- data/bower.json +1 -1
- data/config/locales/translation_en.yml +31 -1
- data/config/locales/translation_ja.yml +35 -1
- data/config/routes.rb +16 -0
- data/docs/screenshots/02.png +0 -0
- data/docs/screenshots/dashboard.gif +0 -0
- data/docs/screenshots/fluentd-ui.gif +0 -0
- data/docs/screenshots/in_tail.gif +0 -0
- data/docs/screenshots/plugin.gif +0 -0
- data/docs/screenshots/setting.gif +0 -0
- data/lib/file_reverse_reader.rb +2 -1
- data/lib/fluentd-ui/version.rb +1 -1
- data/public/td-logo.png +0 -0
- data/spec/features/dashboard_spec.rb +42 -0
- data/spec/features/fluentd/setting/in_forward_spec.rb +7 -0
- data/spec/features/fluentd/setting/in_http_spec.rb +7 -0
- data/spec/features/fluentd/setting/in_monitor_agent_spec.rb +7 -0
- data/spec/features/fluentd/setting/out_stdout_spec.rb +7 -0
- data/spec/features/fluentd_status_spec.rb +36 -0
- data/spec/features/{fluentd/setting/out_elasticsearch_spec.rb → out_elasticsearch_spec.rb} +3 -13
- data/spec/features/{fluentd/setting/out_forward_spec.rb → out_forward_spec.rb} +2 -12
- data/spec/features/{fluentd/setting/out_td_spec.rb → out_td_spec.rb} +2 -12
- data/spec/features/sessions_spec.rb +6 -18
- data/spec/features/setting_spec.rb +33 -0
- data/spec/features/shared_examples/configurable_daemon_settings.rb +17 -0
- data/spec/features/{fluentd/setting/source_and_output_spec.rb → source_and_output_spec.rb} +2 -13
- data/spec/lib/file_reverse_reader_spec.rb +33 -13
- data/spec/models/fluent_gem_spec.rb +0 -6
- data/spec/models/fluentd/agent/local_common_spec.rb +29 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/support/login_macro.rb +2 -2
- data/spec/support/stub_daemon.rb +12 -0
- data/vendor/assets/javascripts/bower/vue/.bower.json +5 -5
- data/vendor/assets/javascripts/bower/vue/dist/vue.js +200 -180
- data/vendor/assets/javascripts/bower/vue/dist/vue.min.js +3 -3
- data/vendor/assets/javascripts/bower/vue/src/api/lifecycle.js +3 -75
- data/vendor/assets/javascripts/bower/vue/src/compiler/transclude.js +9 -26
- data/vendor/assets/javascripts/bower/vue/src/directive.js +8 -7
- data/vendor/assets/javascripts/bower/vue/src/directives/component.js +3 -21
- data/vendor/assets/javascripts/bower/vue/src/directives/html.js +2 -1
- data/vendor/assets/javascripts/bower/vue/src/directives/repeat.js +16 -10
- data/vendor/assets/javascripts/bower/vue/src/instance/compile.js +116 -8
- data/vendor/assets/javascripts/bower/vue/src/observer/object.js +5 -14
- data/vendor/assets/javascripts/bower/vue/src/parsers/template.js +7 -5
- data/vendor/assets/javascripts/bower/vue/src/util/dom.js +21 -0
- data/vendor/assets/javascripts/bower/vue/src/util/merge-option.js +9 -12
- metadata +131 -52
- checksums.yaml +0 -7
data/ChangeLog
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
Release 0.3.10 - 2014/12/17
|
2
|
+
* [maintenance] Update components.
|
3
|
+
* [improve] Add fluentd default plugin settings.
|
4
|
+
* [fixed] Fix #121. Change to allow utf-8 string instead of ascii.
|
5
|
+
|
1
6
|
Release 0.3.9 - 2014/12/01
|
2
7
|
|
3
8
|
* [improve] Display current setting for each section.
|
data/Gemfile
CHANGED
@@ -16,9 +16,11 @@ group :development do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
group :test do
|
19
|
+
gem "rspec-its"
|
19
20
|
gem "factory_girl_rails"
|
20
21
|
gem "database_cleaner", "~> 1.2.0"
|
21
22
|
gem "capybara", "~> 2.2.1"
|
23
|
+
gem "capybara-screenshot"
|
22
24
|
gem "simplecov", "~> 0.7.1", require: false
|
23
25
|
gem "webmock", "~> 1.18.0"
|
24
26
|
gem "timecop"
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fluentd-ui (0.3.
|
4
|
+
fluentd-ui (0.3.10)
|
5
5
|
addressable
|
6
6
|
bundler
|
7
7
|
draper (~> 1.3)
|
@@ -24,27 +24,27 @@ PATH
|
|
24
24
|
GEM
|
25
25
|
remote: https://rubygems.org/
|
26
26
|
specs:
|
27
|
-
actionmailer (4.1.
|
28
|
-
actionpack (= 4.1.
|
29
|
-
actionview (= 4.1.
|
27
|
+
actionmailer (4.1.8)
|
28
|
+
actionpack (= 4.1.8)
|
29
|
+
actionview (= 4.1.8)
|
30
30
|
mail (~> 2.5, >= 2.5.4)
|
31
|
-
actionpack (4.1.
|
32
|
-
actionview (= 4.1.
|
33
|
-
activesupport (= 4.1.
|
31
|
+
actionpack (4.1.8)
|
32
|
+
actionview (= 4.1.8)
|
33
|
+
activesupport (= 4.1.8)
|
34
34
|
rack (~> 1.5.2)
|
35
35
|
rack-test (~> 0.6.2)
|
36
|
-
actionview (4.1.
|
37
|
-
activesupport (= 4.1.
|
36
|
+
actionview (4.1.8)
|
37
|
+
activesupport (= 4.1.8)
|
38
38
|
builder (~> 3.1)
|
39
39
|
erubis (~> 2.7.0)
|
40
|
-
activemodel (4.1.
|
41
|
-
activesupport (= 4.1.
|
40
|
+
activemodel (4.1.8)
|
41
|
+
activesupport (= 4.1.8)
|
42
42
|
builder (~> 3.1)
|
43
|
-
activerecord (4.1.
|
44
|
-
activemodel (= 4.1.
|
45
|
-
activesupport (= 4.1.
|
43
|
+
activerecord (4.1.8)
|
44
|
+
activemodel (= 4.1.8)
|
45
|
+
activesupport (= 4.1.8)
|
46
46
|
arel (~> 5.0.0)
|
47
|
-
activesupport (4.1.
|
47
|
+
activesupport (4.1.8)
|
48
48
|
i18n (~> 0.6, >= 0.6.9)
|
49
49
|
json (~> 1.7, >= 1.7.7)
|
50
50
|
minitest (~> 5.1)
|
@@ -59,10 +59,15 @@ GEM
|
|
59
59
|
rack (>= 1.0.0)
|
60
60
|
rack-test (>= 0.5.4)
|
61
61
|
xpath (~> 2.0)
|
62
|
+
capybara-screenshot (1.0.3)
|
63
|
+
capybara (>= 1.0, < 3)
|
64
|
+
colored
|
65
|
+
launchy
|
62
66
|
celluloid (0.15.2)
|
63
67
|
timers (~> 1.1.0)
|
64
68
|
cliver (0.3.2)
|
65
69
|
coderay (1.1.0)
|
70
|
+
colored (1.2)
|
66
71
|
cool.io (1.2.4)
|
67
72
|
crack (0.4.2)
|
68
73
|
safe_yaml (~> 1.0.0)
|
@@ -92,7 +97,7 @@ GEM
|
|
92
97
|
yajl-ruby (~> 1.0)
|
93
98
|
font-awesome-rails (4.2.0.0)
|
94
99
|
railties (>= 3.2, < 5.0)
|
95
|
-
haml (4.0.
|
100
|
+
haml (4.0.6)
|
96
101
|
tilt
|
97
102
|
haml-rails (0.5.3)
|
98
103
|
actionpack (>= 4.0.1)
|
@@ -108,7 +113,7 @@ GEM
|
|
108
113
|
i18n_generators (1.2.1)
|
109
114
|
mechanize
|
110
115
|
rails (>= 3.0.0)
|
111
|
-
jbuilder (2.2.
|
116
|
+
jbuilder (2.2.5)
|
112
117
|
activesupport (>= 3.0.0, < 5)
|
113
118
|
multi_json (~> 1.2)
|
114
119
|
jquery-rails (3.1.2)
|
@@ -118,6 +123,8 @@ GEM
|
|
118
123
|
kramdown (1.5.0)
|
119
124
|
kramdown-haml (0.0.3)
|
120
125
|
haml
|
126
|
+
launchy (2.4.3)
|
127
|
+
addressable (~> 2.3)
|
121
128
|
mail (2.6.3)
|
122
129
|
mime-types (>= 1.16, < 3)
|
123
130
|
mechanize (2.7.3)
|
@@ -131,14 +138,14 @@ GEM
|
|
131
138
|
webrobots (>= 0.0.9, < 0.2)
|
132
139
|
method_source (0.8.2)
|
133
140
|
mime-types (2.4.3)
|
134
|
-
mini_portile (0.6.
|
135
|
-
minitest (5.4.
|
141
|
+
mini_portile (0.6.1)
|
142
|
+
minitest (5.4.3)
|
136
143
|
msgpack (0.5.9)
|
137
144
|
multi_json (1.10.1)
|
138
145
|
net-http-digest_auth (1.4)
|
139
146
|
net-http-persistent (2.9.4)
|
140
|
-
nokogiri (1.6.
|
141
|
-
mini_portile (
|
147
|
+
nokogiri (1.6.5)
|
148
|
+
mini_portile (~> 0.6.0)
|
142
149
|
ntlm-http (0.1.1)
|
143
150
|
poltergeist (1.5.1)
|
144
151
|
capybara (~> 2.1)
|
@@ -151,33 +158,36 @@ GEM
|
|
151
158
|
slop (~> 3.4)
|
152
159
|
pry-rails (0.3.2)
|
153
160
|
pry (>= 0.9.10)
|
154
|
-
puma (2.
|
161
|
+
puma (2.10.2)
|
155
162
|
rack (>= 1.1, < 2.0)
|
156
163
|
rack (1.5.2)
|
157
164
|
rack-test (0.6.2)
|
158
165
|
rack (>= 1.0)
|
159
|
-
rails (4.1.
|
160
|
-
actionmailer (= 4.1.
|
161
|
-
actionpack (= 4.1.
|
162
|
-
actionview (= 4.1.
|
163
|
-
activemodel (= 4.1.
|
164
|
-
activerecord (= 4.1.
|
165
|
-
activesupport (= 4.1.
|
166
|
+
rails (4.1.8)
|
167
|
+
actionmailer (= 4.1.8)
|
168
|
+
actionpack (= 4.1.8)
|
169
|
+
actionview (= 4.1.8)
|
170
|
+
activemodel (= 4.1.8)
|
171
|
+
activerecord (= 4.1.8)
|
172
|
+
activesupport (= 4.1.8)
|
166
173
|
bundler (>= 1.3.0, < 2.0)
|
167
|
-
railties (= 4.1.
|
174
|
+
railties (= 4.1.8)
|
168
175
|
sprockets-rails (~> 2.0)
|
169
|
-
railties (4.1.
|
170
|
-
actionpack (= 4.1.
|
171
|
-
activesupport (= 4.1.
|
176
|
+
railties (4.1.8)
|
177
|
+
actionpack (= 4.1.8)
|
178
|
+
activesupport (= 4.1.8)
|
172
179
|
rake (>= 0.8.7)
|
173
180
|
thor (>= 0.18.1, < 2.0)
|
174
|
-
rake (10.
|
181
|
+
rake (10.4.1)
|
175
182
|
request_store (1.1.0)
|
176
|
-
rspec-collection_matchers (1.
|
183
|
+
rspec-collection_matchers (1.1.2)
|
177
184
|
rspec-expectations (>= 2.99.0.beta1)
|
178
185
|
rspec-core (2.99.2)
|
179
186
|
rspec-expectations (2.99.2)
|
180
187
|
diff-lcs (>= 1.1.3, < 2.0)
|
188
|
+
rspec-its (1.0.1)
|
189
|
+
rspec-core (>= 2.99.0.beta1)
|
190
|
+
rspec-expectations (>= 2.99.0.beta1)
|
181
191
|
rspec-mocks (2.99.2)
|
182
192
|
rspec-rails (2.99.0)
|
183
193
|
actionpack (>= 3.0)
|
@@ -191,10 +201,10 @@ GEM
|
|
191
201
|
rubyzip (1.1.6)
|
192
202
|
safe_yaml (1.0.4)
|
193
203
|
sass (3.2.19)
|
194
|
-
sass-rails (4.0.
|
204
|
+
sass-rails (4.0.5)
|
195
205
|
railties (>= 4.0.0, < 5.0)
|
196
206
|
sass (~> 3.2.2)
|
197
|
-
sprockets (~> 2.8, <
|
207
|
+
sprockets (~> 2.8, < 3.0)
|
198
208
|
sprockets-rails (~> 2.0)
|
199
209
|
settingslogic (2.0.9)
|
200
210
|
sigdump (0.2.2)
|
@@ -203,12 +213,12 @@ GEM
|
|
203
213
|
simplecov-html (~> 0.7.1)
|
204
214
|
simplecov-html (0.7.1)
|
205
215
|
slop (3.6.0)
|
206
|
-
sprockets (2.
|
216
|
+
sprockets (2.12.3)
|
207
217
|
hike (~> 1.2)
|
208
218
|
multi_json (~> 1.0)
|
209
219
|
rack (~> 1.0)
|
210
220
|
tilt (~> 1.1, != 1.3.0)
|
211
|
-
sprockets-rails (2.2.
|
221
|
+
sprockets-rails (2.2.2)
|
212
222
|
actionpack (>= 3.0)
|
213
223
|
activesupport (>= 3.0)
|
214
224
|
sprockets (>= 2.8, < 4.0)
|
@@ -230,7 +240,7 @@ GEM
|
|
230
240
|
addressable (>= 2.3.6)
|
231
241
|
crack (>= 0.3.2)
|
232
242
|
webrobots (0.1.1)
|
233
|
-
websocket-driver (0.
|
243
|
+
websocket-driver (0.4.0)
|
234
244
|
xpath (2.0.0)
|
235
245
|
nokogiri (~> 1.3)
|
236
246
|
yajl-ruby (1.2.1)
|
@@ -240,6 +250,7 @@ PLATFORMS
|
|
240
250
|
|
241
251
|
DEPENDENCIES
|
242
252
|
capybara (~> 2.2.1)
|
253
|
+
capybara-screenshot
|
243
254
|
database_cleaner (~> 1.2.0)
|
244
255
|
factory_girl_rails
|
245
256
|
fluentd-ui!
|
@@ -248,6 +259,7 @@ DEPENDENCIES
|
|
248
259
|
pry
|
249
260
|
pry-rails
|
250
261
|
rake
|
262
|
+
rspec-its
|
251
263
|
rspec-rails (~> 2.99)
|
252
264
|
simplecov (~> 0.7.1)
|
253
265
|
timecop
|
data/README.md
CHANGED
@@ -11,6 +11,7 @@ fluentd-ui is a browser-based [fluentd](http://fluentd.org/) and [td-agent](http
|
|
11
11
|
* Configure fluentd settings such as config file content, pidfile path, etc
|
12
12
|
* View fluentd log with simple error viewer
|
13
13
|
|
14
|
+
|
14
15
|
# Getting Started
|
15
16
|
|
16
17
|
```console
|
@@ -21,6 +22,8 @@ $ fluentd-ui start
|
|
21
22
|
Open `http://localhost:9292/` by your browser.<br />
|
22
23
|
The default account is username="admin" and password="changeme"
|
23
24
|
|
25
|
+
![fluentd-ui](./docs/screenshots/fluentd-ui.gif)
|
26
|
+
|
24
27
|
## TO Ubuntu 14.04 user (installed ruby by apt-get)
|
25
28
|
|
26
29
|
You also need to install these packages:
|
@@ -57,7 +60,24 @@ fluentd-ui has the same tasks of `bundle gem foobar; cd foobar; rake -T`.
|
|
57
60
|
|
58
61
|
# Screenshots
|
59
62
|
|
60
|
-
(v0.
|
63
|
+
(v0.3.9)
|
64
|
+
|
65
|
+
## Dashboard
|
66
|
+
|
67
|
+
![dashboard](./docs/screenshots/dashboard.gif)
|
68
|
+
|
69
|
+
## Setting
|
70
|
+
|
71
|
+
![setting](./docs/screenshots/setting.gif)
|
72
|
+
|
73
|
+
### in_tail setting
|
74
|
+
|
75
|
+
![in_tail](./docs/screenshots/in_tail.gif)
|
76
|
+
|
77
|
+
## Plugin
|
78
|
+
|
79
|
+
![plugin](./docs/screenshots/plugin.gif)
|
80
|
+
|
61
81
|
|
62
82
|
![ss01](./docs/screenshots/01.png)
|
63
83
|
![ss02](./docs/screenshots/02.png)
|
@@ -9,6 +9,16 @@ module ApplicationHelper
|
|
9
9
|
image_tag(ENV["FLUENTD_UI_LOGO"] || "/fluentd-logo-right-text.png")
|
10
10
|
end
|
11
11
|
|
12
|
+
def fluentd_status_icon
|
13
|
+
return unless Fluentd.instance
|
14
|
+
Fluentd.instance.agent.running? ? icon('fa-circle running') : icon('fa-circle stopped')
|
15
|
+
end
|
16
|
+
|
17
|
+
def fluentd_status_message
|
18
|
+
return unless Fluentd.instance
|
19
|
+
Fluentd.instance.agent.running? ? I18n.t('messages.fluentd_status_running') : I18n.t('messages.fluentd_status_stopped')
|
20
|
+
end
|
21
|
+
|
12
22
|
def language_name(locale)
|
13
23
|
# NOTE: these are fixed terms, not i18n-ed
|
14
24
|
{
|
data/app/models/fluent_gem.rb
CHANGED
@@ -18,7 +18,7 @@ module FluentGem
|
|
18
18
|
# So our decision is that cache `gem list` in 3 seconds
|
19
19
|
Rails.cache.fetch(LIST_CACHE_KEY, expires_in: 3.seconds) do
|
20
20
|
output = `#{gem} list`
|
21
|
-
|
21
|
+
if $? && $?.exitstatus != 0 # NOTE: $? will be nil on CircleCI, so check $? at first
|
22
22
|
raise GemError, "failed command: `#{gem} list`"
|
23
23
|
end
|
24
24
|
output.lines
|
@@ -53,13 +53,14 @@ class Fluentd
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
private
|
57
|
-
|
58
56
|
def pid
|
59
57
|
return unless File.exists?(pid_file)
|
58
|
+
return if File.zero?(pid_file)
|
60
59
|
File.read(pid_file).to_i rescue nil
|
61
60
|
end
|
62
61
|
|
62
|
+
private
|
63
|
+
|
63
64
|
def logged_errors(&block)
|
64
65
|
return [] unless File.exist?(log_file)
|
65
66
|
buf = []
|
@@ -0,0 +1,44 @@
|
|
1
|
+
class Fluentd
|
2
|
+
module Setting
|
3
|
+
class InForward
|
4
|
+
include ActiveModel::Model
|
5
|
+
include Common
|
6
|
+
|
7
|
+
KEYS = [
|
8
|
+
:bind, :port, :linger_timeout, :chunk_size_limit, :chunk_size_warn_limit, :log_level
|
9
|
+
].freeze
|
10
|
+
|
11
|
+
attr_accessor(*KEYS)
|
12
|
+
|
13
|
+
validates :bind, presence: true
|
14
|
+
validates :port, presence: true
|
15
|
+
|
16
|
+
def self.initial_params
|
17
|
+
{
|
18
|
+
bind: "0.0.0.0",
|
19
|
+
port: 24224,
|
20
|
+
linger_timeout: 0,
|
21
|
+
chunk_size_limit: nil,
|
22
|
+
chunk_size_warn_limit: nil,
|
23
|
+
log_level: "info",
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def common_options
|
28
|
+
[
|
29
|
+
:bind, :port
|
30
|
+
]
|
31
|
+
end
|
32
|
+
|
33
|
+
def advanced_options
|
34
|
+
[
|
35
|
+
:linger_timeout, :chunk_size_limit, :chunk_size_warn_limit, :log_level
|
36
|
+
]
|
37
|
+
end
|
38
|
+
|
39
|
+
def plugin_name
|
40
|
+
"forward"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
class Fluentd
|
2
|
+
module Setting
|
3
|
+
class InHttp
|
4
|
+
include ActiveModel::Model
|
5
|
+
include Common
|
6
|
+
|
7
|
+
KEYS = [
|
8
|
+
:bind, :port, :body_size_limit, :keepalive_timeout, :add_http_headers, :format, :log_level
|
9
|
+
].freeze
|
10
|
+
|
11
|
+
attr_accessor(*KEYS)
|
12
|
+
|
13
|
+
validates :bind, presence: true
|
14
|
+
validates :port, presence: true
|
15
|
+
|
16
|
+
def self.initial_params
|
17
|
+
{
|
18
|
+
bind: "0.0.0.0",
|
19
|
+
port: 8888,
|
20
|
+
body_size_limit: "32m",
|
21
|
+
keepalive_timeout: "10s",
|
22
|
+
add_http_headers: false,
|
23
|
+
format: "default",
|
24
|
+
log_level: "info",
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
def common_options
|
29
|
+
[
|
30
|
+
:bind, :port
|
31
|
+
]
|
32
|
+
end
|
33
|
+
|
34
|
+
def advanced_options
|
35
|
+
[
|
36
|
+
:body_size_limit, :keepalive_timeout, :add_http_headers, :format, :log_level
|
37
|
+
]
|
38
|
+
end
|
39
|
+
|
40
|
+
def plugin_name
|
41
|
+
"http"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
class Fluentd
|
2
|
+
module Setting
|
3
|
+
class InMonitorAgent
|
4
|
+
include ActiveModel::Model
|
5
|
+
include Common
|
6
|
+
|
7
|
+
KEYS = [
|
8
|
+
:bind, :port
|
9
|
+
].freeze
|
10
|
+
|
11
|
+
attr_accessor(*KEYS)
|
12
|
+
|
13
|
+
validates :bind, presence: true
|
14
|
+
validates :port, presence: true
|
15
|
+
|
16
|
+
def self.initial_params
|
17
|
+
{
|
18
|
+
bind: "0.0.0.0",
|
19
|
+
port: 24220,
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
def common_options
|
24
|
+
[
|
25
|
+
:bind, :port
|
26
|
+
]
|
27
|
+
end
|
28
|
+
|
29
|
+
def advanced_options
|
30
|
+
[]
|
31
|
+
end
|
32
|
+
|
33
|
+
def plugin_name
|
34
|
+
"monitor_agent"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
class Fluentd
|
2
|
+
module Setting
|
3
|
+
class OutStdout
|
4
|
+
include Common
|
5
|
+
|
6
|
+
KEYS = [:match, :output_type].freeze
|
7
|
+
|
8
|
+
attr_accessor(*KEYS)
|
9
|
+
|
10
|
+
choice :output_type, %w(json hash)
|
11
|
+
|
12
|
+
validates :match, presence: true
|
13
|
+
validates :output_type, inclusion: { in: %w(json hash) }
|
14
|
+
|
15
|
+
def self.initial_params
|
16
|
+
{
|
17
|
+
match: "debug.**",
|
18
|
+
output_type: "json",
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
def common_options
|
23
|
+
[
|
24
|
+
:match, :output_type
|
25
|
+
]
|
26
|
+
end
|
27
|
+
|
28
|
+
def advanced_options
|
29
|
+
[]
|
30
|
+
end
|
31
|
+
|
32
|
+
def plugin_name
|
33
|
+
"stdout"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -6,14 +6,11 @@
|
|
6
6
|
.panel-heading
|
7
7
|
%h4= t('.in')
|
8
8
|
.panel-body
|
9
|
-
%
|
10
|
-
|
11
|
-
=
|
12
|
-
|
13
|
-
|
14
|
-
= link_to(daemon_setting_in_syslog_path(@fluentd)) do
|
15
|
-
= icon('fa-file-text-o fa-lg')
|
16
|
-
= t("fluentd.common.setup_in_syslog")
|
9
|
+
- %w|tail syslog monitor_agent http forward|.each do |type|
|
10
|
+
%p
|
11
|
+
= link_to(send("daemon_setting_in_#{type}_path", @fluentd)) do
|
12
|
+
= icon('fa-file-text-o fa-lg')
|
13
|
+
= t("fluentd.common.setup_in_#{type}")
|
17
14
|
.col-xs-1.arrow-right
|
18
15
|
= icon "fa-arrow-circle-right"
|
19
16
|
.col-xs-2
|
@@ -25,26 +22,11 @@
|
|
25
22
|
.panel-heading
|
26
23
|
%h4= t('.out')
|
27
24
|
.panel-body
|
28
|
-
%
|
29
|
-
|
30
|
-
=
|
31
|
-
|
32
|
-
|
33
|
-
= link_to(daemon_setting_out_s3_path(@fluentd)) do
|
34
|
-
= icon('fa-file-text-o fa-lg')
|
35
|
-
= t("fluentd.common.setup_out_s3")
|
36
|
-
%p
|
37
|
-
= link_to(daemon_setting_out_mongo_path(@fluentd)) do
|
38
|
-
= icon('fa-file-text-o fa-lg')
|
39
|
-
= t("fluentd.common.setup_out_mongo")
|
40
|
-
%p
|
41
|
-
= link_to(daemon_setting_out_elasticsearch_path(@fluentd)) do
|
42
|
-
= icon('fa-file-text-o fa-lg')
|
43
|
-
= t("fluentd.common.setup_out_elasticsearch")
|
44
|
-
%p
|
45
|
-
= link_to(daemon_setting_out_forward_path(@fluentd)) do
|
46
|
-
= icon('fa-file-text-o fa-lg')
|
47
|
-
= t("fluentd.common.setup_out_forward")
|
25
|
+
- %w|stdout td s3 mongo elasticsearch forward|.each do |type|
|
26
|
+
%p
|
27
|
+
= link_to(send("daemon_setting_out_#{type}_path", @fluentd)) do
|
28
|
+
= icon('fa-file-text-o fa-lg')
|
29
|
+
= t("fluentd.common.setup_out_#{type}")
|
48
30
|
|
49
31
|
= render "shared/vue/setting"
|
50
32
|
|
@@ -29,6 +29,13 @@
|
|
29
29
|
<!-- /.navbar-header -->
|
30
30
|
|
31
31
|
<ul class="nav navbar-top-links navbar-right">
|
32
|
+
<% if @fluentd %>
|
33
|
+
<li class="fluentd-status">
|
34
|
+
<a href="<%= daemon_path %>" data-toggle="tooltip" data-placement="bottom" title="fluentd <%= fluentd_status_message %>">
|
35
|
+
<%= fluentd_status_icon %>
|
36
|
+
</a>
|
37
|
+
</li>
|
38
|
+
<% end %>
|
32
39
|
<%= render partial: "shared/vue/notification" %>
|
33
40
|
|
34
41
|
<li class="dropdown">
|