Skip to content

Instantly share code, notes, and snippets.

@pinge
Created July 25, 2016 06:52
Show Gist options
  • Save pinge/4cdc67c3d5520e72570228d21cc689e1 to your computer and use it in GitHub Desktop.
Save pinge/4cdc67c3d5520e72570228d21cc689e1 to your computer and use it in GitHub Desktop.

fluentd setup

system tweaks
  • sudo vim /etc/security/limits.conf (append to EOF)

root soft nofile 65536 root hard nofile 65536

  • soft nofile 65536
  • hard nofile 65536

- `sudo vim /etc/sysctl.conf`  (append to EOF)  
  

net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_tw_reuse = 1 net.ipv4.ip_local_port_range = 10240 65535


- `sudo reboot`

##### system dependencies

- os  
  

sudo apt-get -y install ntpdate python2.7 mongodb-server mongodb-dev python-pip


- ruby  

  ```sudo apt-add-repository ppa:brightbox/ruby-ng
  sudo apt-get update
sudo apt-get -y install ruby2.2 ruby2.2-dev
  • python

sudo pip install -U pip


- fluentd
  

curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-trusty-td-agent2.sh | sh sudo td-agent-gem install fluent-plugin-parser fluent-plugin-geoip fluent-plugin-multiprocess


##### fluentd multiprocessing setup

for i in $(seq -w $(cat /proc/cpuinfo | grep processor | wc -l)); do cp td-agent_child_optimized.conf.template td-agent_child$i.conf sed -i "s/240??/240${i}/g" td-agent_child$i.conf done


##### application dependencies

- aggregator.py
  

sudo pip install -U pip sudo pip install boto




#### influxdb setup



#### grafana setup

- install grafana  
  

echo -e "deb https://packagecloud.io/grafana/stable/debian/ wheezy main" | sudo tee -a /etc/apt/sources.list curl https://packagecloud.io/gpg.key | sudo apt-key add - sudo apt-get update sudo apt-get install grafana sudo service grafana-server restart

no upstart script available


- log into the admin dashboard at [http://localhost:3000](http://localhost:3000) with user and password `admin`
##### configuration

- http://docs.grafana.org/installation/debian/
- [http://docs.grafana.org/installation/configuration/](http://docs.grafana.org/installation/configuration/)
- http://docs.grafana.org/datasources/influxdb/




Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment