2

我对logstash很陌生,并且有点卡住如何做这部分。

我从 azure blob 容器中复制了日志,并且能够通过 logstash 进行解析并将记录放在我本地机器上的弹性搜索中。现在我想更改输入,而不是文件,而是直接从 azure blob 存储中获取日志。我寻找插件,但没有找到任何关于 azure 的东西。

我希望我可以在输入中做这样的事情。任何想法如何得到这个?

input {
  azureblob {
    storage_name => "abcd"
    storage_key => "key"
    container => "logLocation"
  }
}
4

2 回答 2

1

在玩耍并阅读了一堆东西之后,我让它在我的本地 Windows 机器上工作。

安装红宝石。安装 jruby。命令行 -> gem 安装包。

以上是构建宝石所必需的

然后我得到了这些文件。 https://github.com/juliusl/logstash-input-azurewadtable/tree/0.9.2

将 lib/logstash/inputs/azurewadtable.rb 替换为https://github.com/mspnp/semantic-logging/blob/elk/ELK/logstash-extension/inputs/azureblob.rb

将所有文件中的所有位置都替换为 azurewadtable 和 azureblob。

通过命令行 gem install "localtion_Of_gemSpec" 这将为您提供 gem 文件。

Logstash\bin\plugin install "location_of_gem_file" Logstash\bin\plugin install --no-verify

验证几件事:Logstash\gemfile 有这个条目,Logstash\vendor\local_gems 有文件

设置配置:

input {
  azureblob {
    storage_account_name => "STORAGE ACCOUNT NAME"
    storage_access_key => "STORAGE ACCESS KEY"
    container => "CONTAINER NAME"
  }

}

Logstash/bin/logstash -f "location_of_conf_File"

它有效:)

于 2015-09-21T16:46:39.783 回答
0

我在使用lostash-input-azureblob插件获取天蓝色日志并将它们发送到所需位置时遇到问题。在 github 上仍然存在同样的未解决问题:https
://github.com/Azure/azure-diagnostics-tools/issues/170我找到了一种解决方法,在最新版本 0.9.13 中缺少一些文件可以从 0.9.12 版本下载,详细说明请点击以下链接:
https ://github.com/Azure/azure-diagnostics-tools/issues/170#issuecomment-635286539

于 2020-05-28T11:53:31.460 回答