Metricbeat的部署流程备忘录

Metricbeat導入的步骤备忘录

公式文档

下载存档

$ curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.9.1-linux-x86_64.tar.gz

解压缩存档

$ tar xzvf metricbeat-7.9.1-linux-x86_64.tar.gz

编辑设置文件

$ diff metricbeat.yml metricbeat.yml.org 
67c67
<   host: "localhost:5601"
---
>   #host: "localhost:5601"

选择监视服务

$ ./metricbeat modules list
Enabled:
system

Disabled:
activemq
aerospike
apache
appsearch
aws
azure
beat
beat-xpack
ceph
ceph-mgr
cloudfoundry
cockroachdb
consul
coredns
couchbase
couchdb
docker
dropwizard
elasticsearch
elasticsearch-xpack
envoyproxy
etcd
golang
googlecloud
graphite
haproxy
http
ibmmq
iis
istio
jolokia
kafka
kibana
kibana-xpack
kubernetes
kvm
linux
logstash
logstash-xpack
memcached
mongodb
mssql
munin
mysql
nats
nginx
openmetrics
oracle
php_fpm
postgresql
prometheus
rabbitmq
redis
redisenterprise
sql
stan
statsd
tomcat
traefik
uwsgi
vsphere
windows
zookeeper
$ ./metricbeat modules enable nginx logstash kibana elasticsearch docker 
Enabled nginx
Enabled logstash
Enabled kibana
Enabled elasticsearch
Enabled docker
$ ./metricbeat modules list
Enabled:
docker
elasticsearch
kibana
logstash
nginx
system

Disabled:
activemq
aerospike
apache
appsearch
aws
azure
beat
beat-xpack
ceph
ceph-mgr
cloudfoundry
cockroachdb
consul
coredns
couchbase
couchdb
dropwizard
elasticsearch-xpack
envoyproxy
etcd
golang
googlecloud
graphite
haproxy
http
ibmmq
iis
istio
jolokia
kafka
kibana-xpack
kubernetes
kvm
linux
logstash-xpack
memcached
mongodb
mssql
munin
mysql
nats
openmetrics
oracle
php_fpm
postgresql
prometheus
rabbitmq
redis
redisenterprise
sql
stan
statsd
tomcat
traefik
uwsgi
vsphere
windows
zookeeper

安装

$ ./metricbeat setup -e

启动

$ vi start.sh
$ cat start.sh 
#!/usr/bin/bash
./metricbeat -e > /dev/null 2>&1 &

$ chmod 755 start.sh 
$ ./start.sh 

确认动作

mHqk2pY.png
广告
将在 10 秒后关闭
bannerAds