使用metricbeat监控system和nginx
下载并解压缩metricbeat
metricbeat.yml配置文件设置:
setup.kibana: host: "192.168.75.21:5601" output.elasticsearch: hosts: ["192.168.75.21:9200"]
查看metircbeat开启的模块:./metricbeat modules list
,发现默认开启监控的是system模块
可以通过文件./modules.d/system.yml
查看监控的详细信息等
拓展:
开启模块:./metricbeat modules enable 模块名
关闭模块:./metricbeat modules disenable 模块名
加载dashboards:./metricbeat setup
运行:./metricbeat -e
查看kibana面板:
监控nginx
开启模块:./metricbeat modules enable nginx
修改./modules.d/nginx.yml
文件
- module: nginx metricsets: - stubstatus period: 10s # Nginx hosts hosts: ["http://192.168.75.21"] # 根据实际情况修改 # Path to server status. Default server-status server_status_path: "server-status" # 根据实际情况修改,跟nginx.conf中相匹配 #username: "user" #password: "secret"
nginx.conf中关于stubstatus的配置:
http { ...... location /server-status { stub_status on; access_log /var/log/nginx/nginxstatus.log; } ...... }
再次加载dashboards:./metricbeat setup
关闭并重新运行:./metricbeat -e
浏览器查看nginx状态
查看kibana面板:
相关推荐
nginxs 2020-11-14
Guanjs0 2020-11-13
小木兮子 2020-11-11
yserver 2020-11-11
ssihc0 2020-11-11
windle 2020-11-10
HanksWang 2020-11-10
liuchen0 2020-11-10
Freshairx 2020-11-10
ccschan 2020-11-10
liwf 2020-11-10
Guanjs0 2020-11-09
AderStep 2020-11-09
zrtlin 2020-11-09
mqfcu 2020-11-10
windle 2020-10-29