Skip to content
This repository was archived by the owner on Oct 20, 2025. It is now read-only.

Graylog2/graylog-guide-ossec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

This guide has been archived.

The information in this guide is very old and likely no longer applicable to current versions of Graylog. Please take that into account when reading the following content.

How to send OSSEC alerts into Graylog

This guide describes how to send structured OSSEC alert logs into Graylog.

Configuring Graylog

Installing the CEF input plugin

We’ll use the CEF format to forward logs from OSSEC to Graylog. There is an official Graylog plugin to read OSSEC logs via TCP or UDP and you can get it here:

Follow the installation instructions in the linked repository.

Setting up a CEF input

After installing the CEF input plugin and restarting graylog-server, go to System -> Inputs in your Graylog Web Interface and start a new CEF UDP Input.

Remember the port you configure it to listen on. We’ll need it in the next step.

Configuring OSSEC

After starting the CEF UDP input in the previous step, open your OSSEC configuration file (usually located at /var/ossec/etc/ossec.conf) and add the following to the global <ossec_config> path:

<syslog_output>
    <server>graylog.example.org</server>
    <port>12000</port>
    <format>cef</format>
</syslog_output>

Make sure to configure the same port you have your Graylog UDP CEF input listen on.

You also need to enable the OSSEC syslog subsystem on most operating systems. On Linux, execute this command:

/var/ossec/bin/ossec-control enable client-syslog

Restart OSSEC and see if messages arrive.

/var/ossec/bin/ossec-control restart

Result

Now all OSSEC alerts should arrive in Graylog with nicely parsed and extracted fields:

About

How to write OSSEC alerts into Graylog

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors