curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.6.2-darwin-x86_64.tar.gz tar xzvf metricbeat-7.6.2-darwin-x86_64.tar.gz cd metricbeat-7.6.2-darwin-x86_64/
修改配置文件
修改 metricbeat.yml 设置连接信息:
es信息
1 2 3 4 5 6 7 8 9 10 11 12 13
#-------------------------- Elasticsearch output ------------------------------ output.elasticsearch: # Array of hosts to connect to. hosts: ["172.16.100.92:9200"]
# Protocol - either `http` (default) or `https`. protocol:"http"
# Authentication credentials - either API key or username/password. #api_key: "id:api_key" #username: "elastic" #password: "changeme"
# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API. # This requires a Kibana endpoint configuration. setup.kibana:
# Kibana Host # Scheme and port can be left out and will be set to the default (http and 5601) # In case you specify and additional path, the scheme is required: http://localhost:5601/path # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601 host:"172.16.100.92:5601"
# Kibana Space ID # ID of the Kibana Space into which the dashboards should be loaded. By default, # the Default Space will be used. #space.id:
公共信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#================================ General =====================================
# The name of the shipper that publishes the network data. It can be used to group # all the transactions sent by a single shipper in the web interface. name:172.16.100.92
# The tags of the shipper are included in their own field with each # transaction published. #tags: ["service-X", "web-tier"]
# Optional fields that you can specify to add additional information to the # output. #fields: # env: staging
# Module: system # Docs: https://www.elastic.co/guide/en/beats/metricbeat/7.6/metricbeat-module-system.html
-module:system period:10s metricsets: -cpu -load -memory -network -process -process_summary -socket_summary #- entropy #- core #- diskio #- socket #- service process.include_top_n: by_cpu:5# include top 5 processes by CPU by_memory:5# include top 5 processes by memory