elasticsearch Logstash弹性云401未授权错误
我的elasticsearch Logstash弹性云401未授权错误,elasticsearch,logstash,elastic-cloud,elasticsearch,Logstash,Elastic Cloud,我的logstash.yml看起来像: cloud.id: "Test:testkey" cloud.auth: "elastic:password" input{jdbc{...jdbc here... This works, as I see data in windows console}} output { stdout { codec => json_lines } elasticsearch { hosts => ["myserverur
logstash.yml
看起来像:
cloud.id: "Test:testkey"
cloud.auth: "elastic:password"
input{jdbc{...jdbc here... This works, as I see data in windows console}}
output {
stdout { codec => json_lines }
elasticsearch {
hosts => ["myserverurl:12345"]
index => "my_index"
# document_id => "%{brand}"
}
- pipeline.id: my_id
path.config: "./config/conf_file_name.conf"
pipeline.workers: 1
前面有两个空格,后面没有空格,在之内
这是我在logstash.yml中的全部内容,没有其他内容,
我得到:
[2018-08-29T12:33:52112][WARN][logstash.outputs.elasticsearch]试图恢复与已死亡ES实例的连接,但出现错误。{:url=>”https://myserverurl:12345/“,:error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError,:error=>”获取了响应代码“401”,正在URL处联系ElasticSearch”https://myserverurl:12345/“}
而my_config_file_name.conf
如下所示:
cloud.id: "Test:testkey"
cloud.auth: "elastic:password"
input{jdbc{...jdbc here... This works, as I see data in windows console}}
output {
stdout { codec => json_lines }
elasticsearch {
hosts => ["myserverurl:12345"]
index => "my_index"
# document_id => "%{brand}"
}
- pipeline.id: my_id
path.config: "./config/conf_file_name.conf"
pipeline.workers: 1
我所做的是在windowscmd
,
它从我在conf文件输入中配置的数据库加载数据,然后显示错误,我想将我的数据从MySQL
索引到云上的elasticsearch
,我花了14天的时间试用并创建了一个测试索引,用于学习,因为我后来不得不部署它。
我的管道看起来像:
cloud.id: "Test:testkey"
cloud.auth: "elastic:password"
input{jdbc{...jdbc here... This works, as I see data in windows console}}
output {
stdout { codec => json_lines }
elasticsearch {
hosts => ["myserverurl:12345"]
index => "my_index"
# document_id => "%{brand}"
}
- pipeline.id: my_id
path.config: "./config/conf_file_name.conf"
pipeline.workers: 1
如果日志不包含统计数据,我也可以提供它们。
基本上,我不想将我的MYSQL
数据与云上的ElasticSearch
同步(计划检查),即AWS
输出应为:
elasticsearch {
hosts => ["https://yourhost:yourport/"]
user => "elastic"
password => "password"
# protocol => https
# port => "yourport"
index => "test_index"
# document_id => "%{table_id}"
#
-表示注释
如所述:
部署应用程序时提供的文档不提供jdbc的配置,即使在设置文件(即logstash.yml)中定义,jdbc也需要用户和密码。我在我的开发环境中添加了相同的问题。在谷歌上搜索数小时后,我默认理解为,当您安装Logstash时,X-Pack已安装。文件中指出:
大宗报价
X-Pack是一个弹性堆栈扩展,提供安全性、警报、监视、机器学习、管道管理和许多其他功能
大宗报价
当我正在流式处理Elasticsearch时,我不需要在我的开发工具中运行x-pack,因此我必须在索引文件配置的输出中将ilm\u enabled设置为false来禁用它
output {
elasticsearch {
hosts => [.. ]
ilm_enabled => false
}
}
下面的链接可能会有所帮助