Hi ,
I have created a dockerfile for filebeat and configured yaml files to listen for nginx module input and forward it to logstach. But the issue is my filebeat harvester didn't detect the nginx log update and so its not trying to forward.
</>filebeat dockerfile
FROM docker.elastic.co/beats/filebeat:6.5.1
USER root
COPY filebeat.yml /usr/share/filebeat/filebeat.yml
RUN chmod go-w /usr/share/filebeat/filebeat.yml
USER filebeat
----End of dockerfile ------
</> filebeat.yml file
filebeat.modules:
module: nginx
access:
enabled: true
var.paths: ["/var/log/nginx/access.log*"]
output.logstash:
enabled: true
hosts: ["hostid:5044"]
Note: for logstash hostid will be replaced with actual ip address in my local and yml format and syntax is applied correctly.
-----------End of filebeat.yml-----------------
</> filebeat logs:
2018-12-04T04:15:40.378Z INFO [monitoring] log/log.go:144 Non-zero metrics in the last 30s {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":260,"time":{"ms":9}},"total":{"ticks":460,"time":{"ms":9},"value":460},"user":{"ticks":200}},"handles":{"limit":{"hard":1048576,"soft":1048576},"open":5},"info":{"ephemeral_id":"57e2c532-fed1-460d-a05f-b33cf5be09d4","uptime":{"ms":360411}},"memstats":{"gc_next":4194304,"memory_alloc":2729352,"memory_total":7576760}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":0}},"pipeline":{"clients":2,"events":{"active":0}}},"registrar":{"states":{"current":0}},"system":{"load":{"1":0.03,"15":0.05,"5":0.09,"norm":{"1":0.0038,"15":0.0063,"5":0.0113}}}}}}
2018-12-04T04:16:10.382Z INFO [monitoring] log/log.go:144 Non-zero metrics in the last 30s {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":290,"time":{"ms":22}},"total":{"ticks":490,"time":{"ms":22},"value":490},"user":{"ticks":200}},"handles":{"limit":{"hard":1048576,"soft":1048576},"open":5},"info":{"ephemeral_id":"57e2c532-fed1-460d-a05f-b33cf5be09d4","uptime":{"ms":390417}},"memstats":{"gc_next":4194304,"memory_alloc":1709176,"memory_total":7858320}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":0}},"pipeline":{"clients":2,"events":{"active":0}}},"registrar":{"states":{"current":0}},"system":{"load":{"1":0.02,"15":0.05,"5":0.08,"norm":{"1":0.0025,"15":0.0063,"5":0.01}}}}}}
2018-12-04T04:16:40.382Z INFO [monitoring] log/log.go:144 Non-zero metrics in the last 30s {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":300,"time":{"ms":14}},"total":{"ticks":500,"time":{"ms":14},"value":500},"user":{"ticks":200}},"handles":{"limit":{"hard":1048576,"soft":1048576},"open":5},"info":{"ephemeral_id":"57e2c532-fed1-460d-a05f-b33cf5be09d4","uptime":{"ms":420412}},"memstats":{"gc_next":4194304,"memory_alloc":2001024,"memory_total":8150168}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":0}},"pipeline":{"clients":2,"events":{"active":0}}},"registrar":{"states":{"current":0}},"system":{"load":{"1":0.01,"15":0.05,"5":0.07,"norm":{"1":0.0013,"15":0.0063,"5":0.0088}}}}}}
------------ End of filebeat logs------------------------------
Any feedback to make it work could be helpful..
Thanks in advancePreformatted text