Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

No project description provided

Project description

format_cef

format_cef is a little helper library for producing ArcSight Common Event Format (CEF) compliant messages from structured arguments. You can use it like this:

>>> from format_cef import format_cef
>>> format_cef(
    'acme corp', 'TNT', 1.0, '404 | not found', 'Explosives not found', 10
    oextensions={'deviceAction': 'bang = !'})
'CEF:0|acme corp|TNT|1.0|404 \| not found|Explosives not found|10|act=bang \= !'

Notice how the format format_cef takes care of escaping deimiters correctly. It will also ensure that each CEF extension complies to the restrictions outlined in the CEF documentation.

This module deliberately remains agnostic as to the log message transport protocol (as does CEF itself). It is also designed to remain stateless so as to easy to test and use as a building block in larger systems.

Currently, the library only implements a subset of the permissable CEF extensions that were personally useful. I'm very happy to take PRs to extend coverage to the fully valid CEF extension set.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
format_cef-0.0.3.post1-py2.py3-none-any.whl (4.9 kB) Copy SHA256 hash SHA256 Wheel py2.py3
format_cef-0.0.3.post1.tar.gz (3.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page