Commit b6195d90 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Kirill Smelkov

monitor: Include working fluentd process on monitoring

  it includes working wendeling plugin
parent 9d7eb49a
......@@ -11,6 +11,7 @@ url = https://rubygems.org/rubygems/rubygems-2.4.8.zip
ruby-executable = ${ruby:location}/bin/ruby
gems =
fluentd==0.12.15
fluent-plugin-td==0.10.27
gem-options = --no-ri --no-rdoc --with-icu-lib=${icu:location}/lib/ --with-icu-dir=${icu:location}/
environment =
LDFLAGS = -L${icu:location}/lib -Wl,-rpath=${icu:location}/lib
......
# DESTINATION
<match td.*.*>
type tdlog
apikey YOUR_API_KEY
auto_create_table
buffer_type file
buffer_path {{ fluentd_log_directory }}/td-agent/buffer/td
<secondary>
type file
path {{ fluentd_log_directory }}/failed_records
</secondary>
</match>
## match tag=debug.** and dump to console
<match debug.**>
type stdout
</match>
## SOURCE
<source>
type forward
</source>
<source>
type http
port 8888
</source>
## live debugging agent
<source>
type debug_agent
bind 127.0.0.1
port 24230
</source>
......@@ -21,6 +21,7 @@ extra-context =
section slave_information slap-parameter
[monitor-directory]
fluentd-log = ${:log}/fluentd
network-user-logs = ${:private-directory}/network-user-logs/
{% for slave_instance in slave_instance_list -%}
user-log-{{ slave_instance.get('slave_reference') }}-folder = ${:private-directory}/network-user-logs/{{ slave_instance.get('slave_reference') }}
......@@ -41,6 +42,23 @@ log-access-url-v6 = ${monitor-parameters:url}/{{ slave_instance.get('slave_refer
[buildout]
parts +=
fluentd-wrapper
{% for part in part_list %}
{{ ' %s' % part }}
{% endfor %}
[fluentd-wrapper]
recipe = slapos.cookbook:wrapper
command-line = {{ fluentd_location }}/bin/fluentd -l ${monitor-directory:log}/fluend.log -c ${fluentd-conf-configuration:rendered}
wrapper-path = ${monitor-directory:service}/fluentd
environment =
GEM_PATH={{ fluentd_location }}/lib/ruby/gems/1.8/
[fluentd-conf-configuration]
recipe = slapos.recipe.template:jinja2
template = {{ fluent_conf_output }}
rendered = ${monitor-directory:etc}/fluentd.cfg
mode = 0744
context =
key slapparameter_dict slap-parameters:configuration
key fluentd_log_directory monitor-directory:fluentd-log
......@@ -36,6 +36,8 @@ context = import json_module json
key instance_base_monitor instance-base-monitor:rendered
key slave_instance_list slap-configuration:slave-instance-list
key template_json_distributor_test slap-configuration:json_test_template
key fluent_conf_output slap-configuration:fluentd_conf_output
raw fluentd_location ${fluentd:location}
mode = 0644
[slap-configuration]
......@@ -48,3 +50,5 @@ cert = $${slap-connection:cert-file}
monitor_template_output = ${monitor-template:output}
network_benck_cfg_output = ${network-bench-cfg:output}
json_test_template = ${json-test-template:destination}
fluentd_conf_output = ${fluentd-agent-conf:output}
......@@ -16,26 +16,27 @@ parts =
template-monitor
eggs
fluentd
fluentd-agent-conf
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
md5sum = 9225d232336515091191146cd34f30b9
md5sum = d3a2cae2823f5f5ce2f7c293018223f3
mode = 0644
[template-monitor]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-monitor.cfg.jinja2
destination = ${buildout:directory}/template-monitor.cfg
md5sum = 810ed8199682068e27b62659d7fa101f
md5sum = 810ed8199682068e27b62659d7fa101f
mode = 0644
[template-monitor-distributor]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-monitor-distributor.cfg.jinja2
destination = ${buildout:directory}/template-monitor-distributor.cfg
md5sum = c012cf53a3f66c319db2a5d8226fa627
md5sum = 2f11edbc57eb95f9d5901d183065d166
mode = 0644
[json-test-template]
......@@ -62,6 +63,14 @@ md5sum = cfcbf2002b8eff5153e2bf68ed24b720
output = ${buildout:directory}/template-network-bench-cfg.in
mode = 0644
[fluentd-agent-conf]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/fluentd-agent.conf.jinja2.in
md5sum = 0098143de65630f78be402c65424beb4
output = ${buildout:directory}/fluentd-agent.conf.jinja2.in
mode = 0644
[slapos-toolbox]
recipe = zc.recipe.egg
eggs =
......@@ -73,6 +82,10 @@ scripts =
networkbench
onetimedownload
[fluentd]
gems +=
fluent-plugin-wendelin==0.1.alpha1
[eggs]
recipe = z3c.recipe.scripts
eggs =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment