- Filebeat Reference: other versions:
- Filebeat overview
- Quick start: installation and configuration
- Set up and run
- Upgrade
- How Filebeat works
- Configure
- Inputs
- Multiline messages
- AWS CloudWatch
- AWS S3
- Azure Event Hub
- Azure Blob Storage
- Benchmark
- CEL
- Cloud Foundry
- CometD
- Container
- Entity Analytics
- ETW
- filestream
- GCP Pub/Sub
- Google Cloud Storage
- HTTP Endpoint
- HTTP JSON
- journald
- Kafka
- Log
- MQTT
- NetFlow
- Office 365 Management Activity API
- Redis
- Salesforce
- Stdin
- Streaming
- Syslog
- TCP
- UDP
- Unix
- winlog
- Modules
- General settings
- Project paths
- Config file loading
- Output
- Kerberos
- SSL
- Index lifecycle management (ILM)
- Elasticsearch index template
- Kibana endpoint
- Kibana dashboards
- Processors
- Define processors
- 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
- Autodiscover
- Internal queue
- Logging
- HTTP endpoint
- Regular expression support
- Instrumentation
- Feature flags
- filebeat.reference.yml
- Inputs
- How to guides
- Override configuration settings
- Load the Elasticsearch index template
- Change the index name
- Load Kibana dashboards
- Load ingest pipelines
- Enrich events with geoIP information
- Deduplicate data
- Parse data using an ingest pipeline
- Use environment variables in the configuration
- Avoid YAML formatting problems
- Migrate
log
input configurations tofilestream
- Migrating from a Deprecated Filebeat Module
- Modules
- Modules overview
- ActiveMQ module
- Apache module
- Auditd module
- AWS module
- AWS Fargate module
- Azure module
- CEF module
- Check Point module
- Cisco module
- CoreDNS module
- CrowdStrike module
- Cyberark PAS module
- Elasticsearch module
- Envoyproxy Module
- Fortinet module
- Google Cloud module
- Google Workspace module
- HAproxy module
- IBM MQ module
- Icinga module
- IIS module
- Iptables module
- Juniper module
- Kafka module
- Kibana module
- Logstash module
- Microsoft module
- MISP module
- MongoDB module
- MSSQL module
- MySQL module
- MySQL Enterprise module
- NATS module
- NetFlow module
- Nginx module
- Office 365 module
- Okta module
- Oracle module
- Osquery module
- Palo Alto Networks module
- pensando module
- PostgreSQL module
- RabbitMQ module
- Redis module
- Salesforce module
- Santa module
- Snyk module
- Sophos module
- Suricata module
- System module
- Threat Intel module
- Traefik module
- Zeek (Bro) Module
- ZooKeeper module
- Zoom module
- Exported fields
- ActiveMQ fields
- Apache fields
- Auditd fields
- AWS fields
- AWS CloudWatch fields
- AWS Fargate fields
- Azure fields
- Beat fields
- Decode CEF processor fields fields
- CEF fields
- Checkpoint fields
- Cisco fields
- Cloud provider metadata fields
- Coredns fields
- Crowdstrike fields
- CyberArk PAS fields
- Docker fields
- ECS fields
- Elasticsearch fields
- Envoyproxy fields
- Fortinet fields
- Google Cloud Platform (GCP) fields
- google_workspace fields
- HAProxy fields
- Host fields
- ibmmq fields
- Icinga fields
- IIS fields
- iptables fields
- Jolokia Discovery autodiscover provider fields
- Juniper JUNOS fields
- Kafka fields
- kibana fields
- Kubernetes fields
- Log file content fields
- logstash fields
- Lumberjack fields
- Microsoft fields
- MISP fields
- mongodb fields
- mssql fields
- MySQL fields
- MySQL Enterprise fields
- NATS fields
- NetFlow fields
- Nginx fields
- Office 365 fields
- Okta fields
- Oracle fields
- Osquery fields
- panw fields
- Pensando fields
- PostgreSQL fields
- Process fields
- RabbitMQ fields
- Redis fields
- s3 fields
- Salesforce fields
- Google Santa fields
- Snyk fields
- sophos fields
- Suricata fields
- System fields
- threatintel fields
- Traefik fields
- Windows ETW fields
- Zeek fields
- ZooKeeper fields
- Zoom fields
- Monitor
- Secure
- Troubleshoot
- Get help
- Debug
- Understand logged metrics
- Common problems
- Error extracting container id while using Kubernetes metadata
- Can’t read log files from network volumes
- Filebeat isn’t collecting lines from a file
- Too many open file handlers
- Registry file is too large
- Inode reuse causes Filebeat to skip lines
- Log rotation results in lost or duplicate events
- Open file handlers cause issues with Windows file rotation
- Filebeat is using too much CPU
- Dashboard in Kibana is breaking up data fields incorrectly
- Fields are not indexed or usable in Kibana visualizations
- Filebeat isn’t shipping the last line of a file
- Filebeat keeps open file handlers of deleted files for a long time
- Filebeat uses too much bandwidth
- Error loading config file
- Found unexpected or unknown characters
- Logstash connection doesn’t work
- Publishing to Logstash fails with "connection reset by peer" message
- @metadata is missing in Logstash
- Not sure whether to use Logstash or Beats
- SSL client fails to connect to Logstash
- Monitoring UI shows fewer Beats than expected
- Dashboard could not locate the index-pattern
- High RSS memory usage due to MADV settings
- Contribute to Beats
Parse AWS VPC Flow Log
editParse AWS VPC Flow Log
editThe parse_aws_vpc_flow_log
processor decodes AWS VPC Flow log messages.
Below is an example configuration that decodes the message
field using the
default version 2 VPC flow log format.
processors: - parse_aws_vpc_flow_log: format: version account-id interface-id srcaddr dstaddr srcport dstport protocol packets bytes start end action log-status field: message
The parse_aws_vpc_flow_log
processor has the following configuration settings.
Table 4. Parse AWS VPC Flow Log options
Name | Required | Default | Description | |
---|---|---|---|---|
|
no |
|
Source field containing the VPC flow log message. |
|
|
no |
|
Target field for the VPC flow log object. This applies only to the original VPC flow log fields. ECS fields are written to the standard location. |
|
|
yes |
VPC flow log format. This supports VPC flow log fields from versions 2 through 5. It will accept a string or a list of strings. Each format must have a unique number of fields to enable matching it to a flow log message. |
||
|
no |
|
Mode controls what fields are generated. The available options are |
|
|
no |
false |
Ignore missing source field. |
|
|
no |
false |
Ignore failures while parsing and transforming the flow log message. |
|
|
no |
Instance ID for debugging purposes. |
Modes
editOriginal
editThis mode returns the same fields found in the format
string. It will drop any
fields whose value a dash (-
). It converts the strings into the appropriate
data types. These are the known field names and their data types.
The AWS VPC flow field names use underscores instead of dashes within
Filebeat. You may configure the format
using field names that contain either.
VPC Flow Log Field | Data Type | |
---|---|---|
account_id |
string |
|
action |
string |
|
az_id |
string |
|
bytes |
long |
|
dstaddr |
ip |
|
dstport |
integer |
|
end |
timestamp |
|
flow_direction |
string |
|
instance_id |
string |
|
interface_id |
string |
|
log_status |
string |
|
packets |
long |
|
pkt_dst_aws_service |
string |
|
pkt_dstaddr |
ip |
|
pkt_src_aws_service |
string |
|
pkt_srcaddr |
ip |
|
protocol |
integer |
|
region |
string |
|
srcaddr |
ip |
|
srcport |
integer |
|
start |
timestamp |
|
sublocation_id |
string |
|
sublocation_type |
string |
|
subnet_id |
string |
|
tcp_flags |
integer |
|
tcp_flags_array* |
integer |
|
traffic_path |
integer |
|
type |
string |
|
version |
integer |
|
vpc_id |
string |
ECS
editThis mode maps the original VPC flow log fields into their associated Elastic Common Schema (ECS) fields. It removes the original fields that were mapped to ECS to reduced duplication. These are the field associations. There may be some transformations applied to derive the ECS field.
VPC Flow Log Field | ECS Field | |
---|---|---|
account_id |
cloud.account.id |
|
action |
event.outcome |
|
action |
event.action |
|
action |
event.type |
|
az_id |
cloud.availability_zone |
|
bytes |
network.bytes |
|
bytes |
source.bytes |
|
dstaddr |
destination.address |
|
dstaddr |
destination.ip |
|
dstport |
destination.port |
|
end |
@timestamp |
|
end |
event.end |
|
flow_direction |
network.direction |
|
instance_id |
cloud.instance.id |
|
packets |
network.packets |
|
packets |
source.packets |
|
protocol |
network.iana_number |
|
protocol |
network.transport |
|
region |
cloud.region |
|
srcaddr |
network.type |
|
srcaddr |
source.address |
|
srcaddr |
source.ip |
|
srcport |
source.port |
|
start |
event.start |
ECS and Original
editThis mode maps the fields into ECS and retains all the original fields. Below
is an example document produced using ecs_and_orignal
mode.
{ "@timestamp": "2021-03-26T03:29:09Z", "aws": { "vpcflow": { "account_id": "64111117617", "action": "REJECT", "az_id": "use1-az5", "bytes": 1, "dstaddr": "10.200.0.0", "dstport": 33004, "end": "2021-03-26T03:29:09Z", "flow_direction": "ingress", "instance_id": "i-0axxxxxx1ad77", "interface_id": "eni-069xxxxxb7a490", "log_status": "OK", "packets": 52, "pkt_dst_aws_service": "CLOUDFRONT", "pkt_dstaddr": "10.200.0.80", "pkt_src_aws_service": "AMAZON", "pkt_srcaddr": "89.160.20.156", "protocol": 17, "region": "us-east-1", "srcaddr": "89.160.20.156", "srcport": 50041, "start": "2021-03-26T03:28:12Z", "sublocation_id": "fake-id", "sublocation_type": "wavelength", "subnet_id": "subnet-02d645xxxxxxxdbc0", "tcp_flags": 1, "tcp_flags_array": [ "fin" ], "traffic_path": 1, "type": "IPv4", "version": 5, "vpc_id": "vpc-09676f97xxxxxb8a7" } }, "cloud": { "account": { "id": "64111117617" }, "availability_zone": "use1-az5", "instance": { "id": "i-0axxxxxx1ad77" }, "region": "us-east-1" }, "destination": { "address": "10.200.0.0", "ip": "10.200.0.0", "port": 33004 }, "event": { "action": "reject", "end": "2021-03-26T03:29:09Z", "outcome": "failure", "start": "2021-03-26T03:28:12Z", "type": [ "connection", "denied" ] }, "message": "5 64111117617 eni-069xxxxxb7a490 89.160.20.156 10.200.0.0 50041 33004 17 52 1 1616729292 1616729349 REJECT OK vpc-09676f97xxxxxb8a7 subnet-02d645xxxxxxxdbc0 i-0axxxxxx1ad77 1 IPv4 89.160.20.156 10.200.0.80 us-east-1 use1-az5 wavelength fake-id AMAZON CLOUDFRONT ingress 1", "network": { "bytes": 1, "direction": "ingress", "iana_number": "17", "packets": 52, "transport": "udp", "type": "ipv4" }, "related": { "ip": [ "89.160.20.156", "10.200.0.0", "10.200.0.80" ] }, "source": { "address": "89.160.20.156", "bytes": 1, "ip": "89.160.20.156", "packets": 52, "port": 50041 } }
On this page