Home

Awesome

Deprecated. New version available here.

Graylog2TheHive4

Simple app to create TheHive4 alerts from Graylog Event event definition.

Environment

This app has been tested with the following versions:

This app should be installed on the host where TheHive4 is installed.

Setup

Setup Graylog2TheHive4 application

git clone git@github.com:malinkinsa/graylog2thehive4.git /opt/graylog2thehive4
cd /opt/graylog2thehive4
pip3 install -r requirements.txt
cp init.d/graylog2thehive4.service /etc/systemd/system/
vim /etc/systemd/system/graylog2thehive4.service
systemctl daemon-reload
systemctl start graylog2thehive4.service
systemctl enable graylog2thehive4.service
cd /opt/graylog2thehive4/
python3 main.py --thehive_url= --api_key= --graylog_url= --ip= --port=

Setup Graylog Notification

Create new Notification with in Alerts -> Notifications:

Adding artifacts to TheHive4 alert

if key == 'ip':
            alert_artifacts.append({"dataType": "ip", "data": graylog_fields[key]})

Logging

For debug you can use log with message from graylog and message that sending to thehive4. It located in ./log/graylog2thehive4.log