Elasticsearch-6.7.0系列(五)5044端口 logstash安裝

centos7環境centos

下載logstashapp

wget https://artifacts.elastic.co/downloads/logstash/logstash-6.7.0.tar.gz          下載elasticsearch

logstash-sample.conf是默認配置文件,裏面的默認端口是5044centos7

tar -zxvf logstash-6.7.0.tar.gzspa

 ./bin/logstash -f demo-metrics-pipeline.conf      啓動Logstash,若是遇到如下錯誤,則把虛擬機的CPU內核數從1改成2便可。code

[root@192 logstash-6.7.0]# ./bin/logstash -f demo-metrics-pipeline.conf
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N

修改metric配置blog

安裝目錄/metricbeat-6.7.0-darwin-x86_64/metricbeat.yml配置文件,把output從elasticsearch改成logstash:ip

#-------------------------- Elasticsearch output ------------------------------
#output.elasticsearch:
  # Array of hosts to connect to.
  #hosts: ["localhost:9200"]
#----------------------------- Logstash output --------------------------------
output.logstash:
  # The Logstash hosts
  hosts: ["localhost:5044"]

service metricbeat stop          中止metric服務get

service metricbeat status          查看服務狀態虛擬機

 service metricbeat start          從新啓動服務

相關文章
相關標籤/搜索