diff --git a/Vagrantfile b/Vagrantfile index 4d4c863..0e44ba2 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -33,6 +33,11 @@ Vagrant.configure("2") do |config| # Convenience yum install -y vim + # Install apache + yum install -y httpd + systemctl start httpd + systemctl -q enable httpd + # Install rsyslog yum install -y rsyslog systemctl start rsyslog diff --git a/fluentd/fluent.conf b/fluentd/fluent.conf index 1cead2b..f319bbf 100644 --- a/fluentd/fluent.conf +++ b/fluentd/fluent.conf @@ -9,6 +9,16 @@ tag system + + @type tail + path /var/log/hostlogs/httpd/access_log + pos_file /var/log/hostlogs/httpd/access_log.pos + tag httpd.access + + @type apache2 + + + @type gelf host vagrant_graylog_1 diff --git a/graylog.yml b/graylog.yml index aef8627..e5163eb 100644 --- a/graylog.yml +++ b/graylog.yml @@ -5,6 +5,8 @@ services: fluentd: build: ./fluentd restart: always + volumes: + - /var/log:/var/log/hostlogs networks: - graylog ports: