https://www.elastic.co/guide/en/beats/packetbeat/master/packetbeat-getting-started.html
https://artifacts.elastic.co/downloads/beats/packetbeat/packetbeat-5.3.2-linux-x86_64.tar.gz
tar -zxvf packetbeat-5.3.2-linux-x86_64.tar.gz
packetbeat.yml
sudo ./packetbeat -e -c packetbeat.yml
后台运行: nohup ./packetbeat -e -c packetbeat.yml > /var/log/packetbeat.log &
curl -H ‘Content-Type: application/json’ -XPUT ‘http://localhost:9200/_template/packetbeat’ -d@/server/packetbeat/packetbeat.template.json
如果之前安装过,可先卸载:
If you’ve already used Packetbeat to index data into Elasticsearch, the index may contain old documents. After you load the index template, you can delete the old documents from packetbeat-* to force Kibana to look at the newest documents. Use this command:
curl -XDELETE 'http://localhost:9200/packetbeat-*'
重启后,http包即包含request与response信息
参考字段配置文章,包含http、mongodb等信息: http://www.ttlsa.com/elk/elk-packetbeat-protocols-and-processes-configure-options/
在安装Packetbeat的目录下,找到导入面板的脚本,并运行。 运行后,可在Kibana中打开,查看预置面板http://127.0.0.1:5601
From the directory where you installed Packetbeat, run the import_dashboards script.
./scripts/import_dashboards