Hi,
I'm having trouble to send Winlogbeat index in Elasticsearch.
I tried to do it from the config file
In winlogbeat.yml :
output.elasticsearch:
hosts: ["172.25.3.18:9200"]
template.name: "winlogbeat"
#template.path:"winlogbeat.template.json"
dashboards.enabled: true
index: "winlogbeat"
(I had to comment the line "template.path: winlogbeat.template.json" because it gave me an error on this line when I tried to turn on Winlogbeat)
I also tried to upload the index manually :
curl -u user:pass -X PUT 'http://172.25.3.18:9200/_template/winlogbeat?pretty' @/path/to/conf/file but it returns this error :
{
"error" : {
"root_cause" : [
{
"type" : "parse_exception",
"reason" : "Failed to parse content to map"
}
],
"type" : "parse_exception",
"reason" : "Failed to parse content to map",
"caused_by" : {
"type" : "json_parse_exception",
"reason" : "Unexpected end-of-input within/between Object entries\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@714b28c2; line: 1, column: 16141]"
}
},
"status" : 400
}
I'm running Elasticsearch with Docker.
My elasticsearch config :
elasticsearch:
image: 08794661d6b0
container_name: elk5_elasticsearch
hostname: elasticsearch
ports:
- 9200:9200
- 9300:9300
environment:
- cluster.name=docker-elk5
- node.name=elk5
- bootstrap.memory_lock=true
- network.host=172.25.3.18
- network.bind_host=0.0.0.0
- transport.tcp.port=9300-9400
- transport.host=172.25.3.18
- transport.bind_host=0.0.0.0
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
- discovery.zen.ping.unicast.hosts=172.25.3.18:9300
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
mem_limit: 5g
cap_add:
- IPC_LOCK
volumes:
- elastic:/etc/elasticsearch
- /opt/docker/elasticdata/docker-el5:/usr/share/elk5/data
restart: on-failure
My Winlogbeat config :
#======================= Winlogbeat specific options ==========================`
# event_logs specifies a list of event logs to monitor as well as any
# accompanying options. The YAML data type of event_logs is a list of
# dictionaries.
#
# The supported keys are name (required), tags, fields, fields_under_root,
# forwarded, ignore_older, level, event_id, provider, and include_xml. Please
# visit the documentation for the complete details of each option.
# https://go.es.io/WinlogbeatConfig
winlogbeat.event_logs:
- name: Application
ignore_older: 72h
- name: Security
- name: System
#================================ General =====================================
# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:
# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]
# Optional fields that you can specify to add additional information to the
# output.
#fields:
# env: staging
#================================ Outputs =====================================
# Configure what outputs to use when sending the data collected by the beat.
# Multiple outputs may be used.
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["172.25.3.18:9200"]
template.name: "winlogbeat"
#template.path:"winlogbeat.template.json"
dashboards.enabled: true
index: "winlogbeat"
# Optional protocol and basic auth credentials.
#protocol: "https"
username: "user"
password: "pass"
#----------------------------- Logstash output --------------------------------
#output.logstash:
# The Logstash hosts
#hosts: ["localhost:5044"]
# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"
# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"
#================================ Logging =====================================
# Sets log level. The default log level is info.
# Available log levels are: critical, error, warning, info, debug
logging.level: info
# At debug level, you can selectively enable logging only for some components.
# To enable all selectors use ["*"]. Examples of other selectors are "beat",
# "publish", "service".
#logging.selectors: ["*"]
The weirdest thing is that I can see "winlogbeat-*" in the index patterns in Kibana, but I can't see Winlogbeat index when I run :
curl -u user:pass http://172.25.3.18:9200/_cat/indices
yellow open .monitoring-logstash-2-2017.06.07 PeEydERRQ5Gv2Dhz3NPxOA 1 1 936 0 285.2kb 285.2kb
yellow open .triggered_watches I9U9E9dRRjaXbGk3C687AA 1 1 0 0 32.1kb 32.1kb
yellow open .monitoring-alerts-2 hDhH-oYIR9KmGNN_JD0wmQ 1 1 1 0 6.5kb 6.5kb
yellow open .monitoring-es-2-2017.06.07 aBvRJ9nYRE2jlfGxiaDHsw 1 1 14213 108 7.1mb 7.1mb
yellow open .monitoring-kibana-2-2017.06.07 ObcYgENoSpiCNLd5lXNcYg 1 1 937 0 347.5kb 347.5kb
yellow open .watches IhjiyZOZQuCV_fmo-IPUUw 1 1 4 0 11.7kb 11.7kb
yellow open .watcher-history-3-2017.06.07 J-H5-FQsQs6ZF1mw-Lo3hQ 1 1 780 0 829.3kb 829.3kb
yellow open .monitoring-data-2 S77fdDltT_Ond0Bdsqnh8g 1 1 4 0 10.2kb 10.2kb
yellow open .kibana vXNkATasRIyx29Fx5lzQyg 1 1 8 0 19.8kb 19.8kb
Has anyone ever seen that?
Thank you