Running and Install the Clouder and VM metrics fluentd agent
- Update the fluentd configurations under the FluentD folder
- Download the in_clouderametrics.rb from https://github.com/wesyao/fluent-plugin-clouderametrics.
- Run the packaging script to have a simple tar.gz file of all of the configuration files. Note: scripts/td-agent-config is a temporary folder
./package-tar-file.sh
- Upload these files to the VMs that need to be configured
- There is a README inside the tar file with some example steps on how to execute one of the two options to install the configuration on the VM.
Installing TD-Agent on CentOS RHEL 7.4
- Install the TD Fluentd agent
curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent3.sh | sh
- Install plugins
td-agent-gem install fluent-plugin-azurestorage
- (Optional) Install Ruby for native plugins
sudo yum install ruby
sudo yum install gcc-c++
sudo td-agent-gem install fluent-plugin-clouderametrics
sudo td-agent-gem install fluent-plugin-azurestorage
- Basic commands
/etc/init.d/td-agent start
/etc/init.d/td-agent restart
/etc/init.d/td-agent stop
- Test
curl -X POST -d 'json={"json":"message"}' http://localhost:8888/debug.test
- View Logs
tail -f /var/log/td-agent/td-agent.log
- Edit Config
vi /etc/td-agent/td-agent.conf
Run Ansible playbook to configure td-agent
- Install Ansible (MacOS X)
pip install ansible
- Ping test
ansible all -m ping -u <username> -i hosts --ask-pass
- Run Ansible playbook
ansible-playbook playbook.setup.yml -i ansible_inventory --ask-pass --ask-pass --ask-become-pass
Splunk
- Install Splunk
- Setup Splunk paths and config
export SPLUNK_HOME=/Applications/Splunk
export PATH=$SPLUNK_HOME/bin:$PATH
- Run the Splunk Little Helper application to start Splunk. You will need to update /Applications/Splunk/etc/splunk-launch.conf on MacOS X.
OPTIMISTIC_ABOUT_FILE_LOCKING = 1
Splunk Commands
- Remove all of the data
splunk clean eventdata