elasticsearch Filebeat Cisco Module for Nexus在阅读配置文件时出错

hc2pp10m  于 12个月前  发布在  ElasticSearch
关注(0)|答案(1)|浏览(97)

我试图从一个nexus交换机设置系统日志,以馈送到Filebeat的Cisco模块,然后馈送到Elasticsearch。我倾向于在启用Cisco模块并从powershell ./filebeat.exe setup -e运行此模块后得到相同的错误消息。Elasticsearch、Kibana和Filebeat的版本都是8.9.0。
Filebeat能够连接到Elasticsearch,但这里是我不断得到的错误,似乎终止了Filebeat服务:

{"log.level":"error","@timestamp":"2023-09-26T09:56:05.655-0700","log.origin":

{"file.name":"cfgfile/reload.go","file.line":270},"message":"Error loading config from file 'C:\Program 

Files\Filebeat-8.9.0-CISCO\modules.d\cisco.yml', **error invalid config: yaml: line 102: did not find expected 

key","service.name":"filebeat","ecs.version":"1.6.0"}**

下面是modules.d文件夹中的cisco.yml文件:

Starts on line 99.

  nexus:
     enabled: true

# Set which input to use between udp (default), tcp or file.  
 var.input: udp
 var.syslog_host: 10.0.0.83
 var.syslog_port: 9004

# Set paths for the log files when file input is used.
# var.paths:

# Toggle output of non-ECS fields (default true).
# var.rsa_fields: true

# Set custom timezone offset.
# "local" (default) for system timezone.
# "+02:00" for GMT+02:00
# var.tz_offset: local`

第102行是“设置在udp、tcp或file之间使用哪个输入”。已确认数据正在发送,但当我在启用Cisco模块的情况下启动Filebeat服务时,Filebeat服务启动了几秒钟,然后停止。当我关闭Cisco模块并启动Filebeat服务时,它运行得很好,没有任何问题。

不知道为什么我一直得到错误,一直坚持了一段时间。
我已经无数次地查看了cisco.yml配置文件,将var.syslog_host更改为0. 0. 0.,将协议从udp更改为tcp,然后再更改回来。我尝试了一个稍微更新的版本(Filebeat 8.9.2),但得到了正常的错误。请帮帮我

xcitsw88

xcitsw881#

由于YAML是一种非常挑剔的格式,您首先需要确保删除未注解行上的初始空格。

# Set which input to use between udp (default), tcp or file.  
var.input: udp
var.syslog_host: 10.0.0.83
var.syslog_port: 9004
^
|
here

相关问题