Skip to main content

Python library to easily send CEF formatted messages to syslog server

Project description

syslogcef

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

It uses cefevent to format message payloads and rfc5424-logging-handler to send syslogs.

Install:

pip install syslogcef

Usage:

from syslogcef import SyslogCEFSender

syslog = SyslogCEFSender('10.1.2.3', '514', 'TCP', deviceProduct='MyProgram', deviceVersion='1.0.2')
syslog.register_event('100', 'CPU temp is OK', 0)
syslog.register_event('101', 'CPU temp is rising', 5)
syslog.register_event('102', 'CPU temp is too high', 9, reason="Exceeds 70 degres celsius")

syslog.send('102', message="The CPU temp is 88 degres celsius.", sourceHostName="mydevice.mydomain.com", sourceMacAddress="00:00:ee:00:52:bb")

See cefevent for complete list of fields.

Project details


Download files

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

Source Distribution

syslogcef-0.1.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

syslogcef-0.1.1-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page