I am new to ELK and I just installed ELK Stack 6.4.2. I am trying to send windows Events to ELK.
I installed Elasticsearch and Kibana and then Logstash. I installed winlogbeat in a windows server and configured to send the events to logstash but logstash not sending the events to elasticsearch. Logstash log file showing this error,
[2018-10-04T00:28:02,495][ERROR][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"%{host}-%{[beat.version]}-%{+yyyy.MM.dd}-2018.10.04", :_type=>"doc", :_routing=>nil}, #LogStash::Event:0x106e99], :response=>{"index"=>{"_index"=>"%{host}-%{[beat.version]}-%{+yyyy.MM.dd}-2018.10.04", "_type"=>"doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"invalid_index_name_exception", "reason"=>"Invalid index name [%{host}-%{[beat.version]}-%{+yyyy.MM.dd}-2018.10.04], must be lowercase", "index_uuid"=>"na", "index"=>"%{host}-%{[beat.version]}-%{+yyyy.MM.dd}-2018.10.04"}}}}
Was that error generated based on a different config? The error message complains that %{host}-%{[beat.version]}-%{+yyyy.MM.dd}-2018.10.04 is not a valid index name, and this does not match the configuration you provided.
winlogbeat.event_logs:
#- name: Application
#ignore_older: 72h
#- name: Security
- name: System
output.logstash:
# Boolean flag to enable or disable the output module.
enabled: true
# The Logstash hosts
hosts: ["172.20.11.19:5044"]
index: '172.20.11.16-%{[beat.version]}-%{+yyyy.MM.dd}'
# Set to false to disable template loading.
setup.template.enabled: true
# Template name. By default the template name is "winlogbeat-%{[beat.version]}"
# The template name and pattern has to be set in case the elasticsearch index pattern is modified.
setup.template.name: "172.20.11.16-%{[beat.version]}"
# Template pattern. By default the template pattern is "-%{[beat.version]}-*" to apply to the default index settings.
# The first part is the version of the beat and then -* is used to match all daily indices.
# The template name and pattern has to be set in case the elasticsearch index pattern is modified.
setup.template.pattern: "172.20.11.16-%{[beat.version]}-*"
setup.template.settings:
# A dictionary of settings to place into the settings.index dictionary
# of the Elasticsearch template. For more details, please check
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html
index:
number_of_shards: 3
#codec: best_compression
#number_of_routing_shards: 30
setup.template.settings:
# A dictionary of settings to place into the settings.index dictionary
# of the Elasticsearch template. For more details, please check
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html
index:
number_of_shards: 3
#codec: best_compression
#number_of_routing_shards: 30
# files.
logging.to_files: true
logging.files:
logging.level: debug
# Configure the path where the logs are written. The default is the logs directory
# under the home path (the binary location).
path: C:/ProgramData/winlogbeat/Logs
when i was editing winlogbeat.yml I entered %{host}-%{[beat.version]}-%{+yyyy.MM.dd} as index name and then i got error starting winlogbeat service then i changed it to %{host}-%{[beat.version]}-%{+yyyy.MM.dd} and start the service.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.