Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update junos_syslog.py #129

Merged
merged 1 commit into from
Jul 24, 2019
Merged

Update junos_syslog.py #129

merged 1 commit into from
Jul 24, 2019

Conversation

rsmekala
Copy link

@rsmekala rsmekala commented Jul 1, 2019

What does this PR do?

Call decode() function on input data before trying to parse it.

What issues does this PR fix or reference?

Fixes #126

Tests Results

Python2

[DEBUG   ] Sending event: tag = jnpr/syslog/R1_re0/UI_COMMIT_PROGRESS; data = {u'daemon': u'mgd', u'severity': 6, u'facility': 23, u'timestamp': '2019-07-01 11:34:38', u'hostname': u'R1_re0', u'pid': u'28641', u'_stamp': '2019-07-01T06:04:38.469718', u'priority': 190, u'raw': "<190>Jun 27 16:51:21 R1_re0 mgd[28641]: UI_COMMIT_PROGRESS: Commit operation in progress: signaling 'Alarm control process', pid 16483, signal 30, status 0 with notification errors enabled\n", u'hostip': '127.0.0.1', u'message': u"Commit operation in progress: signaling 'Alarm control process', pid 16483, signal 30, status 0 with notification errors enabled", u'event': u'UI_COMMIT_PROGRESS'}

Python3

[DEBUG   ] Junos Syslog - sending this event on the bus: {'priority': 190, 'severity': 6, 'facility': 23, 'timestamp': '2019-07-01 11:32:35', 'hostname': 'R1_re0', 'daemon': 'mgd', 'pid': '28641', 'message': "Commit operation in progress: signaling 'Alarm control process', pid 16483, signal 30, status 0 with notification errors enabled", 'event': 'UI_COMMIT_PROGRESS', 'raw': b"<190>Jun 27 16:51:21 R1_re0 mgd[28641]: UI_COMMIT_PROGRESS: Commit operation in progress: signaling 'Alarm control process', pid 16483, signal 30, status 0 with notification errors enabled\n", 'hostip': '127.0.0.1'} from 127.0.0.1

@rsmekala rsmekala requested a review from vnitinv July 1, 2019 06:05
@vnitinv vnitinv merged commit 95a2ce5 into 2019.2 Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants