ELK Stack最新版本测试二配置篇_PHP教程
ELK Stack最新版本测试二配置篇
阅读本文前请浏览详细配置如下:
http://blog.chinaunix.net/uid-25057421-id-5567766.html
一,客户端
1,nginx日志格式
log_format logstash_json '{ "@timestamp": "$time_iso8601", '
'"host": "$server_addr", '
'"clientip": "$remote_addr", '
'"size": $body_bytes_sent, '
'"responsetime": $request_time, '
'"upstreamtime": "$upstream_response_time", '
'"upstreamhost": "$upstream_addr", '
'"http_host": "$host", '
'"url": "$uri", '
'"referrer": "$http_referer", '
'"xff": "$http_x_forwarded_for", '
'"agent": "$http_user_agent", '
'"status": "$status"} ';
access_log /data/wwwlogs/access_jerrymin.test.com.log logstash_json;
2,fielbeat配置文件
filebeat:
prospectors:
-
- /data/wwwlogs/access_jerrymin.test.com.log
doucmenttype:jerrymin.test.com
output:
logstash:
enabled: true
hosts: ["192.168.0.58:5044"]
shipper:
3,topbeat配置文件
input:
# In seconds, defines how often to read server statistics
period: 10
# Regular expression to match the processes that are monitored
# By default, all the processes are monitored
procs: [".*"]
# Statistics to collect (all enabled by default)
stats:
system: true
proc: true
filesystem: true
output:
### Elasticsearch as output
elasticsearch:
hosts: ["192.168.0.58:9200"]
shipper:
logging:
files:
rotateeverybytes: 10485760 # = 10MB
二,服务端配置
1,logstash配置文件
[root@localhost logstash]# cat /etc/logstash/conf.d/nginxconf.json
input {
beats {
port => 5044
codec => json
}
}
filter {
mutate {
split => [ "upstreamtime", "," ]
}
mutate {
convert => [ "upstreamtime", "float" ]
}
}
output {
elasticsearch {
hosts => "192.168.0.58:9200"
sniffing => true
manage_template => false
# index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
index => "filebeat-%{type}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"
}
}
2,elasticsearch配置文件
[root@localhost logstash]# cat /etc/elasticsearch/elasticsearch.yml |grep -Ev "^#|^$"
path.data: /data
path.logs: /data/elklogs
network.host: 192.168.0.58
http.port: 9200
3,kibana配置文件
[root@localhost config]# cat /var/kibana/config/kibana.yml
# Kibana is served by a back end server. This controls which port to use.
server.port: 5601
# The host to bind the server to.
server.host: "0.0.0.0"
# The Elasticsearch instance to use for all your queries.
elasticsearch.url: "http://192.168.0.58:9200"
三,Tengine反向代理配置
cat /usr/local/nginx/conf/vhosts_all/kibana.conf
server
{
listen 8888;
server_name 192.168.0.58
index index.html index.shtml;
location / {
proxy_pass http://localhost:5601;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
auth_basic "Please input Username and Password";
auth_basic_user_file /usr/local/nginx/conf/.pass_file;
}
access_log /data/wwwlogs/access.kibana.log access;
}
四,登陆平台
http://192.168.0.58:8888
1,创建索引

2,创建视图

3,创建面板


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

热门话题

最近几天,Ice Universe 不断披露有关 Galaxy S25 Ultra 的详细信息,人们普遍认为这款手机将是三星的下一款旗舰智能手机。除此之外,泄密者声称三星只计划升级一款相机

OnLeaks 现在与 Android Headlines 合作,首次展示了 Galaxy S25 Ultra,几天前,他试图从他的 X(以前的 Twitter)粉丝那里筹集到 4,000 美元以上的资金,但失败了。对于上下文,嵌入在 h 下面的渲染图像

除了发布两款新智能手机外,TCL 还发布了一款名为 NXTPAPER 14 的新 Android 平板电脑,其大屏幕尺寸是其卖点之一。 NXTPAPER 14 采用 TCL 标志性品牌哑光液晶面板 3.0 版本

最近几天,Ice Universe 不断披露有关 Galaxy S25 Ultra 的详细信息,人们普遍认为这款手机将是三星的下一款旗舰智能手机。除此之外,泄密者声称三星只计划升级一款相机

Vivo Y300 Pro刚刚全面亮相,它是最薄的中端Android手机之一,配备大电池。准确来说,这款智能手机的厚度仅为 7.69 毫米,但配备了 6,500 mAh 的电池。这与最近推出的容量相同

三星尚未就何时更新其 Fan Edition (FE) 智能手机系列提供任何提示。目前来看,Galaxy S23 FE 仍然是该公司的最新版本,于 2023 年 10 月年初推出。

Redmi Note 14 Pro Plus 现已正式成为去年 Redmi Note 13 Pro Plus 的直接后继产品(亚马逊售价 375 美元)。正如预期的那样,Redmi Note 14 Pro Plus与Redmi Note 14和Redmi Note 14 Pro一起成为Redmi Note 14系列的主角。李

摩托罗拉今年发布了无数设备,尽管其中只有两款是可折叠的。就上下文而言,虽然世界上大多数地区都收到了 Razr 50 和 Razr 50 Ultra,但摩托罗拉在北美提供了 Razr 2024 和 Razr 2
