Update code as below, now i dont get error and new index is created based on field.type. But now the first file is not getting pushed. below is msg i get in log file
In log file i get this msg:
No output is defined to store the topology. The server fields might not be filled.
updated code:
#=========================== Filebeat prospectors =============================
filebeat.prospectors:
- input_type: log
json.keys_under_root: true
json.add_error_key: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
#- /var/log/*.log
#- c:\programdata\elasticsearch\logs\*
#- C:\temp\sunny\*
#- C:\temp\DK\*
#- C:\temp\WW\*
#- C:\temp\NW\*
#- C:\temp\HS\*
- C:\TestRail\TestRailResults.json
#document_type: TestRailResults
- C:\TestRail\TestRailResults1.json
fields:
type: "TestRailResults1"
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
# Optional protocol and basic auth credentials.
index: "sunny_try"
indices:
- index: "testrail"
when.equals:
fields.type: "TestRailResults1"