Unable to delete the document in the elasticserach using logstash action

Hello there,

I am using elasticsearch 7.6.2 version on a single node windows machine. i am trying to delete documents from elastic search using logstash.

delete.csv:
272586
logstash configuration file:

input{
stdin
{
codec => plain { charset=>"UTF-8" }
}
file {
path => "D:/E-drive/Softwares/logstash-7.6.2/config/delete.csv"
start_position => "beginning"
sincedb_path => "null"
}
}

filter {
csv {
columns => ["strategyId"]
separator => ","
}
}

output {
stdout {
codec => json_lines
}
elasticsearch {
hosts => "http://localhost:9200"
index => "data"
document_type => "strategy"
action => "delete"
document_id => "%{strategyId}"
}
}

record doesn't get Deleted from Elasticserach.
[2020-08-28T16:23:44,681][DEBUG][logstash.filters.csv ][main] Event after csv filter {:event=>#LogStash::Event:0x3b92483f}
{"path":"D:/E-drive/Softwares/logstash-7.6.2/config/delete.csv","@timestamp":"2020-08-28T10:53:44.432Z","message":"272586\r","@version":"1","host":"BG3WS0276","strategyId":"272586"}
[2020-08-28T16:23:44,898][DEBUG][logstash.instrument.periodicpoller.cgroup] One or more required cgroup files or directories not found: /proc/self/cgroup, /sys/fs/cgroup/cpuacct, /sys/fs/cgroup/cpu
[2020-08-28T16:23:44,998][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ParNew"}
[2020-08-28T16:23:44,998][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ConcurrentMarkSweep"}

Please let me know any issue in my configuration file

If you delete the document_type option on the output does that make any difference?

index is created with strategy type. If i don't specify the document type it defaults to _doc. then i would get index not found. I am using logstash 7.6.2 version.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.