项目作者: napalm-automation

项目描述 :
遵循OpenConfig和IETF YANG模型的网络系统日志消息的跨供应商标准化
高级语言: Python
项目地址: git://github.com/napalm-automation/napalm-logs.git
创建时间: 2017-03-14T14:30:19Z
项目社区:https://github.com/napalm-automation/napalm-logs

开源协议:Apache License 2.0

下载


napalm-logs

napalm-logs is a Python library that listens to syslog messages from network
devices and returns structured data following the OpenConfig
or IETF YANG models.

The outgoing objects are published via ZeroMQ, Kafka, or other usual transport
options. It is easy enough to switch between transports and pluggable to add
others such as Google Datastore, RabbitMQ, etc.

Similarly, the syslog messages can be received via UDP, TCP, or different
services, such as Kafka, etc.

New platforms can be easily added, just referencing the path to the
YAML configuration file.

Requirements

  • PyYAML
  • PyZMQ
  • PyNaCl
  • u-msgpack-python

Output object example

  1. {
  2. "yang_message": {
  3. "bgp": {
  4. "neighbors": {
  5. "neighbor": {
  6. "192.168.140.254": {
  7. "state": {
  8. "peer_as": "65001"
  9. },
  10. "afi_safis": {
  11. "afi_safi": {
  12. "inet4": {
  13. "state": {
  14. "prefixes": {
  15. "received": 141
  16. }
  17. },
  18. "ipv4_unicast": {
  19. "prefix_limit": {
  20. "state": {
  21. "max_prefixes": 140
  22. }
  23. }
  24. }
  25. }
  26. }
  27. }
  28. }
  29. }
  30. }
  31. }
  32. },
  33. "message_details": {
  34. "processId": "2902",
  35. "facility": 18,
  36. "severity": 5,
  37. "hostPrefix": null,
  38. "pri": "149",
  39. "processName": "rpd",
  40. "host": "vmx01",
  41. "tag": "BGP_PREFIX_THRESH_EXCEEDED",
  42. "time": "14:03:12",
  43. "date": "Jun 21",
  44. "message": "192.168.140.254 (External AS 65001): Configured maximum prefix-limit threshold(140) exceeded for inet4-unicast nlri: 141 (instance master)"
  45. },
  46. "timestamp": 1498050192,
  47. "facility": 18,
  48. "ip": "127.0.0.1",
  49. "host": "vmx01",
  50. "yang_model": "openconfig-bgp",
  51. "error": "BGP_PREFIX_THRESH_EXCEEDED",
  52. "os": "junos",
  53. "severity": 5
  54. }

Documentation

Please check the official documentation for more detailed information.

Installation

  1. pip install napalm-logs