- Filebeat 参考其他版本
- Filebeat 概述
- 快速入门:安装和配置
- 设置和运行
- 升级
- Filebeat 的工作原理
- 配置
- 输入
- 模块
- 通用设置
- 项目路径
- 配置文件加载
- 输出
- Kerberos
- SSL
- 索引生命周期管理 (ILM)
- Elasticsearch 索引模板
- Kibana 端点
- Kibana 仪表板
- 处理器
- 定义处理器
- add_cloud_metadata
- add_cloudfoundry_metadata
- add_docker_metadata
- add_fields
- add_host_metadata
- add_id
- add_kubernetes_metadata
- add_labels
- add_locale
- add_network_direction
- add_nomad_metadata
- add_observer_metadata
- add_process_metadata
- add_tags
- append
- cache
- community_id
- convert
- copy_fields
- decode_base64_field
- decode_cef
- decode_csv_fields
- decode_duration
- decode_json_fields
- decode_xml
- decode_xml_wineventlog
- decompress_gzip_field
- detect_mime_type
- dissect
- dns
- drop_event
- drop_fields
- extract_array
- fingerprint
- include_fields
- move_fields
- parse_aws_vpc_flow_log
- rate_limit
- registered_domain
- rename
- replace
- script
- syslog
- timestamp
- translate_ldap_attribute
- translate_sid
- truncate_fields
- urldecode
- 自动发现
- 内部队列
- 日志记录
- HTTP 端点
- 正则表达式支持
- 检测
- 功能标志
- filebeat.reference.yml
- 操作指南
- 模块
- 模块概述
- ActiveMQ 模块
- Apache 模块
- Auditd 模块
- AWS 模块
- AWS Fargate 模块
- Azure 模块
- CEF 模块
- Check Point 模块
- Cisco 模块
- CoreDNS 模块
- CrowdStrike 模块
- Cyberark PAS 模块
- Elasticsearch 模块
- Envoyproxy 模块
- Fortinet 模块
- Google Cloud 模块
- Google Workspace 模块
- HAproxy 模块
- IBM MQ 模块
- Icinga 模块
- IIS 模块
- Iptables 模块
- Juniper 模块
- Kafka 模块
- Kibana 模块
- Logstash 模块
- Microsoft 模块
- MISP 模块
- MongoDB 模块
- MSSQL 模块
- MySQL 模块
- MySQL Enterprise 模块
- NATS 模块
- NetFlow 模块
- Nginx 模块
- Office 365 模块
- Okta 模块
- Oracle 模块
- Osquery 模块
- Palo Alto Networks 模块
- pensando 模块
- PostgreSQL 模块
- RabbitMQ 模块
- Redis 模块
- Salesforce 模块
- Santa 模块
- Snyk 模块
- Sophos 模块
- Suricata 模块
- System 模块
- Threat Intel 模块
- Traefik 模块
- Zeek (Bro) 模块
- ZooKeeper 模块
- Zoom 模块
- 导出的字段
- ActiveMQ 字段
- Apache 字段
- Auditd 字段
- AWS 字段
- AWS CloudWatch 字段
- AWS Fargate 字段
- Azure 字段
- Beat 字段
- 解码 CEF 处理器字段
- CEF 字段
- Checkpoint 字段
- Cisco 字段
- 云提供商元数据字段
- Coredns 字段
- Crowdstrike 字段
- CyberArk PAS 字段
- Docker 字段
- ECS 字段
- Elasticsearch 字段
- Envoyproxy 字段
- Fortinet 字段
- Google Cloud Platform (GCP) 字段
- google_workspace 字段
- HAProxy 字段
- 主机字段
- ibmmq 字段
- Icinga 字段
- IIS 字段
- iptables 字段
- Jolokia Discovery 自动发现提供程序字段
- Juniper JUNOS 字段
- Kafka 字段
- kibana 字段
- Kubernetes 字段
- 日志文件内容字段
- logstash 字段
- Lumberjack 字段
- Microsoft 字段
- MISP 字段
- mongodb 字段
- mssql 字段
- MySQL 字段
- MySQL Enterprise 字段
- NATS 字段
- NetFlow 字段
- Nginx 字段
- Office 365 字段
- Okta 字段
- Oracle 字段
- Osquery 字段
- panw 字段
- Pensando 字段
- PostgreSQL 字段
- 进程字段
- RabbitMQ 字段
- Redis 字段
- s3 字段
- Salesforce 字段
- Google Santa 字段
- Snyk 字段
- sophos 字段
- Suricata 字段
- System 字段
- threatintel 字段
- Traefik 字段
- Windows ETW 字段
- Zeek 字段
- ZooKeeper 字段
- Zoom 字段
- 监控
- 安全
- 故障排除
- 获取帮助
- 调试
- 了解记录的指标
- 常见问题
- 在使用 Kubernetes 元数据时提取容器 ID 时出错
- 无法从网络卷读取日志文件
- Filebeat 未从文件中收集行
- 打开的文件句柄过多
- 注册表文件太大
- Inode 重用导致 Filebeat 跳过行
- 日志轮换导致事件丢失或重复
- 打开的文件句柄导致 Windows 文件轮换出现问题
- Filebeat 占用过多 CPU
- Kibana 中的仪表板错误地分解数据字段
- 字段未在 Kibana 可视化中编制索引或可用
- Filebeat 未传输文件的最后一行
- Filebeat 长时间保持已删除文件的打开文件句柄
- Filebeat 使用过多带宽
- 加载配置文件时出错
- 发现意外或未知字符
- Logstash 连接不起作用
- 发布到 Logstash 失败,并显示“connection reset by peer”消息
- @metadata 在 Logstash 中丢失
- 不确定是使用 Logstash 还是 Beats
- SSL 客户端无法连接到 Logstash
- 监控 UI 显示的 Beats 比预期的少
- 仪表板无法定位索引模式
- 由于 MADV 设置导致高 RSS 内存使用率
- 为 Beats 做贡献
使用 geoIP 信息丰富事件
编辑使用 geoIP 信息丰富事件
编辑您可以将 Filebeat 与 Elasticsearch 中的 GeoIP 处理器 一起使用,以根据 IP 地址导出地理位置信息。然后,您可以使用此信息在 Kibana 的地图上可视化 IP 地址的位置。
geoip
处理器根据 Maxmind GeoLite2 城市数据库中的数据添加有关 IP 地址地理位置的信息。由于该处理器使用安装在 Elasticsearch 上的 geoIP 数据库,因此您无需在运行 Filebeat 的计算机上安装 geoIP 数据库。
如果您的用例涉及使用 Logstash,则可以使用 Logstash 中可用的 GeoIP 过滤器,而不是使用 geoip
处理器。但是,当您不需要 Logstash 的额外处理能力时,使用 geoip
处理器是最简单的方法。
配置 geoip
处理器
编辑要配置 Filebeat 和 geoip
处理器
-
定义一个使用一个或多个
geoip
处理器将位置信息添加到事件的摄取管道。例如,您可以使用 Kibana 中的控制台创建以下管道PUT _ingest/pipeline/geoip-info { "description": "Add geoip info", "processors": [ { "geoip": { "field": "client.ip", "target_field": "client.geo", "ignore_missing": true } }, { "geoip": { "database_file": "GeoLite2-ASN.mmdb", "field": "client.ip", "target_field": "client.as", "properties": [ "asn", "organization_name" ], "ignore_missing": true } }, { "geoip": { "field": "source.ip", "target_field": "source.geo", "ignore_missing": true } }, { "geoip": { "database_file": "GeoLite2-ASN.mmdb", "field": "source.ip", "target_field": "source.as", "properties": [ "asn", "organization_name" ], "ignore_missing": true } }, { "geoip": { "field": "destination.ip", "target_field": "destination.geo", "ignore_missing": true } }, { "geoip": { "database_file": "GeoLite2-ASN.mmdb", "field": "destination.ip", "target_field": "destination.as", "properties": [ "asn", "organization_name" ], "ignore_missing": true } }, { "geoip": { "field": "server.ip", "target_field": "server.geo", "ignore_missing": true } }, { "geoip": { "database_file": "GeoLite2-ASN.mmdb", "field": "server.ip", "target_field": "server.as", "properties": [ "asn", "organization_name" ], "ignore_missing": true } }, { "geoip": { "field": "host.ip", "target_field": "host.geo", "ignore_missing": true } }, { "rename": { "field": "server.as.asn", "target_field": "server.as.number", "ignore_missing": true } }, { "rename": { "field": "server.as.organization_name", "target_field": "server.as.organization.name", "ignore_missing": true } }, { "rename": { "field": "client.as.asn", "target_field": "client.as.number", "ignore_missing": true } }, { "rename": { "field": "client.as.organization_name", "target_field": "client.as.organization.name", "ignore_missing": true } }, { "rename": { "field": "source.as.asn", "target_field": "source.as.number", "ignore_missing": true } }, { "rename": { "field": "source.as.organization_name", "target_field": "source.as.organization.name", "ignore_missing": true } }, { "rename": { "field": "destination.as.asn", "target_field": "destination.as.number", "ignore_missing": true } }, { "rename": { "field": "destination.as.organization_name", "target_field": "destination.as.organization.name", "ignore_missing": true } } ] }
在此示例中,管道 ID 为
geoip-info
。field
指定包含用于地理位置查找的 IP 地址的字段,而target_field
是将保存地理信息的字段。"ignore_missing": true
配置管道,使其在遇到不包含指定字段的事件时继续处理。有关更多选项,请参阅 GeoIP 处理器。
要了解有关向事件添加主机信息的更多信息,请参阅 add_host_metadata。
-
在 Filebeat 配置文件中,配置 Elasticsearch 输出以使用管道。在
output.elasticsearch
下的pipeline
选项中指定管道 ID。例如output.elasticsearch: hosts: ["localhost:9200"] pipeline: geoip-info
-
运行 Filebeat。如果配置文件归 root 所有,请记住使用
sudo
。./filebeat -e
如果查找成功,则事件将使用
geo_point
字段(例如client.geo.location
和host.geo.location
)进行丰富,您可以使用这些字段来填充 Kibana 中的可视化。
如果您添加的字段在索引模板中尚未定义为 geo_point
,请添加映射,以便正确索引该字段。
可视化位置
编辑要可视化 IP 地址的位置,您可以在 Kibana 中创建一个新的 坐标地图,并选择位置字段(例如 client.geo.location
或 host.geo.location
)作为 Geohash。

On this page