I don't see any indices created in amazon ES.
architecture filebeat-> logstash-> amazon ES.
- filebeat conf
filebeat.inputs:
- type: log
paths:
- /var/test.log
fields:
tags: test
environment: uflek
product: pxl
datacenter: aws
partition: uflek0
server_role: uflek-uflek-ppo-uflek0-dxl_hub
fields_under_root: true
filebeat.registry.path: '/var/lib/filebeat/.registry'
output.logstash:
hosts: ["logsrv.vision-uflek.local:5044"]
key: "uflek-ppo"
db: 0
db_topology: 1
timeout: 5
reconnect_interval: 1
shipper:
logging:
to_syslog: false
to_files: true
files:
path: /var/log/filebeat
name: filebeat.log
rotateeverybytes: 10485760 # = 10MB
keepfiles: 7
level: debug
There is no error in filebeat log
2021-01-25T16:35:38.636Z INFO [publisher] pipeline/retry.go:217 done
2021-01-25T16:35:38.637Z DEBUG [logstash] logstash/async.go:172 5 events out of 5 events sent to logstash host logsrv.mvision-uflek.local:5044. Continue sending
2021-01-25T16:35:38.637Z DEBUG [logstash] logstash/async.go:128 close connection
2021-01-25T16:35:38.637Z DEBUG [logstash] logstash/async.go:128 close connection
2021-01-25T16:35:38.637Z ERROR [logstash] logstash/async.go:280 Failed to publish events caused by: client is not connected
logstash conf
input {
beats {
port => 5044
}
}
output
{
if [fields][product] == "pxl"
{
amazon_es
{
hosts => ["https://test.es.amazonaws.com/"]
region => "us-east-1"
index => "%{[fields][server_role]}-%{+YYYY.MM.dd}"
document_id => "%{fingerprint}" # avoid duplications
}
}
stdout { codec => rubydebug }
}
[2021-01-25T16:04:02,609][INFO ][logstash.javapipeline ][main] Pipeline Java execution initialization time {"seconds"=>1.47}
[2021-01-25T16:04:02,636][INFO ][logstash.inputs.beats ][main] Starting input listener {:address=>"0.0.0.0:5044"}
[2021-01-25T16:04:02,663][INFO ][logstash.javapipeline ][main] Pipeline started {"pipeline.id"=>"main"}
[2021-01-25T16:04:02,834][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2021-01-25T16:04:02,893][INFO ][org.logstash.beats.Server][main][d2ccf63fb390d27e8a591220535b5a6601cb82de678e4bebe6d2acde54350022] Starting server on port: 5044
[2021-01-25T16:04:03,259][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600} ```
the output prints to console.
{
"@timestamp" => 2021-01-25T16:42:32.866Z,
"@version" => "1",
"input" => {
"type" => "log"
},
"tags" => [
[0] "beats_input_codec_plain_applied"
],
"host" => {
"name" => "ip-################"
},
"agent" => {
"ephemeral_id" => "601b382e-b08e-4820-8cf4-137fbead3918",
"id" => "93751d22-bcc0-4a18-9b7c-4bff3bd81413",
"name" => "ip-###############",
"type" => "filebeat",
"hostname" => "ip-###############",
"version" => "7.9.3"
},
"log" => {
"flags" => [
[0] "multiline"
],
"offset" => 18416319,
"file" => {
"path" => "/var/test.log"
}
},
"message" => "2021-01-25T16:42:24,246 INFO [http-nio-8080-exec-5] [] [] [/dxdxdxs/v1/status] [] AuditLogFilter \n [] - ResourceType is empty, not doing audit logging",
"fields" => {
"environment" => "uflek",
"product" => "pxl",
"datacenter" => "aws",
"tags" => "test"
},
"ecs" => {
"version" => "1.5.0"
}
}
please help