【问题标题】:Logstash Config File for IISIIS 的 Logstash 配置文件
【发布时间】:2014-10-16 10:16:54
【问题描述】:

我最近在 Windows 服务器上安装了 ELK 堆栈(如下:https://community.ulyaoth.net/threads/how-to-install-logstash-on-a-windows-server-with-kibana-in-iis.17/

我可以将 IIS 日志从服务器获取到 Logstash 和 Elasticsearch,但我无法从另一台服务器获取相同的日志。

这是我的第二台服务器上的 logstash 配置文件;

    input { 
    file {
        type    => "IISLog"
        path    => "C:/inetpub/logs/LogFiles/W3SVC*/*.log"
        }
    }

filter {
    mutate {
        add_field   => [ "hostip", "%{host}" ]
        }
    dns {
        reverse => [ "host" ]
        action  => replace
        }
    }

output {
    elasticsearch {
        host    => "ELK01v"
        port    => "9301"
        }
    }

但在 Kibana 中没有显示任何内容

在 Logstash 的 stderr.log 中,我可以看到以下内容;

Exception in thread ">output" org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [30s]
    at org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(org/elasticsearch/action/support/master/TransportMasterNodeOperationAction.java:180)
    at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(org/elasticsearch/cluster/service/InternalClusterService.java:492)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(java/lang/Thread.java:745)

这来自 stdout.log;

{:timestamp=>"2014-08-22T15:04:55.775000+0100", :message=>"Using milestone 2 input plugin 'file'. This plugin should be stable, but if you see strange behavior, please let us know! For more information on plugin milestones, see http://logstash.net/docs/1.4.2/plugin-milestones", :level=>:warn}
{:timestamp=>"2014-08-22T15:04:55.853000+0100", :message=>"Using milestone 2 filter plugin 'dns'. This plugin should be stable, but if you see strange behavior, please let us know! For more information on plugin milestones, see http://logstash.net/docs/1.4.2/plugin-milestones", :level=>:warn}
log4j, [2014-08-22T15:05:34.215]  WARN: org.elasticsearch.discovery: [logstash-WEB01v-3460-4038] waited for 30s and no initial state was set by the discovery
log4j, [2014-08-22T15:09:06.334]  WARN: org.elasticsearch.transport: [logstash-WEB01v-3460-4038] Transport response handler not found of id [240]

我已经确认我可以在端口 9301 上远程登录到 ELK01v,但我想不出还有什么可能导致这些错误。有没有 ELK 知识的人可以提供帮助?

谢谢

【问题讨论】:

    标签: windows iis logstash


    【解决方案1】:

    这表明它正在尝试加入您的集群,但由于某种原因无法加入(例如防火墙——当它加入集群时,双向通信)。最简单的解决方案是将protocol => http 添加到您的elasticsearch 输出中。这将起作用,因为您已经验证防火墙已朝该方向打开。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多