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)
Built Distribution
Close
Hashes for syslogcef-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 618ded57a7d75272db9a0b19c96afacb69089f016dcac938c4f3c368475e57ad |
|
MD5 | a9b89812ff48865f9c99fb110a491bee |
|
BLAKE2b-256 | c59c93990d162c05ab68e3c03a33f0acb7b97a7341b207be2afcfa1f894349cd |