1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Metricbeatの設定(Elasticsearch、Kibana)

Last updated at Posted at 2018-03-12

Metricbeatのインストールと設定を行ったので、備忘のため簡単に残しておきます。
今回は、AWSのElasticsearchを使用しました。

###■動作環境
・RHEL(6.6, 7.4)
・AWS Elasticsearch

###■インストール

curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-6.2.2-x86_64.rpm

rpm -vi metricbeat-6.2.2-x86_64.rpm

###■基本設定

vi /etc/metricbeat/metricbeat.yml

metricbeat.yml

~~~(中略)~~~

#============================== Kibana =====================================

# 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: "localhost:5601"
  host: "<KibanaのURL>:443/_plugin/kibana/"

~~~(中略)~~~

#================================ Outputs =====================================

# Configure what output to use when sending the data collected by the beat.

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["<Elasticsearchのエンドポイント>:443"]

~~~(中略)~~~

###■module

ls /etc/metricbeat/modules.d/

※有効 / 無効で末尾の識別子が異なる。
【有効】system.yml
【無効】system.yml.disable
(デフォルトはsystemのみ有効)

###■無効化 / 有効化
・無効化

metricbeat modules disable system

metricbeat modules list

・有効化

metricbeat modules enable system

metricbeat modules list

###■起動 / 停止
・REHL6

/etc/init.d/metricbeat start

/etc/init.d/metricbeat stop

・REHL7

systemctl start metricbeat

systemctl stop metricbeat

###■ログ確認

less /var/log/metricbeat/metricbeat

###■参考
・「Metricbeat Reference [6.2] - Step 1: Install Metricbeat」
https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-installation.html

・「Metricbeatを使ってみる - Kibanaを立ててみた」
http://atsuizo.hatenadiary.jp/entry/2017/08/02/090000

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?