Elastic Stack 5 : Install Metricbeat2017/05/11 |
Install Metricbeat that collectes metrics from System or Services.
For details, refer to the official site.
⇒ https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-modules.html |
|
[1] | Install Metricbeat. Configure Elasticsearch repository before it. |
[root@dlp ~]# yum -y install metricbeat
|
[2] | Configure basic settings and start Metricbeat. |
[root@dlp ~]#
vi /etc/metricbeat/metricbeat.yml # line 15: set items # comment-out/uncomment to enable/disable items metricsets: # CPU stats - cpu # System Load stats - load # Per CPU core stats #- core # IO stats #- diskio ..... ..... # line 72: specify output destination # by default, it set to Elasticsearch on localhost # if output to Logstash, comment out there lines and uncomment the line 82,84 output.elasticsearch: # Array of hosts to connect to. hosts: ["localhost:9200"] ..... ..... #output.logstash: # The Logstash hosts #hosts: ["localhost:5044"][root@dlp ~]# systemctl start metricbeat [root@dlp ~]# systemctl enable metricbeat
|
[3] | Make sure the data has been collected normally. |
# index list [root@dlp ~]# curl localhost:9200/_cat/indices?v health status index uuid pri rep docs.count docs.deleted store.size pri.store.size yellow open metricbeat-2017.05.12 YvHWPjbgS12e_oU5Ddi3rA 5 1 803 0 732.9kb 732.9kb yellow open sshd_fail-2017.05 owhoRGiwTWGdZaqKAMw66g 5 1 27 0 117.9kb 117.9kb yellow open .kibana FGjE6bGUTlioELtM_QynMQ 1 1 3 0 13.7kb 13.7kb # document list on the index [root@dlp ~]# curl localhost:9200/metricbeat-2017.05.12/_search?pretty { "took" : 19, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 1473, "max_score" : 1.0, "hits" : [ { "_index" : "metricbeat-2017.05.12", "_type" : "metricsets", ..... ..... |
[4] | If Kibana is running, it's possible to use import script to Dashboard. |
[root@dlp ~]# /usr/share/metricbeat/scripts/import_dashboards Create temporary directory /tmp/tmp488034547 Downloading https://artifacts.elastic.co/downloads/beats/beats-dashboards/beats-dashboards-5.4.0.zip Unzip archive /tmp/tmp488034547 Importing Kibana from /tmp/tmp488034547/beats-dashboards-5.4.0/filebeat Importing Kibana from /tmp/tmp488034547/beats-dashboards-5.4.0/heartbeat ..... ..... |
Sponsored Link |
|