Metricbeat快速安装启动使用
本次使用的是tar包安装
1.获取tar包
wget https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-6.3.1-linux-x86_64.tar.gz
2.解压到指定目录/opt下
tar -zxvf metricbeat/metricbeat-6.3.1-linux-x86_64.tar.gz -C /opt
3.配置启动运行
配置metricbeat.yml:vim metricbeat.yml
启动运行
./metricbeat run
./metricbeat modules enable system
4.打开Kibana的Timelion
.es(index=metricbeat-*,timefield='@timestamp', metric='avg:system.cpu.user.pct')
.label('current hour').lines(fill=0.6,width=0.9)
5.更复杂的结构
.es(offset=-1h,index=metricbeat-*,timefield='@timestamp', metric='avg:system.cpu.user.pct') .label('last hour').lines(fill=0.6,width=0.9).color(gray),
.es(index=metricbeat-*,timefield='@timestamp', metric='avg:system.cpu.user.pct') .label('current hour').title('CPU usage overtime').color(#1E90FF).hide(hide=false).yaxis(yaxis=1,min=0.02,position=rigth).yaxis(yaxis=2,position=left)
.title("cpu").legend(columns=2,position=nw,showTime=true)