Skip to content

Invalid dictionary key #6

Description

@deezknuts

I have a napalm-logs server injesting syslogs from a test vmx. I'm using the default publisher for the napalm-log server (zmq). Everything from the napalm-log server looks correct. It gets the log from vmx and the formats the syslog message. I'm running a zmq client and see the structured log:

{'yang_message': {'bgp': {'neighbors': {'neighbor': {'192.168.140.254': {'state': {'peer_as': '4230'}, 'afi_safis': {'afi_safi': {'inet4': {'state': {'prefixes': {'received': 141}}, 'ipv4_unicast': {'prefix_limit': {'state': {'max_prefixes': 140}}}}}}}}}}}, 'message_details': {'processId': '2902', 'severity': 4, 'facility': 3, 'hostPrefix': None, 'pri': '28', 'processName': 'rpd', 'host': 'vmx01', 'tag': 'BGP_PREFIX_THRESH_EXCEEDED', 'time': '14:03:12', 'date': 'Jun 30', 'message': '192.168.140.254 (External AS 4230): Configured maximum prefix-limit threshold(140) exceeded for inet4-unicast nlri: 141 (instance master)'}, 'facility': 3, 'ip': '192.168.1.183', 'error': 'BGP_PREFIX_THRESH_EXCEEDED', 'host': 'vmx01', 'yang_model': 'openconfig-bgp', 'timestamp': 1593525792, 'os': 'junos', 'severity': 4}

I've installed Stackstorm with the napalm-logs pack. It connects to the napalm-log server fine and receives the message but it runs into this error:

2021-03-26 17:07:04,200 139728331118744 ERROR consumers [-] StagedQueueConsumer failed to process message: {'trigger': 'napalm_logs.log', 'payload': {b'host': b'vmx01', b'yang_message': {b'bgp': {b'neighbors': {b'neighbor': {b'192.168.140.254': {b'state': {b'peer_as': b'4230'}, b'afi_safis': {b'afi_safi': {b'inet4': {b'state': {b'prefixes': {b'received': 141}}, b'ipv4_unicast': {b'prefix_limit': {b'state': {b'max_prefixes': 140}}}}}}}}}}}, b'message_details': {b'processId': b'2902', b'facility': 3, b'hostPrefix': None, b'pri': b'28', b'processName': b'rpd', b'host': b'vmx01', b'tag': b'BGP_PREFIX_THRESH_EXCEEDED', b'time': b'14:03:12', b'date': b'Jun 30', b'message': b'192.168.140.254 (External AS 4230): Configured maximum prefix-limit threshold(140) exceeded for inet4-unicast nlri: 141 (instance master)', b'severity': 4}, b'timestamp': 1593525792, b'error': b'BGP_PREFIX_THRESH_EXCEEDED', b'ip': b'192.168.1.183', b'facility': 3, b'os': b'junos', b'yang_model': b'openconfig-bgp', b'severity': 4}, 'trace_context': None}
Traceback (most recent call last):
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/transport/consumers.py", line 86, in process
response = self._handler.pre_ack_process(body)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2reactor/rules/worker.py", line 57, in pre_ack_process
raise_on_no_trigger=True)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2reactor/container/utils.py", line 55, in create_trigger_instance
return TriggerInstance.add_or_update(trigger_instance)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/persistence/base.py", line 174, in add_or_update
model_object = cls._get_impl().add_or_update(model_object, validate=True)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/models/db/init.py", line 466, in add_or_update
instance.save(validate=validate)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/mongoengine/document.py", line 369, in save
self.validate(clean=clean)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/mongoengine/base/document.py", line 413, in validate
raise ValidationError(message, errors=errors)
mongoengine.errors.ValidationError: ValidationError (TriggerInstanceDB:None) (Invalid dictionary key - documents must have only string keys: ['payload'])

Any ideas what may be wrong?

This is all running on a single host with Centos7. Stackstorm is 3.4.1 on Python 3.6.8

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions