- Filebeat Reference: other versions:
- Overview
- Getting Started With Filebeat
- Step 1: Install Filebeat
- Step 2: Configure Filebeat
- Step 3: Configure Filebeat to use Logstash
- Step 4: Load the index template in Elasticsearch
- Step 5: Set up the Kibana dashboards
- Step 6: Start Filebeat
- Step 7: View the sample Kibana dashboards
- Quick start: modules for common log formats
- Repositories for APT and YUM
- Setting up and running Filebeat
- Upgrading Filebeat
- How Filebeat works
- Configuring Filebeat
- Specify which modules to run
- Configure inputs
- Manage multiline messages
- Specify general settings
- Load external configuration files
- Configure the internal queue
- Configure the output
- Load balance the output hosts
- Specify SSL settings
- Filter and enhance the exported data
- Parse data by using ingest node
- Set up project paths
- Set up the Kibana endpoint
- Load the Kibana dashboards
- Load the Elasticsearch index template
- Configure logging
- Use environment variables in the configuration
- Autodiscover
- YAML tips and gotchas
- Regular expression support
- HTTP Endpoint
- filebeat.reference.yml
- Beats central management
- Modules
- Exported fields
- Apache2 fields
- Auditd fields
- Beat fields
- Cloud provider metadata fields
- Docker fields
- elasticsearch fields
- haproxy fields
- Host fields
- Icinga fields
- IIS fields
- Kafka fields
- kibana fields
- Kubernetes fields
- Log file content fields
- logstash fields
- mongodb fields
- MySQL fields
- Nginx fields
- Osquery fields
- PostgreSQL fields
- Redis fields
- System fields
- Traefik fields
- Monitoring Filebeat
- Securing Filebeat
- Troubleshooting
- Migrating from Logstash Forwarder to Filebeat
- Contributing to Beats
Configure authentication credentials
editConfigure authentication credentials
editWhen sending data to a secured cluster through the elasticsearch
output, Filebeat must either provide basic authentication credentials
or present a client certificate.
To configure authentication credentials for Filebeat:
-
Create a writer role that has the following privileges:
-
Cluster:
manage_index_templates
,monitor
, andmanage_ingest_pipelines
-
Index:
write
andcreate_index
on the Filebeat indices
You can create roles from the Management / Roles UI in Kibana or through the
role
API. For example, the following request creates a role namedfilebeat_writer
: -
Cluster:
-
Assign the writer role to the user that Filebeat will use to connect to Elasticsearch. Make sure you also assign any roles that are required for specific features. For the list of features and required roles, see Filebeat features that require authorization.
-
To authenticate as a native user, create a user for Filebeat to use internally and assign it the writer role, plus any other roles that are needed.
You can create users from the Management / Users UI in Kibana or through the
user
API. For example, following request creates a user namedfilebeat_internal
that has thefilebeat_writer
andkibana_user
roles:POST /_xpack/security/user/filebeat_internal { "password" : "YOUR_PASSWORD", "roles" : [ "filebeat_writer","kibana_user"], "full_name" : "Internal Filebeat User" }
-
To use PKI authentication, assign the writer role, plus any other roles that are needed, in the
role_mapping.yml
configuration file. Specify the user by the distinguished name that appears in its certificate:filebeat_writer: - "cn=Internal Filebeat User,ou=example,o=com" kibana_user: - "cn=Internal Filebeat User,ou=example,o=com"
For more information, see Using Role Mapping Files.
-
-
In the Filebeat configuration file, specify authentication credentials for the
elasticsearch
output:-
To use basic authentication, configure the
username
andpassword
settings. For example, the following Filebeat output configuration uses the nativefilebeat_internal
user to connect to Elasticsearch:output.elasticsearch: hosts: ["localhost:9200"] username: "filebeat_internal" password: "YOUR_PASSWORD"
You created this user earlier.
The example shows a hard-coded password, but you should store sensitive values in the secrets keystore.
-
To use PKI authentication, configure the
certificate
andkey
settings:
-