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

Question about the buffer setting #343

Open
dpizzle opened this issue Oct 5, 2020 · 1 comment
Open

Question about the buffer setting #343

dpizzle opened this issue Oct 5, 2020 · 1 comment

Comments

@dpizzle
Copy link

dpizzle commented Oct 5, 2020

Hi, I am trying to suppress duplicate syslog messages with the buffer setting. I am struggling to enable the setting from the documentation. When I set it at the top level of the /etc/napalm/log file, I see the corresponding error in the log file.

/ # napalm-logs --version
napalm-logs 0.9.0

From - /etc/napalm/log

publisher:
  - zmq:
      error_whitelist:
        - OSPF_NEIGHBOR_DOWN
        - OSPF_NEIGHBOR_UP
disable_security: True
buffer:
  mem:
    expire_time: 30
napalm_logs_1  |   cfg = yaml.load(fstream)
napalm_logs_1  | Process Process-7:
napalm_logs_1  | Traceback (most recent call last):
napalm_logs_1  |   File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
napalm_logs_1  |     self.run()
napalm_logs_1  |   File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
napalm_logs_1  |     self._target(*self._args, **self._kwargs)
napalm_logs_1  |   File "/usr/lib/python3.6/site-packages/napalm_logs/server.py", line 296, in start
napalm_logs_1  |     message_key = base64.b64encode(message)
napalm_logs_1  |   File "/usr/lib/python3.6/base64.py", line 58, in b64encode
napalm_logs_1  |     encoded = binascii.b2a_base64(s, newline=False)
napalm_logs_1  | TypeError: a bytes-like object is required, not 'str'
@mirceaulinic
Copy link
Member

Hmm yeah, that's probably a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants