Hi. Filebeat can grab logs via the prospectors and send to Logstash then to Elasticsearch no problem but when I change the filebeat.yml to send directly to Elasticsearch I am not getting any output.
Can anybody shed some light on what else I can look at to get this working.. Hate to send logs through Logstash for nothing when they can just go directly to Elasticsearch.
Thanks.
This is how I have my filebeat setup:
> #-------------------------- Elasticsearch output ------------------------------
> output.elasticsearch:
> # Array of hosts to connect to.
> hosts: ["kib01:9200","kib02:9200"]
>
> # Optional protocol and basic auth credentials.
> #protocol: "https"
> #username: "elastic"
> #password: "changeme"
And these are what the logs say (I have enabled some debugging to assist):
/var/log/filebeat/filebeat.
2018-03-11T10:37:25.579+1100 INFO instance/beat.go:468 Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]
2018-03-11T10:37:25.580+1100 DEBUG [beat] instance/beat.go:495 Beat metadata path: /var/lib/filebeat/meta.json
2018-03-11T10:37:25.580+1100 INFO instance/beat.go:475 Beat UUID: b297f577-de30-410e-93dd-14ad8e15230e
2018-03-11T10:37:25.580+1100 INFO instance/beat.go:213 Setup Beat: filebeat; Version: 6.2.2
2018-03-11T10:37:25.580+1100 DEBUG [beat] instance/beat.go:230 Initializing output plugins
2018-03-11T10:37:25.580+1100 DEBUG [processors] processors/processor.go:49 Processors:
2018-03-11T10:37:25.580+1100 INFO elasticsearch/client.go:145 Elasticsearch url: http://kib01:9200
2018-03-11T10:37:25.580+1100 INFO elasticsearch/client.go:145 Elasticsearch url: http://kib02:9200
2018-03-11T10:37:25.580+1100 INFO pipeline/module.go:76 Beat name: els01
2018-03-11T10:37:25.580+1100 INFO instance/beat.go:301 filebeat start running.
2018-03-11T10:37:25.580+1100 INFO [monitoring] log/log.go:97 Starting metrics logging every 30s
2018-03-11T10:37:25.580+1100 DEBUG [registrar] registrar/registrar.go:88 Registry file set to: /var/lib/filebeat/registry
2018-03-11T10:37:25.580+1100 INFO registrar/registrar.go:108 Loading registrar data from /var/lib/filebeat/registry
2018-03-11T10:37:25.580+1100 INFO registrar/registrar.go:119 States Loaded from registrar: 31
2018-03-11T10:37:25.580+1100 INFO crawler/crawler.go:48 Loading Prospectors: 1
2018-03-11T10:37:25.581+1100 DEBUG [processors] processors/processor.go:49 Processors:
2018-03-11T10:37:25.581+1100 DEBUG [prospector] log/config.go:178 recursive glob enabled
2018-03-11T10:37:25.581+1100 DEBUG [prospector] log/prospector.go:120 exclude_files: []. Number of stats: 31
2018-03-11T10:37:25.581+1100 DEBUG [prospector] file/state.go:82 New state added for /var/log/vmware-install.log
2018-03-11T10:37:25.581+1100 DEBUG [registrar] registrar/registrar.go:150 Starting Registrar
2018-03-11T10:37:25.581+1100 DEBUG [registrar] registrar/registrar.go:200 Processing 1 events
2018-03-11T10:37:25.581+1100 DEBUG [registrar] registrar/registrar.go:193 Registrar states cleaned up. Before: 31, After: 31
2018-03-11T10:37:25.581+1100 DEBUG [registrar] registrar/registrar.go:228 Write registry file: /var/lib/filebeat/registry
2018-03-11T10:37:25.581+1100 DEBUG [prospector] file/state.go:82 New state added for /var/log/fontconfig.log