Metricbeat を install
Elasticsearchの公開鍵を取得
rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
Elasticのリポジトリ追加
cat << EOF > /etc/yum.repos.d/elastic.repo
[Elastic-6.x]
name=Elastic repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF
Metricbeatインストール
yum install -y metricbeat
Metricbeat の 初期設定
Kibana,ElasticsearchのURL設定
vi /etc/metricbeat/metricbeat.yml
# 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: "localhost:5601"
host: "{{Kibana Host}}:{{Port}}"
・・・・・・
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
#hosts: ["localhost:9200"]
hosts: ["{{Elasticsearch Host}}:{{Port}}"]
Metricbeat起動
systemctl enable metricbeat.service
systemctl start metricbeat.service
Kibana で 確認
Dashboard を 選択して「[Metricbeat System] Overview」を選択する。
Dashboard に [Metricbeat System]が無い場合は、Metricbeat を インストールしたサーバーで、次のコマンドを実行してください。
Metricbeatダッシュボード設定
metricbeat setup --dashboards