Delete `fluentd` cookbook.
This commit is contained in:
parent
6706b9d4b1
commit
4a9e3d6286
|
@ -1,11 +0,0 @@
|
||||||
# -------------------------------------------
|
|
||||||
# Specifying the default settings:
|
|
||||||
# -------------------------------------------
|
|
||||||
node.reverse_merge!({
|
|
||||||
'td-agent' => {
|
|
||||||
'user' => 'td-agent',
|
|
||||||
'group' => 'td-agent',
|
|
||||||
'forward' => false,
|
|
||||||
'role' => 'primary'
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -1,40 +0,0 @@
|
||||||
#####################################
|
|
||||||
# Common Settings:
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
include_recipe './attributes.rb'
|
|
||||||
|
|
||||||
include_recipe './prerequisites.rb'
|
|
||||||
include_recipe './install.rb'
|
|
||||||
|
|
||||||
include_recipe './setup.rb'
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Manager Settings:
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
if node['td-agent']['forward']
|
|
||||||
include_recipe './processor.rb'
|
|
||||||
include_recipe './syslog.rb'
|
|
||||||
include_recipe './slack.rb'
|
|
||||||
end
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# monitoring Settings:
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
include_recipe './nginx.rb'
|
|
||||||
|
|
||||||
%w( aptitude auth cron-apt monit consul ).each do |c|
|
|
||||||
remote_file "/etc/td-agent/conf.d/forwarder_#{c}.conf" do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
|
|
||||||
notifies :restart, 'service[td-agent]'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
service 'td-agent' do
|
|
||||||
action :restart
|
|
||||||
end
|
|
|
@ -1,4 +0,0 @@
|
||||||
check process td-agent
|
|
||||||
with pidfile /var/run/td-agent/td-agent.pid
|
|
||||||
start program = "/etc/init.d/td-agent start"
|
|
||||||
stop program = "/etc/init.d/td-agent stop"
|
|
|
@ -1,6 +0,0 @@
|
||||||
# - nofile - max number of open files
|
|
||||||
|
|
||||||
root soft nofile 65536
|
|
||||||
root hard nofile 65536
|
|
||||||
* soft nofile 65536
|
|
||||||
* hard nofile 65536
|
|
|
@ -1,38 +0,0 @@
|
||||||
<label @forward>
|
|
||||||
<match **>
|
|
||||||
@type copy
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type forward
|
|
||||||
send_timeout 60s
|
|
||||||
recover_wait 10s
|
|
||||||
transport tcp
|
|
||||||
heartbeat_interval 1s
|
|
||||||
phi_threshold 16
|
|
||||||
hard_timeout 60s
|
|
||||||
|
|
||||||
buffer_type file
|
|
||||||
buffer_path /var/log/td-agent/buffer/forward*.buffer
|
|
||||||
|
|
||||||
<server>
|
|
||||||
name primary.td-agent.service.consul
|
|
||||||
host primary.td-agent.service.consul
|
|
||||||
port 24224
|
|
||||||
weight 60
|
|
||||||
</server>
|
|
||||||
|
|
||||||
<server>
|
|
||||||
name backup.td-agent.service.consul
|
|
||||||
host backup.td-agent.service.consul
|
|
||||||
port 24224
|
|
||||||
weight 60
|
|
||||||
standby
|
|
||||||
</server>
|
|
||||||
</store>
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type file
|
|
||||||
path /tmp/forward.log
|
|
||||||
</store>
|
|
||||||
</match>
|
|
||||||
</label>
|
|
|
@ -1,20 +0,0 @@
|
||||||
<source>
|
|
||||||
@type tail
|
|
||||||
path /var/log/apt/history.log
|
|
||||||
pos_file /var/log/td-agent/aptitude.pos
|
|
||||||
format none
|
|
||||||
tag aptitude
|
|
||||||
</source>
|
|
||||||
|
|
||||||
<filter aptitude>
|
|
||||||
@type record_transformer
|
|
||||||
<record>
|
|
||||||
hostname ${hostname}
|
|
||||||
message ${hostname}: ${record["message"]}
|
|
||||||
</record>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match aptitude>
|
|
||||||
@type relabel
|
|
||||||
@label @forward
|
|
||||||
</match>
|
|
|
@ -1,28 +0,0 @@
|
||||||
<source>
|
|
||||||
@type tail
|
|
||||||
path /var/log/auth.log
|
|
||||||
pos_file /var/log/td-agent/auth.pos
|
|
||||||
format syslog
|
|
||||||
tag auth
|
|
||||||
</source>
|
|
||||||
|
|
||||||
<filter auth>
|
|
||||||
@type record_transformer
|
|
||||||
<record>
|
|
||||||
message ${hostname}: ${record["message"]}
|
|
||||||
</record>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter auth>
|
|
||||||
@type grep
|
|
||||||
|
|
||||||
<exclude>
|
|
||||||
key message
|
|
||||||
pattern (CRON|Did not receive identification string from|sudo|pam_unix|seat|Removed session|Received disconnect|New session|Accepted publickey|Disconnected)
|
|
||||||
</exclude>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match auth>
|
|
||||||
@type relabel
|
|
||||||
@label @forward
|
|
||||||
</match>
|
|
|
@ -1,30 +0,0 @@
|
||||||
<source>
|
|
||||||
@type tail
|
|
||||||
path /var/log/supervisor/consul.log
|
|
||||||
pos_file /var/log/td-agent/consul.pos
|
|
||||||
format /^( (?<time>[0-9/]+ [0-9:]+) (?<message>.*$)|(?<message>.*))/
|
|
||||||
time_format %Y/%m/%d %H:%M:%S
|
|
||||||
time_key time
|
|
||||||
tag consul
|
|
||||||
</source>
|
|
||||||
|
|
||||||
<filter consul>
|
|
||||||
@type record_transformer
|
|
||||||
<record>
|
|
||||||
message ${hostname}: ${record["message"]}
|
|
||||||
</record>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter consul>
|
|
||||||
@type grep
|
|
||||||
|
|
||||||
<exclude>
|
|
||||||
key message
|
|
||||||
pattern (raft|memberlist|serf|Synced|Adding|Removing|consul\.fsm: snapshot created|session shutdown|context deadline exceeded|last request still outstanding|INFO|server health)
|
|
||||||
</exclude>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match consul>
|
|
||||||
@type relabel
|
|
||||||
@label @forward
|
|
||||||
</match>
|
|
|
@ -1,29 +0,0 @@
|
||||||
<source>
|
|
||||||
@type tail
|
|
||||||
path /var/log/cron-apt/log
|
|
||||||
pos_file /var/log/td-agent/cron-apt.pos
|
|
||||||
format none
|
|
||||||
tag cron_apt
|
|
||||||
</source>
|
|
||||||
|
|
||||||
<filter cron_apt>
|
|
||||||
@type grep
|
|
||||||
|
|
||||||
<regexp>
|
|
||||||
key message
|
|
||||||
pattern (^CRON-APT RUN|not upgraded\.)
|
|
||||||
</regexp>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter cron_apt>
|
|
||||||
@type record_transformer
|
|
||||||
<record>
|
|
||||||
hostname ${hostname}
|
|
||||||
message ${hostname}: ${record["message"]}
|
|
||||||
</record>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match cron_apt>
|
|
||||||
@type relabel
|
|
||||||
@label @forward
|
|
||||||
</match>
|
|
|
@ -1,20 +0,0 @@
|
||||||
<source>
|
|
||||||
@type tail
|
|
||||||
path /var/log/monit.log
|
|
||||||
pos_file /var/log/td-agent/monit.pos
|
|
||||||
format none
|
|
||||||
tag monit
|
|
||||||
</source>
|
|
||||||
|
|
||||||
<filter monit>
|
|
||||||
@type record_transformer
|
|
||||||
<record>
|
|
||||||
hostname ${hostname}
|
|
||||||
message ${hostname}: ${record["message"]}
|
|
||||||
</record>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match monit>
|
|
||||||
@type relabel
|
|
||||||
@label @forward
|
|
||||||
</match>
|
|
|
@ -1,21 +0,0 @@
|
||||||
<source>
|
|
||||||
@type tail
|
|
||||||
path /var/log/nginx/*access.log
|
|
||||||
pos_file /var/log/td-agent/nginx_logs.pos
|
|
||||||
format ltsv
|
|
||||||
time_format %d/%b/%Y:%H:%M:%S %z
|
|
||||||
time_key time
|
|
||||||
tag nginx
|
|
||||||
</source>
|
|
||||||
|
|
||||||
<filter nginx>
|
|
||||||
@type record_transformer
|
|
||||||
<record>
|
|
||||||
hostname ${hostname}
|
|
||||||
</record>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match nginx>
|
|
||||||
@type relabel
|
|
||||||
@label @forward
|
|
||||||
</match>
|
|
|
@ -1,29 +0,0 @@
|
||||||
<source>
|
|
||||||
@type tail
|
|
||||||
path /var/log/td-agent/td-agent.log
|
|
||||||
pos_file /var/log/td-agent/td-agent.pos
|
|
||||||
format none
|
|
||||||
tag td_agent
|
|
||||||
</source>
|
|
||||||
|
|
||||||
<filter td_agent>
|
|
||||||
@type grep
|
|
||||||
|
|
||||||
<exclude>
|
|
||||||
key message
|
|
||||||
pattern (openvpn|will be ignored|section <buffer> is not used)
|
|
||||||
</exclude>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter td_agent>
|
|
||||||
@type record_transformer
|
|
||||||
<record>
|
|
||||||
hostname ${hostname}
|
|
||||||
message ${hostname}: ${record["message"]}
|
|
||||||
</record>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match td_agent>
|
|
||||||
@type relabel
|
|
||||||
@label @forward
|
|
||||||
</match>
|
|
|
@ -1,146 +0,0 @@
|
||||||
<label @forward>
|
|
||||||
<match consul>
|
|
||||||
@type relabel
|
|
||||||
@label @consul_branch
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match nginx>
|
|
||||||
@type relabel
|
|
||||||
@label @s3_upload
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match **>
|
|
||||||
@type relabel
|
|
||||||
@label @process
|
|
||||||
</match>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label @received>
|
|
||||||
<match consul>
|
|
||||||
@type relabel
|
|
||||||
@label @consul_branch
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match nginx>
|
|
||||||
@type relabel
|
|
||||||
@label @s3_upload
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match **>
|
|
||||||
@type copy
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type relabel
|
|
||||||
@label @process
|
|
||||||
</store>
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type file
|
|
||||||
path /tmp/received.log
|
|
||||||
</store>
|
|
||||||
</match>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label @process>
|
|
||||||
<match auth>
|
|
||||||
@type relabel
|
|
||||||
@label @good
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<filter aptitude>
|
|
||||||
@type grep
|
|
||||||
|
|
||||||
<regexp>
|
|
||||||
key message
|
|
||||||
pattern (Commandline|Error|Install|Remove|Upgrade)
|
|
||||||
</regexp>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match aptitude>
|
|
||||||
@type copy
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type relabel
|
|
||||||
@label @good
|
|
||||||
</store>
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type file
|
|
||||||
path /tmp/aptitude.log
|
|
||||||
</store>
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<filter monit>
|
|
||||||
@type grep
|
|
||||||
|
|
||||||
<exclude>
|
|
||||||
key message
|
|
||||||
pattern (error|ERROR)
|
|
||||||
</exclude>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match monit>
|
|
||||||
@type relabel
|
|
||||||
@label @danger
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match cron_apt>
|
|
||||||
@type copy
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type relabel
|
|
||||||
@label @good
|
|
||||||
</store>
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type file
|
|
||||||
path /tmp/cron-apt.log
|
|
||||||
</store>
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match consul>
|
|
||||||
@type relabel
|
|
||||||
@label @danger
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<filter td_agent>
|
|
||||||
@type grep
|
|
||||||
|
|
||||||
<exclude>
|
|
||||||
key message
|
|
||||||
pattern (\[info\]|parameter '.*' in|suppressed same stacktrace|loop\.rb|in_tail\.rb| 0(6|7):25|from ASCII-8BIT to UTF-8|of buffered_slack plugin)
|
|
||||||
</exclude>
|
|
||||||
|
|
||||||
<regexp>
|
|
||||||
key message
|
|
||||||
pattern \[(warn|error)\]
|
|
||||||
</regexp>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match td_agent>
|
|
||||||
@type relabel
|
|
||||||
@label @danger
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<filter app.**>
|
|
||||||
@type record_transformer
|
|
||||||
<record>
|
|
||||||
message ${record["log"]}
|
|
||||||
</record>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match app.**>
|
|
||||||
@type relabel
|
|
||||||
@label @apps
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match random.**>
|
|
||||||
@type relabel
|
|
||||||
@label @random
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match apt-mirror.**>
|
|
||||||
@type relabel
|
|
||||||
@label @good
|
|
||||||
</match>
|
|
||||||
</label>
|
|
|
@ -1,39 +0,0 @@
|
||||||
######################
|
|
||||||
# Receive nginx logs #
|
|
||||||
######################
|
|
||||||
|
|
||||||
<label @consul_branch>
|
|
||||||
<match consul>
|
|
||||||
@type copy
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type rewrite_tag_filter
|
|
||||||
|
|
||||||
<rule>
|
|
||||||
key message
|
|
||||||
pattern (\[WARN\]|left, deregistering|removing server monitor)
|
|
||||||
tag consul.danger
|
|
||||||
</rule>
|
|
||||||
</store>
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type rewrite_tag_filter
|
|
||||||
|
|
||||||
<rule>
|
|
||||||
key message
|
|
||||||
pattern (\[INFO\])
|
|
||||||
tag consul.good
|
|
||||||
</rule>
|
|
||||||
</store>
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match consul.danger>
|
|
||||||
@type relabel
|
|
||||||
@label @danger
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match consul.good>
|
|
||||||
@type relabel
|
|
||||||
@label @good
|
|
||||||
</match>
|
|
||||||
</label>
|
|
|
@ -1,15 +0,0 @@
|
||||||
md5:57588c890f0ef6e8f8a9de3f2336df7c:salt:128-16-245-219-49-150-248-21:aes-256-cfb:y/5qRG08epYJHUpPCrY46RkH9mYeg0PPxe6b8Vus43Ph7TOSJOey/LrOZjJ7
|
|
||||||
iTYfOte4QbTH/P+wjm/8RldxRRSJ3spha/2MuIVQpliC+5KnT9nmC1rLP8+y
|
|
||||||
nbJstGpeGUuRIjzZtMvI1Kvb+j2BEOPCeiTAD2yXwPsMbaODoG5mzYgcSgBV
|
|
||||||
TDvtbG6I0KYDiLbTZw7crusQltx45uvq1zcK+g5UMb7oaqClyJA5VLsWRbeT
|
|
||||||
tiaFXQLYy2oXIvQmw65ccFixLIxVERxGrx/x4uGhR/saQIZMonymG6z3Riy3
|
|
||||||
vejNLQNIfaxZYb0llLTtzt13jsft+5Z766Y8Umoiws+bUF7igLw3CI47pb6y
|
|
||||||
PEwCvhKxk+RG5dtPQysRy1sSPrOTBzVf6+0/Em2BaKRBubRNEDpjI/1+aN5L
|
|
||||||
t5c4qYX3lP3v2bjwF1iQO5qEv3R46ytblZmyaoSPYGsWyzZBNn841QBZ1oi7
|
|
||||||
IlyYsnTFEQ5InVTygCd+04/L3tOoxShvsbxJZ/jYqSBaAo9UdhnYU9wo+8ob
|
|
||||||
Oz2sjarXIJyzqs4a68/YizNRdke7dEFblnYsLZUAtWQBnjo4cwGug8nZGaKr
|
|
||||||
L2M5IT3NWfVHRCf1sbkQspsjGtb3fM/F62VH8OU85vTXvR+SWSTYJzpSvcCH
|
|
||||||
73HqgOD1H0jzwanZi8SvVs7zA3Fr6HgJ4FYbwaB/109BVjnzhcmDm0RkXGQY
|
|
||||||
nqRsvlxEj6NnSGlGQgLvYgT1KLCTYFrZNlNZRzO71B32jc/KxZnwFRcxgrcb
|
|
||||||
/mAsz/TxLdxSjmuCAssfL/YY2uh5fPgL0XC31RdVJ9mdUpHQmtTAfAjYyilJ
|
|
||||||
J/fQOY6ZRDqq1Vfq53wuLrZJdxztWNK8DJguZJ5gdqy/l4ggPnCvDFwI
|
|
|
@ -1,5 +0,0 @@
|
||||||
<source>
|
|
||||||
@type forward
|
|
||||||
port 24224
|
|
||||||
@label @received
|
|
||||||
</source>
|
|
|
@ -1,38 +0,0 @@
|
||||||
# For ESXi syslog Monitoring:
|
|
||||||
<source>
|
|
||||||
@type syslog
|
|
||||||
port 1514
|
|
||||||
bind 0.0.0.0
|
|
||||||
protocol_type tcp
|
|
||||||
format none
|
|
||||||
tag system.esxi
|
|
||||||
</source>
|
|
||||||
|
|
||||||
<filter system.esxi.**>
|
|
||||||
@type grep
|
|
||||||
|
|
||||||
<exclude>
|
|
||||||
key message
|
|
||||||
pattern (iscsid|LikewiseGetDomainJoinInfo|hostd|DictionaryLoad|addVob|backup\.sh|libsmart|\[context\]|Hostd|vmauthd|Rhttpproxy|requested fast path state update| above TEMPERATURE threshold)
|
|
||||||
</exclude>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match system.esxi.**.{debug,info}>
|
|
||||||
@type null
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match system.esxi.**.{notice,warn,err,crit,alert,emerg}>
|
|
||||||
@type copy
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type file
|
|
||||||
path /tmp/syslog_esxi.log
|
|
||||||
time_slice_format %Y%m%d
|
|
||||||
time_slice_wait 1m
|
|
||||||
</store>
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type relabel
|
|
||||||
@label @danger
|
|
||||||
</store>
|
|
||||||
</match>
|
|
|
@ -1,41 +0,0 @@
|
||||||
# For synology syslog Monitoring:
|
|
||||||
<source>
|
|
||||||
@type syslog
|
|
||||||
port 5141
|
|
||||||
bind 0.0.0.0
|
|
||||||
protocol_type tcp
|
|
||||||
message_format auto
|
|
||||||
tag system.synology
|
|
||||||
</source>
|
|
||||||
|
|
||||||
<filter system.synology.**>
|
|
||||||
@type grep
|
|
||||||
|
|
||||||
<exclude>
|
|
||||||
key message
|
|
||||||
pattern (accessed the shared folder)
|
|
||||||
</exclude>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter system.synology.**>
|
|
||||||
@type record_transformer
|
|
||||||
<record>
|
|
||||||
message ${record["host"]}: ${record["message"]}
|
|
||||||
</record>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match system.synology.**>
|
|
||||||
@type copy
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type file
|
|
||||||
path /tmp/syslog_synology.log
|
|
||||||
time_slice_format %Y%m%d
|
|
||||||
time_slice_wait 1m
|
|
||||||
</store>
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type relabel
|
|
||||||
@label @good
|
|
||||||
</store>
|
|
||||||
</match>
|
|
|
@ -1,45 +0,0 @@
|
||||||
# For vyos syslog Monitoring:
|
|
||||||
<source>
|
|
||||||
@type syslog
|
|
||||||
port 5140
|
|
||||||
bind 0.0.0.0
|
|
||||||
protocol_type tcp
|
|
||||||
message_format auto
|
|
||||||
tag system.vyos
|
|
||||||
</source>
|
|
||||||
|
|
||||||
<filter system.vyos.**>
|
|
||||||
@type grep
|
|
||||||
|
|
||||||
<exclude>
|
|
||||||
key message
|
|
||||||
pattern (suspect value|Port3 Link|duplicate on LAN|can't get program name from|call user-defined scripts or executables|FRAG TTL expired|Port4 Link|Overriding mtu|Overriding mru|IPv6 Control Protoco)
|
|
||||||
</exclude>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter system.vyos.**>
|
|
||||||
@type record_transformer
|
|
||||||
<record>
|
|
||||||
message ${record["host"]}: ${record["message"]}
|
|
||||||
</record>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<match system.vyos.**.{debug,info,notice}>
|
|
||||||
@type null
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match system.vyos.**.{warn,err,crit,alert,emerg}>
|
|
||||||
@type copy
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type file
|
|
||||||
path /tmp/syslog_vyos.log
|
|
||||||
time_slice_format %Y%m%d
|
|
||||||
time_slice_wait 1m
|
|
||||||
</store>
|
|
||||||
|
|
||||||
<store>
|
|
||||||
@type relabel
|
|
||||||
@label @danger
|
|
||||||
</store>
|
|
||||||
</match>
|
|
|
@ -1,44 +0,0 @@
|
||||||
md5:4d7c92818f78f0384855b1006b60eb0f:salt:101-24-185-121-164-238-97-103:aes-256-cfb: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
|
|
|
@ -1 +0,0 @@
|
||||||
@include conf.d/*.conf
|
|
|
@ -1,57 +0,0 @@
|
||||||
# Load the APT key:
|
|
||||||
execute 'curl https://packages.treasuredata.com/GPG-KEY-td-agent | apt-key add -' do
|
|
||||||
not_if 'apt-key list | grep Treasure'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Deploy the APT source:
|
|
||||||
CMD = 'grep DISTRIB_CODENAME /etc/lsb-release | cut -f 2 -d "="'
|
|
||||||
DIST = run_command(CMD).stdout.chomp
|
|
||||||
|
|
||||||
template '/etc/apt/sources.list.d/treasure-data.list' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
|
|
||||||
variables(platform: node['platform'], dist: DIST)
|
|
||||||
end
|
|
||||||
|
|
||||||
execute 'apt update' do
|
|
||||||
action :run
|
|
||||||
|
|
||||||
not_if 'which td-agent'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Install
|
|
||||||
package 'td-agent' do
|
|
||||||
action :install
|
|
||||||
end
|
|
||||||
|
|
||||||
# Overwrite the conf:
|
|
||||||
remote_file '/etc/td-agent/td-agent.conf' do
|
|
||||||
owner node['td-agent']['user']
|
|
||||||
group node['td-agent']['group']
|
|
||||||
mode '644'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Create /etc/td-agent/conf.d:
|
|
||||||
directory '/etc/td-agent/conf.d' do
|
|
||||||
owner node['td-agent']['user']
|
|
||||||
group node['td-agent']['group']
|
|
||||||
mode '755'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Deploy /etc/hosts file:
|
|
||||||
HOSTNAME = run_command('uname -n').stdout.chomp
|
|
||||||
|
|
||||||
template '/etc/hosts' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
|
|
||||||
variables(HOSTNAME: HOSTNAME)
|
|
||||||
end
|
|
||||||
|
|
||||||
# Enable and start:
|
|
||||||
service 'td-agent' do
|
|
||||||
action :enable
|
|
||||||
end
|
|
|
@ -1,22 +0,0 @@
|
||||||
# Manager setting:
|
|
||||||
if node['td-agent']['forward']
|
|
||||||
gem_package 'fluent-plugin-s3' do
|
|
||||||
action :upgrade
|
|
||||||
gem_binary '/usr/sbin/td-agent-gem'
|
|
||||||
end
|
|
||||||
|
|
||||||
encrypted_remote_file '/etc/td-agent/conf.d/processor_nginx.conf' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
source 'files/etc/td-agent/conf.d/processor_nginx.conf'
|
|
||||||
password ENV['ITAMAE_PASSWORD']
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Agent setting:
|
|
||||||
remote_file '/etc/td-agent/conf.d/forwarder_nginx.conf' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
end
|
|
|
@ -1,5 +0,0 @@
|
||||||
remote_file '/etc/security/limits.d/90-nfile.conf' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
end
|
|
|
@ -1,7 +0,0 @@
|
||||||
%w( processor.conf processor_consul.conf ).each do |f|
|
|
||||||
remote_file "/etc/td-agent/conf.d/#{f}" do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,73 +0,0 @@
|
||||||
########################################################
|
|
||||||
# Common Configuration
|
|
||||||
########################################################
|
|
||||||
|
|
||||||
# Monit configuration for `td-agent`:
|
|
||||||
remote_file '/etc/monit/conf.d/td-agent.conf' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
|
|
||||||
# notifies :restart, 'service[monit]'
|
|
||||||
end
|
|
||||||
|
|
||||||
# add `td-agent` user to `adm` group:
|
|
||||||
execute 'usermod -aG adm td-agent' do
|
|
||||||
not_if 'id td-agent | grep adm'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Deploy the `td-agent` configuration file for monitoring `td-agent` logs:
|
|
||||||
remote_file '/etc/td-agent/conf.d/forwarder_td-agent.conf' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
end
|
|
||||||
|
|
||||||
########################################################
|
|
||||||
# Agent Configuration:
|
|
||||||
########################################################
|
|
||||||
unless node['td-agent']['forward']
|
|
||||||
remote_file '/etc/td-agent/conf.d/forwarder.conf' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
########################################################
|
|
||||||
# Manager Configuration:
|
|
||||||
########################################################
|
|
||||||
if node['td-agent']['forward']
|
|
||||||
remote_file '/etc/td-agent/conf.d/receiver.conf' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
end
|
|
||||||
|
|
||||||
template '/etc/consul.d/service-td-agent.json' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
|
|
||||||
variables(role: node['td-agent']['role'])
|
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
|
||||||
end
|
|
||||||
|
|
||||||
%w( 24224/tcp 24224/udp ).each do |p|
|
|
||||||
execute "ufw allow #{p}" do
|
|
||||||
user 'root'
|
|
||||||
|
|
||||||
not_if "LANG=c ufw status | grep #{p}"
|
|
||||||
|
|
||||||
notifies :run, 'execute[ufw reload-or-enable]'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
execute 'ufw reload-or-enable' do
|
|
||||||
user 'root'
|
|
||||||
command 'LANG=C ufw reload | grep skipping && ufw --force enable || exit 0'
|
|
||||||
|
|
||||||
action :nothing
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,12 +0,0 @@
|
||||||
gem_package 'fluent-plugin-slack' do
|
|
||||||
action :upgrade
|
|
||||||
gem_binary '/usr/sbin/td-agent-gem'
|
|
||||||
end
|
|
||||||
|
|
||||||
encrypted_remote_file '/etc/td-agent/conf.d/watcher.conf' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
source 'files/etc/td-agent/conf.d/watcher.conf'
|
|
||||||
password ENV['ITAMAE_PASSWORD']
|
|
||||||
end
|
|
|
@ -1,15 +0,0 @@
|
||||||
%w( esxi synology vyos ).each do |c|
|
|
||||||
remote_file "/etc/td-agent/conf.d/syslog_#{c}.conf" do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
%w( 1514/tcp 5140/tcp 5141/tcp ).each do |p|
|
|
||||||
execute "ufw allow #{p}" do
|
|
||||||
user 'root'
|
|
||||||
|
|
||||||
not_if "LANG=c ufw status | grep #{p}"
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1 +0,0 @@
|
||||||
deb http://packages.treasuredata.com/3/<%= @platform %>/<%= @dist %>/ <%= @dist %> contrib
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"service": {
|
|
||||||
"name": "td-agent",
|
|
||||||
"tags": ["<%= @role %>"],
|
|
||||||
"port": 24224
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
127.0.0.1 localhost
|
|
||||||
127.0.1.1 <%= @HOSTNAME %>
|
|
||||||
|
|
||||||
192.168.10.110 primary.td-agent.service.consul
|
|
||||||
192.168.10.115 backup.td-agent.service.consul
|
|
||||||
|
|
||||||
# The following lines are desirable for IPv6 capable hosts
|
|
||||||
::1 localhost ip6-localhost ip6-loopback
|
|
||||||
ff02::1 ip6-allnodes
|
|
||||||
ff02::2 ip6-allrouters
|
|
||||||
|
|
Loading…
Reference in New Issue