一、Metricbeat 简介
Metricbeat由模块和度量集组成。Metricbeat 模块定义了从特定服务(如Redis,Mysql等)收集数据的基本逻辑。该模块指定有关服务的详细信息,包括如何连接,收集指标的频率以及要收集的指标。
安装下载
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update && sudo apt-get install metricbeat
配置启动
cat /etc/metricbeat/metricbeat.yml |grep -vE "^#|^$"
metricbeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
# Set to true to enable config reloading
reload.enabled: false
# Period on which files under path should be checked for changes
#reload.period: 10s
setup.template.settings:
index.number_of_shards: 1
index.codec: best_compression
#_source.en