Skip to content

IBM QRadar via Logstash

Example overview

Webhooks can be used as system log sources. The number of log sources depends on the system complexity: the more components in the system, the greater number of log sources and logs. The most common logging scheme in complex systems consists of the following components:

  • Log collector: accepts logs from several sources and forwards logs to the SIEM system

  • SIEM system: used to analyze logs and monitor the system status

In the provided example, events are sent via webhooks to the Logstash log collector and forwarded to the QRadar SIEM system.

Webhook flow

Used resources

Logstash configuration

Logstash is configured in the logstash-sample.conf file:

  • Incoming webhook processing is configured in the input section:

    • All HTTP and HTTPS traffic is sent to 5044 Logstash port
    • SSL certificate for HTTPS connection is located in the file /etc/pki/ca.pem
  • Forwarding logs to QRadar and log output are configured in the output section:

    • All event logs are forwarded from Logstash to QRadar at the IP address https://109.111.35.11:514
    • Logs are forwarded from Logstash to QRadar in the JSON format according to the Syslog standard
    • Connection with QRadar is established via TCP
    • Logstash logs are additionally printed on the command line (15 code line). The setting is used to verify that events are logged via Logstash
input {
  http { # input plugin for HTTP and HTTPS traffic
    port => 5044 # port for incoming requests
    ssl => true # HTTPS traffic processing
    ssl_certificate => "/etc/pki/ca.pem" # certificate for HTTPS connection
  }
}
output {
  syslog { # output plugin to forward logs from Logstash via Syslog
    host => "109.111.35.11" # IP address to forward logs to
    port => "514" # port to forward logs to
    protocol => "tcp" # connection protocol
    codec => json # format of forwarded logs
  }
  stdout {} # output plugin to print Logstash logs on the command line
}

More detailed description of configuration files is available in the official Logstash documentation.

Testing Logstash configuration

To check that Logstash logs are created and forwarded to QRadar, the POST request can be sent to Logstash.

Request example:

curl -X POST 'https://logstash.example.domain.com' -H "Content-Type: application/json" -d '{"key1":"value1", "key2":"value2"}'

Logstash logs:

Логи Logstash

QRadar logs:

Логи QRadar

QRadar log payload:

Логи QRadar

QRadar configuration (optional)

In QRadar, the log source is configured. It helps to easily find Logstash logs in the list of all logs in QRadar, and can also be used for further log filtering. The log source is configured as follows:

  • Log Source Name: Logstash

  • Log Source Description: Logs from Logstash

  • Log Source Type: type of incoming logs parser used with Syslog standard Universal LEEF

  • Protocol Configuration: standard of logs forwarding Syslog

  • Log Source Identifier: Logstash IP address

  • Other default settings

More detailed description of QRadar log source setup is available in the official IBM documentation.

QRadar log source setup for Logstash

Configuration of webhook integration

  • Webhooks are sent to https://logstash.example.domain.com

  • Webhooks are sent via POST requests POST

  • Additional authentication parameter X-Auth-Token is passed in the request

  • Webhooks send to Webhook URL all available events: hits, system events, vulnerabilities, scope changes

Webhook integration with Logstash

Example testing

To test the configuration, a new user is added in Wallarm Console:

Adding user

Logstash will log the event as follows:

Log about new user in QRadar from Logstash

The following data in JSON format will be displayed in QRadar log payload:

New user card in QRadar from Logstash