Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ops
/
yoho-ansible-roles
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
root
2019-01-18 17:54:14 +0800
Commit
cf6b83dfc9a056f13c27da84835311946ce4b242
1 parent
5cca3efe
支持同步media containers的日志
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
0 deletions
inventories/media/hosts
playbooks/media-rsyslog.yml
roles/java-rsyslog/tasks/main.yml
roles/java-rsyslog/templates/rsyslog.module.conf.j2
inventories/media/hosts
View file @
cf6b83d
...
...
@@ -6,3 +6,10 @@
[nameserver-master]
10.66.251.10
[media-continers]
10.66.251.13
10.66.251.18
10.66.251.21
10.66.251.24
10.66.251.42
...
...
playbooks/media-rsyslog.yml
0 → 100644
View file @
cf6b83d
-
hosts
:
yoho-media
vars
:
rsyslog_module
:
yohomars-platform
rsyslog_files
:
-
warn-log
-
request-timeout
-
request-stat
-
database-timeout
-
database-stat
remote_user
:
root
roles
:
-
java-rsyslog
-
hosts
:
yoho-media
vars
:
rsyslog_module
:
yohonow-platform
rsyslog_files
:
-
warn-log
-
request-timeout
-
request-stat
-
database-timeout
-
database-stat
remote_user
:
root
roles
:
-
java-rsyslog
-
hosts
:
yoho-media
vars
:
rsyslog_module
:
yohomars-search
rsyslog_files
:
-
database-timeout
-
index-rebuild
-
request-timeout
-
request-stat
-
slow-sql
-
warn-log
remote_user
:
root
roles
:
-
java-rsyslog
-
hosts
:
yoho-media
vars
:
rsyslog_module
:
yohonow
rsyslog_files
:
-
request-timeout
-
request-stat
-
database-timeout
-
database-stat
-
mq-producer
-
mq-consumer
remote_user
:
root
roles
:
-
java-rsyslog
-
hosts
:
yoho-media
vars
:
rsyslog_module
:
yohomars
rsyslog_files
:
-
debug-log
-
warn-log
-
request-timeout
-
request-stat
-
database-timeout
-
database-stat
-
mq-producer
-
mq-consumer
-
points-raffle-msg
remote_user
:
root
roles
:
-
java-rsyslog
...
...
roles/java-rsyslog/tasks/main.yml
View file @
cf6b83d
...
...
@@ -14,6 +14,14 @@
notify
:
-
reload rsyslog
-
name
:
define docker modules
set_fact
:
docker_modules
:
-
yohonow-platform
-
yohomars-platform
-
yohomars-search
-
yohonow
-
yohomars
-
name
:
sync module rsyslog config files
template
:
...
...
roles/java-rsyslog/templates/rsyslog.module.conf.j2
View file @
cf6b83d
{
%
for
rsyslog_file
in
rsyslog_files
%
}
{
%
if
rsyslog_module
in
docker_modules
%
}
$InputFileName
/var/lib/docker/applog/
{
{rsyslog_module
}
}/
{
{
rsyslog_file
}
}.log
{
%
else
%
}
$InputFileName
/Data/logs/
{
{rsyslog_module
}
}/
{
{
rsyslog_file
}
}.log
{
%
endif
%
}
$InputFileTag
{
{
rsyslog_module
}
},
{
{
rsyslog_file
}
}
$InputFileSeverity
info
$InputFileStateFile
state_
{
{
rsyslog_module
}
}_
{
{
rsyslog_file
}
}
...
...
Please
register
or
login
to post a comment