zoukankan      html  css  js  c++  java
  • centos &ubuntu 安装filebeat

    先贴一下官方文档

    https://www.elastic.co/guide/en/beats/filebeat/6.6/filebeat-installation.html

    我本次使用rpm的方式安装,与官方文档略有差异,记录如下:

     centos安装

    //官方是使用curl命令:curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.6.1-x86_64.rpm
    //但是我所用的服务器可能做了限制(报curl: (35) SSL connect error),我使用wget代替,下载到服务器上,如下
    wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.6.1-x86_64.rpm
    sudo rpm -vi filebeat-6.6.1-x86_64.rpm

    ubuntu安装

    wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.2.0-amd64.deb
    sudo dpkg -i filebeat-7.2.0-amd64.deb

    配置input

      安装成功之后,配置文件的路经在/etc/filebeat/filebeat.yml,直接使用vimfilebeat.inputs:

    # Each - is an input. Most options can be set at the input level, so
    # you can use different inputs for various configurations.
    # Below are the input specific configurations.
    
    - type: log
     # 默认为false,需要把enabled改为true
      # Change to true to enable this input configuration.
      enabled: true
    
      # Paths that should be crawled and fetched. Glob based paths.
      paths:
      # 日志文件所在目录
    - /var/log/*.log
    #- D:datalogs*

    配置output.elasticsearch

    output.elasticsearch:
      # Array of hosts to connect to.
     # 输出至目的elasticsearch hosts: [
    "localhost:9200"]

    重启filebeat

     service filebeat restart
  • 相关阅读:
    xStream完美转换XML、JSON
    遍历Map的四种方法(转)
    MyEclipse下的svn使用(转)
    tomcat部署,tomcat三种部署项目的方法
    Linux常用命令大全
    MAP
    (转)数据库索引作用 优缺点
    MySql 总结
    python中easygui的安装方法
    python中easygui的安装方法
  • 原文地址:https://www.cnblogs.com/lixyu/p/10489758.html
Copyright © 2011-2022 走看看