From 57d258cb3506095fd822b4b0fe5e3c767e9bafd1 Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Tue, 11 Feb 2020 16:25:20 -0500 Subject: [PATCH] Install httpd and tail access_log with fluentd --- Vagrantfile | 5 +++++ fluentd/fluent.conf | 10 ++++++++++ graylog.yml | 2 ++ 3 files changed, 17 insertions(+) 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: