• logstash 数据库配置文件


    验证通过

    文件名:sqlserver.conf

    input {
    stdin {
    }
    jdbc {
    jdbc_connection_string => "jdbc:sqlserver://localhost:1433;databaseName=Test"
    # the user we wish to excute our statement as
    jdbc_user => "sa"
    jdbc_password => "123456"
    # the path to our downloaded jdbc driver
    jdbc_driver_library => "D:/elasticsearch/logstash-6.2.1/sqlserver/sqljdbc42.jar"
    # the name of the driver class for mysql
    jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    jdbc_paging_enabled => "true"
    jdbc_page_size => "50000"
    #要执行的sql文件
    #statement_filepath => "/conf/course.sql"
    statement => "select name,description,studymodel from dbo.xc_course"
    #定时配置
    schedule => "* * * * *"
    record_last_run => true
    last_run_metadata_path => "D:/elasticsearch/logstash-6.2.1/config/logstash_metadata"
    }
    }


    output {
    elasticsearch {
    #ESIP地址与端口
    #hosts => "localhost:9200"
    hosts => ["localhost:9200"]
    #ES索引名称(自己定义的)
    index => "xc_course"
    #自增ID编号
    document_type => "doc"
    template =>"D:/elasticsearch/logstash-6.2.1/config/xc_course_template.json"
    template_name =>"xc_course"
    template_overwrite =>"true"
    }
    }

    ----------------------------------------------------------------------------------------------------

    {
    "mappings" : {
    "xc_course" : {
    "_source" : {

    },
    "properties" : {

    "description" : {
    "type" : "text"
    },
    "name" : {
    "type" : "text"
    },
    "studymodel" : {
    "type" : "keyword"
    }
    }
    }
    },
    "order" : 0,
    "template" : "xc_course"
    }

  • 相关阅读:
    Vue之computed与watch的使用
    Vue之组件的生命周期
    Vue之过滤器的使用
    Vue之父子组件的通信
    Vue之组件的使用
    Vue之数据绑定
    Vue之指令系统
    20182316胡泊 课程总结
    20182316胡泊 《数据结构与面向对象程序设计》实验9报告
    20182316胡泊 第10周学习总结
  • 原文地址:https://www.cnblogs.com/zhoading/p/12570623.html
Copyright © 2020-2023  润新知