Install Elasticsearch GeoIP and user agent plugins
bin/elasticsearch-plugin install ingest-geoip
bin/elasticsearch-plugin install ingest-user-agent
Download and install Filebeat
cd /home
curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-6.3.0-amd64.deb
sudo dpkg -i metricbeat-6.3.0-amd64.deb # DEB安装
curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-6.3.0-x86_64.rpm
sudo rpm -vi metricbeat-6.3.0-x86_64.rpm # rpm安装
vi /etc/metricbeat/metricbeat.yml
output.elasticsearch:
hosts: ["<es_url>"]
username: "elastic"
password: "<password>"
setup.kibana:
host: "<kibana_url>"
Enable and configure the module
sudo metricbeat modules enable apache # nginx logs
sudo metricbeat modules enable docker
sudo metricbeat modules enable kubernetes
sudo metricbeat modules enable nginx
sudo metricbeat modules enable redis
sudo metricbeat modules enable system
Start Metricbeat
sudo metricbeat setup
sudo service metricbeat start
签名:这个人很懒,什么也没有留下!