1
0
mirror of https://github.com/krislamo/graylog_demo synced 2025-10-23 13:28:33 +00:00

Log all containers and syslogs'

This commit is contained in:
2020-03-24 15:22:39 -04:00
parent 9f78958df4
commit b5ab0d95bc
4 changed files with 52 additions and 11 deletions

22
Vagrantfile vendored
View File

@@ -45,6 +45,17 @@ Vagrant.configure("2") do |config|
# Convenience
yum install -y vim
# Install rsyslog
yum install -y rsyslog
systemctl start rsyslog
systemctl -q enable rsyslog
# Add rsyslog forwarding option if it does not exist
if ! grep -q "127.0.0.1:5140" /etc/rsyslog.conf; then
echo "*.* @127.0.0.1:5140" >> /etc/rsyslog.conf
systemctl restart rsyslog
fi
# Install td-agent
cp /vagrant/td-agent.repo /etc/yum.repos.d/
yum check-update
@@ -132,17 +143,6 @@ Vagrant.configure("2") do |config|
systemctl start httpd
systemctl -q enable httpd
# Install rsyslog
yum install -y rsyslog
systemctl start rsyslog
systemctl -q enable rsyslog
# Add rsyslog forwarding option if it does not exist
if ! grep -q "127.0.0.1:5140" /etc/rsyslog.conf; then
echo "*.* @127.0.0.1:5140" >> /etc/rsyslog.conf
systemctl restart rsyslog
fi
# Configure td-agent
cp /vagrant/td-agent.conf /etc/td-agent/td-agent.conf
mkdir -p /var/log/containers