elk 分析 squid access 日志

 
更多

先配置 kibana 语言为中文

vim /opt/kibana/config/kibana.yml
修改配置
i18n.locale: “en”
改为
i18n.locale: “zh-CN”

下载安装 filebeat
cd /tmp/  && curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.1.0-amd64.deb && dpkg -i filebeat-8.1.0-amd64.deb

编辑
vim /etc/filebeat/filebeat.yml
大概 134行
output.elasticsearch:
    hosts: [“localhost:9200”]

大概 107行
setup.kibana:
    host: “localhost:5601”

下载

https://github.com/molu8bits/squid-filebeat-kibana

解压并执行下面步骤

cp -rp /var/lib/squid/squid-filebeat-kibana-master/filebeat/module/squid /usr/share/filebeat/module
cp /var/lib/squid/squid-filebeat-kibana-master/filebeat/etc/filebeat/modules.d/squid.yml.disabled /etc/filebeat/modules.d

chown root:root -R /usr/share/filebeat/module/squid/
chmod go-w /usr/share/filebeat/module/squid/access/manifest.yml

filebeat modules enable squid

vim /etc/filebeat/modules.d/squid.yml
/var/lib/squid/access.log

filebeat test config #用来测试配置文件是否正确
filebeat setup -e
service filebeat start

打赏

本文固定链接: https://www.cxy163.net/archives/1958 | 绝缘体

该日志由 绝缘体.. 于 2022年06月29日 发表在 首页 分类下,
原创文章转载请注明: elk 分析 squid access 日志 | 绝缘体

报歉!评论已关闭.