Giter Club home page Giter Club logo

vagrant-fluentd's Introduction

vagrant-fluentd

Project to deploy a Redhat based fluentd collector, from rsyslog, to Hadoop, running on multiple different Linux and Windows hosts.

Deploy - fluentd-only master

git clone https://github.com/apolloclark/vagrant-fluentd

# configure Redhat subscription variables
REDHAT_USER=''
REDHAT_PASS=''

# launch fluentd master collector
cd ./vagrant-fluentd/fluentd-master/rhel7.2
vagrant up




OR




Deploy - fluentd + hadoop master

git clone https://github.com/apolloclark/vagrant-fluentd

# configure Redhat subscription variables
REDHAT_USER=''
REDHAT_PASS=''

# launch fluentd master collector
cd ./vagrant-fluentd/hadoop-master/rhel7.2
vagrant up

# open browser - http://127.0.0.1:9870/explorer.html#/logs




Logs

fluentd

# config file
nano /etc/td-agent/td-agent.conf

# update config
\cp /vagrant/provision/fluentd/td-agent.conf /etc/td-agent/td-agent.conf

# verify config
td-agent --dry-run -c /etc/td-agent/td-agent.conf

# check version, 1.0.2
td-agent --version

# check package version, 3.1.1
yum info td-agent | grep "Version"

# check status
systemctl status td-agent

# stop
systemctl stop td-agent

# restart
systemctl restart td-agent

# log file
nano /var/log/td-agent/td-agent.log

# clear logs
systemctl stop td-agent && echo "" > /var/log/td-agent/td-agent.log && systemctl restart td-agent
watch -n 1 "tail -n 48 /var/log/td-agent/td-agent.log"

# check if selinux is blocking
grep -F "td-agent" /var/log/audit/audit.log | grep -F "success=no"

# configure selinux
semanage port -a -t syslogd_port_t -p tcp 5140
semanage port -l | grep -F "syslogd_port_t" | grep 5140

rsyslogd

# config file
nano /etc/rsyslog.conf

# update config
\cp /vagrant/provision/rsyslogd/rsyslog.conf /etc/rsyslog.conf && systemctl restart rsyslog

# verify config
rsyslogd -N1

# check verstion, Linux = 8.24.0, Windows = 4.3.0.255
rsyslogd -version | head -n 1

# check package version
yum info rsyslog | grep "Version"

# check status
systemctl status rsyslog

# restart
systemctl restart rsyslog

# check for errors
cat /var/log/messages | grep rsyslogd

# check if SELinux is blocking
grep -F "/usr/sbin/rsyslogd" /var/log/audit/audit.log | grep -F "success=no"

# configure selinux
semanage port -a -t syslogd_port_t -p tcp 5140
semanage port -l | grep -F "syslogd_port_t" | grep 5140

# test logging
logger testmessage5
grep -F "testmessage5" /var/log/messages
sleep 30s
grep -F "testmessage5" /var/log/td-agent/td-agent.log

hadoop

# startup
/vagrant/provision/hadoop/start_hadoop.sh

# get a list of running Java services
ps -aux | grep java | awk '{print $12, $2}' | cut -c 8- | head -n -1 | awk '{print $2, $1}'

# check if selinux is blocking
grep -F "java" /var/log/audit/audit.log | grep -F "success=no"

# configure selinux
semanage port -a -t http_port_t -p tcp 9870
semanage port -l | grep -F "http_port_t" | grep 9870

# try to curl the HDFS UI
curl -sSL http://127.0.0.1:9870 > /dev/null



# name node folder
/opt/hadoop/hdfs/namenode

# data node folder
/opt/hadoop/hdfs/datanod

# view data node
http://127.0.0.1:9870

# view data node folders
http://127.0.0.1:9870/explorer.html

# restart nodes
stop-dfs.sh && start-dfs.sh

# restart httpfs
hdfs --daemon stop httpfs && hdfs --daemon stop httpfs


vagrant-fluentd's People

Contributors

apolloclark avatar

Watchers

James Cloos avatar Hoya Shin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.