- 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 做贡献
配置用于指标的 HTTP 端点
编辑配置用于指标的 HTTP 端点
编辑此功能为技术预览版,未来版本中可能会更改或删除。Elastic 将努力修复任何问题,但技术预览版中的功能不受官方 GA 功能的支持 SLA 约束。
Filebeat 可以通过 HTTP 端点公开内部指标。这些指标有助于监控 Beat 的内部状态。出于安全原因,默认情况下禁用该端点,因为您可能希望避免公开此信息。
HTTP 端点具有以下配置设置
-
http.enabled
- (可选)启用 HTTP 端点。默认为
false
。 -
http.host
- (可选)绑定到此主机名、IP 地址、Unix 套接字(unix:///var/run/filebeat.sock)或 Windows 命名管道(npipe:///filebeat)。建议仅使用 localhost。默认为
localhost
-
http.port
- (可选)HTTP 端点将绑定到的端口。默认为
5066
。 -
http.named_pipe.user
- (可选)用于创建命名管道的用户,仅在 Windows 上有效,默认为当前用户。
-
http.named_pipe.security_descriptor
- (可选)以 SDDL 格式定义的 Windows 安全描述符字符串。默认为当前用户的读写权限。
-
http.pprof.enabled
- (可选)启用提供 HTTP 服务时的
/debug/pprof/
端点。建议仅在 localhost 上启用此项,因为这些端点可能会泄漏数据。默认为false
。 -
http.pprof.block_profile_rate
- (可选)
block_profile_rate
控制在/debug/pprof/block
中提供的阻塞配置文件中报告的 goroutine 阻塞事件的比例。分析器旨在对每个阻塞纳秒花费的平均阻塞事件进行采样。要在配置文件中包含每个阻塞事件,请传递 rate = 1。要完全关闭分析,请传递 rate ⇐ 0。默认为 0。 -
http.pprof.mem_profile_rate
- (可选)
mem_profile_rate
控制在/debug/pprof/heap
中提供的内存配置文件中记录和报告的内存分配比例。分析器旨在对每个分配的mem_profile_rate
字节的平均分配进行采样。要在配置文件中包含每个分配的块,请将mem_profile_rate
设置为 1。要完全关闭分析,请将mem_profile_rate
设置为 0。默认为 524288。 -
http.pprof.mutex_profile_rate
- (可选)
mutex_profile_rate
控制在/debug/pprof/mutex
中提供的互斥锁配置文件中报告的互斥锁争用事件的比例。平均报告 1/rate 事件。要完全关闭分析,请传递 rate 0。默认值为 0。
这是您可以访问的路径列表。要获得漂亮的 JSON 输出,请将 ?pretty
附加到 URL。
您可以使用 cURL
命令和 --unix-socket
标志查询 Unix 套接字。
curl -XGET --unix-socket '/var/run/{beatname_lc}.sock' 'http:/stats/?pretty'
信息
编辑/
提供来自 Filebeat 的基本信息。示例
curl -XGET 'localhost:5066/?pretty'
{ "beat": "filebeat", "hostname": "example.lan", "name": "example.lan", "uuid": "34f6c6e1-45a8-4b12-9125-11b3e6e89866", "version": "8.17.0" }
统计
编辑/stats
报告内部指标。示例
curl -XGET 'localhost:5066/stats?pretty'
{ "beat": { "cpu": { "system": { "ticks": 1710, "time": { "ms": 1712 } }, "total": { "ticks": 3420, "time": { "ms": 3424 }, "value": 3420 }, "user": { "ticks": 1710, "time": { "ms": 1712 } } }, "info": { "ephemeral_id": "ab4287c4-d907-4d9d-b074-d8c3cec4a577", "uptime": { "ms": 195547 } }, "memstats": { "gc_next": 17855152, "memory_alloc": 9433384, "memory_total": 492478864, "rss": 50405376 }, "runtime": { "goroutines": 22 } }, "libbeat": { "config": { "module": { "running": 0, "starts": 0, "stops": 0 }, "scans": 1, "reloads": 1 }, "output": { "events": { "acked": 0, "active": 0, "batches": 0, "dropped": 0, "duplicates": 0, "failed": 0, "total": 0 }, "read": { "bytes": 0, "errors": 0 }, "type": "elasticsearch", "write": { "bytes": 0, "errors": 0 } }, "pipeline": { "clients": 6, "events": { "active": 716, "dropped": 0, "failed": 0, "filtered": 0, "published": 716, "retry": 278, "total": 716 }, "queue": { "acked": 0 } } }, "system": { "cpu": { "cores": 4 }, "load": { "1": 2.22, "15": 1.8, "5": 1.74, "norm": { "1": 0.555, "15": 0.45, "5": 0.435 } } } }
实际输出可能包含更多特定于 Filebeat 的指标
输入
编辑/inputs/
返回与输入实例相关的指标。它返回一个对象列表,其中每个对象包含输入实例的指标。每个对象将至少包含一个 input
字段,用于标识输入类型(例如 aws-s3
),以及一个 id
字段,它是输入实例的唯一标识符。
请求可以选择指定 type
查询参数,以请求特定类型的输入的指标。并且可以包含 pretty
以使返回的 JSON 格式化美观。
curl 'https://127.0.0.1:5066/inputs/' curl 'https://127.0.0.1:5066/inputs/?pretty' curl 'https://127.0.0.1:5066/inputs/?type=aws-s3&pretty'
Was this helpful?
Thank you for your feedback.