HashiCorp Vault secures, stores, and tightly controls access to tokens, passwords, certificates, API keys, and other secrets in modern computing. This integration allows you to send HashiCorp Vault logs to your Logz.io SIEM account.


Before you begin, you’ll need:

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 credentials 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.

Replace <<LOG-SHIPPING-TOKEN>> with the token of the account you want to ship to.

Replace <<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.

# ...
- type: log

  - /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
- rename:
    - from: "agent"
      to: "filebeat_agent"
    ignore_missing: true
- rename:
    - from: "log.file.path"
      to: "source"
    ignore_missing: true
- rename:
  - from: "type"
    to: "hashi_type"
  ignore_missing: true
- rename:
  - from: "logzio_type"
    to: "type"
  ignore_missing: true

# ...
  hosts: ["<<LISTENER-HOST>>:5015"]
    certificate_authorities: ['/etc/pki/tls/certs/COMODORSADomainValidationSecureServerCA.crt']

If you’re running Filebeat 8.1+, the type of the filebeat.inputs is filestream instead of logs:

- type: filestream
    - /var/log/*.log
Start Filebeat

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.