Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
195 views
in Technique[技术] by (71.8m points)

filebeat7.9 配置输出到redis问题

最近在windows server上配置filebeat7.9 输出日志到redis,遇到了一些问题,filebeat好像能扫描到文件,但是不能输出到redis,求助是不是配置有问题,filebeat日志中看到这么一条:"pipeline":{"clients":1,"events":{"active":0,"filtered":10,"total":10}}}
测试过机器到redis服务的链接正常,能正常插入数据
完整配置:

###################### Filebeat Configuration Example #########################

# This file is an example configuration file highlighting only the most common
# options. The filebeat.reference.yml file from the same directory contains all the
# supported options with more comments. You can use it as a reference.
#
# You can find the full configuration reference here:
# https://www.elastic.co/guide/en/beats/filebeat/index.html

# For more available modules and options, please see the filebeat.reference.yml sample
# configuration file.

# ============================== Filebeat inputs ===============================

filebeat.inputs:

- type: log

  enabled: true

  paths:
    - 'D:1021*.log'

  multiline.pattern: '^[d{4}-d{2}'
  multiline.negate: true
  multiline.match: after
  fields:
      host: '10.101.118.5'
      app: 'ss'
      sublei: 'test'
  tail_files: true

filebeat.config.modules:
  path: ${path.config}modules.d*.yml

  reload.enabled: true


setup.template.settings:
  index.number_of_shards: 1

setup.kibana:


output.redis:
  hosts: '10.101.222.1:6379'
  db: 4
  timeout: 10
  key: 'test'


processors:
  - add_host_metadata:
      when.not.contains.tags: forwarded
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~

日志:

2020-09-03T16:48:35.018+0800    INFO    instance/beat.go:299    Setup Beat: filebeat; Version: 7.9.0
2020-09-03T16:48:35.019+0800    INFO    [publisher]    pipeline/module.go:113    Beat name: vmhlstbj
2020-09-03T16:48:35.024+0800    WARN    beater/filebeat.go:178    Filebeat is unable to load the Ingest Node pipelines for the configured modules because the Elasticsearch output is not configured/enabled. If you have already loaded the Ingest Node pipelines or are using Logstash pipelines, you can ignore this warning.
2020-09-03T16:48:35.024+0800    INFO    instance/beat.go:450    filebeat start running.
2020-09-03T16:48:35.024+0800    INFO    [monitoring]    log/log.go:118    Starting metrics logging every 30s
2020-09-03T16:48:35.051+0800    INFO    memlog/store.go:119    Loading data file of 'C:ProgramDatafilebeat
egistryfilebeat' succeeded. Active transaction id=57581
2020-09-03T16:48:35.713+0800    INFO    memlog/store.go:124    Finished loading transaction log file for 'C:ProgramDatafilebeat
egistryfilebeat'. Active transaction id=73894
2020-09-03T16:48:35.713+0800    WARN    beater/filebeat.go:381    Filebeat is unable to load the Ingest Node pipelines for the configured modules because the Elasticsearch output is not configured/enabled. If you have already loaded the Ingest Node pipelines or are using Logstash pipelines, you can ignore this warning.
2020-09-03T16:48:35.715+0800    INFO    [registrar]    registrar/registrar.go:108    States Loaded from registrar: 180
2020-09-03T16:48:35.715+0800    INFO    [crawler]    beater/crawler.go:71    Loading Inputs: 1
2020-09-03T16:48:35.800+0800    INFO    log/input.go:157    Configured paths: [D:18094HYL_Log1021*.log]
2020-09-03T16:48:35.801+0800    INFO    [crawler]    beater/crawler.go:141    Starting input (ID: 12442600126418161029)
2020-09-03T16:48:35.801+0800    INFO    [crawler]    beater/crawler.go:108    Loading and starting Inputs completed. Enabled inputs: 1
2020-09-03T16:48:35.802+0800    INFO    cfgfile/reload.go:164    Config reloader started
2020-09-03T16:48:35.808+0800    INFO    cfgfile/reload.go:224    Loading of config files completed.
2020-09-03T16:49:05.026+0800    INFO    [monitoring]    log/log.go:145    Non-zero metrics in the last 30s    {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":249,"time":{"ms":249}},"total":{"ticks":1138,"time":{"ms":1138},"value":1138},"user":{"ticks":889,"time":{"ms":889}}},"handles":{"open":154},"info":{"ephemeral_id":"5b3b2fb5-cab5-4b04-a7f8-8fb3bb7f9fd7","uptime":{"ms":32502}},"memstats":{"gc_next":17500592,"memory_alloc":9886080,"memory_total":87775848,"rss":49606656},"runtime":{"goroutines":24}},"filebeat":{"events":{"added":10,"done":10},"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":0},"reloads":1,"scans":1},"output":{"type":"redis"},"pipeline":{"clients":1,"events":{"active":0,"filtered":10,"total":10}}},"registrar":{"states":{"current":180,"update":10},"writes":{"success":10,"total":10}},"system":{"cpu":{"cores":4}}}}}
2020-09-03T16:49:35.026+0800    INFO    [monitoring]    log/log.go:145    Non-zero metrics in the last 30s    {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":249},"total":{"ticks":1153,"time":{"ms":15},"value":1153},"user":{"ticks":904,"time":{"ms":15}}},"handles":{"open":152},"info":{"ephemeral_id":"5b3b2fb5-cab5-4b04-a7f8-8fb3bb7f9fd7","uptime":{"ms":62502}},"memstats":{"gc_next":17500592,"memory_alloc":10128512,"memory_total":88018280,"rss":53248},"runtime":{"goroutines":24}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":0}},"pipeline":{"clients":1,"events":{"active":0}}},"registrar":{"states":{"current":180}}}}}
2020-09-03T16:50:05.025+0800    INFO    [monitoring]    log/log.go:145    Non-zero metrics in the last 30s    {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":265,"time":{"ms":16}},"total":{"ticks":1169,"time":{"ms":16},"value":1169},"user":{"ticks":904}},"handles":{"open":150},"info":{"ephemeral_id":"5b3b2fb5-cab5-4b04-a7f8-8fb3bb7f9fd7","uptime":{"ms":92502}},"memstats":{"gc_next":17500592,"memory_alloc":10354480,"memory_total":88244248},"runtime":{"goroutines":24}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":0}},"pipeline":{"clients":1,"events":{"active":0}}},"registrar":{"states":{"current":180}}}}}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...