Before you begin, you’ll need:
- Filebeat 7
- Root access
Configure Vault to output raw logs
Configure Vault to enable raw log output to the default location. After making the change, start or restart Vault for the changes to take effect.
Disabling log hashing means that Vault will send logs in clear text. This is required at this time, because Vault supports decryption for only a limited number of fields that don’t match the fields required by Logz.io Cloud SIEM. When this limitation is resolved, the requirement to send raw logs will be lifted.
For more information on logging and enabling audit devices, see File Audit Device from HashiCorp.
Download the Logz.io public certificate to your Filebeat server
For HTTPS shipping, download the Logz.io public certificate to your certificate authority folder.
sudo curl https://raw.githubusercontent.com/logzio/public-certificates/master/AAACertificateServices.crt --create-dirs -o /etc/pki/tls/certs/COMODORSADomainValidationSecureServerCA.crt
Create your configuration file for Vault
The Filebeat configuration file is at
/etc/filebeat/filebeat.yml by default.
To avoid conflicts with fields from other log sources, you’ll need to run a dedicated Filebeat instance for Vault logs. This allows Filebeat to rename some fields to keep Vault logs compatible with Logz.io.
<<LOG-SHIPPING-TOKEN>> with the token of the account you want to ship to.
<<LISTENER-HOST>> with the host for your region. For example,
listener.logz.io if your account is hosted on AWS US East, or
listener-nl.logz.io if hosted on Azure West Europe.
# ... filebeat.inputs: - type: log paths: - /var/log/vault_audit.log # Your Logz.io account token. You can find your token at # https://app.logz.io/#/dashboard/settings/manage-accounts token: <<LOG-SHIPPING-TOKEN>> logzio_type: vault fields_under_root: true json.keys_under_root: true encoding: utf-8 ignore_older: 3h filebeat.registry.path: /var/lib/filebeat processors: - rename: fields: - from: "agent" to: "filebeat_agent" ignore_missing: true - rename: fields: - from: "log.file.path" to: "source" ignore_missing: true - rename: fields: - from: "type" to: "hashi_type" ignore_missing: true - rename: fields: - from: "logzio_type" to: "type" ignore_missing: true # ... output.logstash: hosts: ["<<LISTENER-HOST>>:5015"] ssl: certificate_authorities: ['/etc/pki/tls/certs/COMODORSADomainValidationSecureServerCA.crt']
Start or restart Filebeat for the changes to take effect.
Check Logz.io for your logs
Give your logs some time to get from your system to ours, and then open Kibana.
If you still don’t see your logs, see log shipping troubleshooting.