amazon-web-services - 如何将logstash与opensearch集成到logstash-output-opensearch
问题描述
我正在使用 logstash 和 AWS OpenSearch。我已经sudo apt-get install logstash
在我的 logstash 服务器中安装了 logstash ( )。我已经创建了输入和输出文件。
Error
{ action=>LogStash::PipelineAction::Create/pipeline_id:main, exception=>"LogStash::PluginLoadingError", message=>"Couldn't find any output plugin named "opensearch"}
input {
file {
path => "/dev/**/*"
exclude => [ "access_log", "error_log" ]
ignore_older => "2 d"
start_position => "beginning"
tags =>["dev"]
}
file {
path => "/prod/**/*"
exclude => [ "access_log", "error_log" ]
ignore_older => "2 d"
start_position => "beginning"
tags =>["prod"]
}
}
output {
if "dev" in [tags]{
opensearch {
hosts => ["domainname"]
index => "dev--%{+xxxx.ww}"
region => "myregion"
user => "****"
password => "****"
max_bulk_bytes => 9999999
}
}
if "prod" in [tags]{
opensearch {
hosts => ["domain"]
index => "dev--%{+xxxx.ww}"
region => "myregion"
user => "****"
password => "****"
max_bulk_bytes => 9999999
}
}
}`
``
解决方案
使用来自https://opensearch.org/downloads.html的 Logstash OSS ,而不是来自elastic.co
:
curl https://artifacts.opensearch.org/logstash/logstash-oss-with-opensearch-output-plugin-7.16.2-linux-x64.tar.gz -o logstash-oss-with-opensearch-output-plugin-7.16.2-linux-x64.tar.gz
tar -zxvf logstash-oss-with-opensearch-output-plugin-7.16.2-linux-x64.tar.gz
run logstash from ~/logstash-7.16.2/bin
推荐阅读
- python - 将矢量化函数应用于 PyTorch 中两个范围的笛卡尔积
- kubernetes - Prometheus & cadvisor & k8s / 带有空值的“图像”标签
- google-cloud-platform - 如何将“user_data_mapper”参数传递给光束管道的 WriteToSnowflake 函数?
- elasticsearch - 当我使用旧版本的 Kibana 时,任何将 kibana 自动快照创建到 GCP 存储的最佳方法
- android - 如何以编程方式动态创建 Android Switch
- firebird - Firebird SQL 过程可以知道调用它的父过程/触发器吗?
- conv-neural-network - 用多边形标记图像比正方形更好吗?
- vue.js - v-mask 无法与 veutifyjs 输入一起正常工作
- terraform - 有什么方法可以遍历 Terraform 中的所有变量吗?
- android - 在nestedscrollview中滚动多个水平回收器视图,它们之间带有视图分隔符