Skip to main content

syslogcef

Python library to easily send CEF formatted messages to syslog server.

It uses cefevent to format message payloads and offer two strategies to send syslogs over the network: RFC 5424 or RFC 3164. RFC 5424 is the default.

Install:

pip install syslogcef

Test sending a few messages with:

python3 -m syslogcef.testmessages --host <host> --port <port> --proto [TCP|UDP]

Usage:

from syslogcef import SyslogCEFSender, Rfc3164SyslogSender

# Create syslog sender.
syslog = SyslogCEFSender(
    # Syslog server settings:
    host='10.1.2.3', 
    port='514', 
    protocol='TCP', 
    # Hopefully the above names does not clash with any CEF field name.
    # CEF fields applied to all events:
    deviceProduct='MyProgram', 
    deviceVendor='MyCompany',
    deviceVersion='1.0.2',
    # Overriding the default strategy to send syslog over the network with RFC 3164 format.
    # Do not specify this argument to use RFC 5424.
    syslog_sender_class=Rfc3164SyslogSender)

# Register CEF events.
syslog.register_event('100', name='CPU temp is OK', severity=0)
syslog.register_event('101', name='CPU temp is rising', severity=5)
syslog.register_event('102', name='CPU temp is too high', severity=9, 
    # CEF fields applied to all '102' events:
    reason="Exceeds 70 degres celsius")

# Send one syslog message.
syslog.send('102', message="The CPU temp is 88 degres celsius.", 
    # CEF fields applied only to this event:
    sourceHostName="mydevice.mydomain.com", 
    sourceMacAddress="00:00:ee:00:52:bb")

See cefevent for complete list of fields.

Read the full ArcSight CEF format for more informations.

Metadata

Release files for syslogcef 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for syslogcef 0.1.8
File Size Uploaded Provenance
syslogcef-0.1.8.tar.gz 5.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for syslogcef 0.1.8
File Interpreter ABI Platform
syslogcef-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / syslogcef-0.1.8.tar.gz

Download URL syslogcef-0.1.8.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
01d62ea155e491c82e3acd8e761af63a4462b6f8a11e07a56314820ecc7883b7
BLAKE2b-256 checksum
How to use checksums
c2b2279bfba73e4f0161ae9a886fe3318c7678f914aee2292a35bb4a6bc885c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / syslogcef-0.1.8-py3-none-any.whl

Download URL syslogcef-0.1.8-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3a0986aadecd4aef56fefe8947ebd8f5d0253648f221417dce1e385c482e32b
BLAKE2b-256 checksum
How to use checksums
81f75b8852b4121bde521bb8e4d5e8d3b7b966b8ccd7a049022165a9005b692b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for syslogcef 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page