--- Class[Gnmic].orig
+++ Class[Gnmic]
@@
- targets => {'asw1-b12-drmrs.mgmt.drmrs.wmnet:32767': {'subscriptions': ['interfaces-states', 'bgp', 'bgp-junos', 'alarms', 'bfd', 'system', 'system-mount-points', 'junos-optics', 'components-properties', 'junos-linecard-memory']}, 'asw1-b13-drmrs.mgmt.drmrs.wmnet:32767': {'subscriptions': ['interfaces-states', 'bgp', 'bgp-junos', 'alarms', 'bfd', 'system', 'system-mount-points', 'junos-optics', 'components-properties', 'junos-linecard-memory']}, 'cr1-drmrs.wikimedia.org:32767': {'subscriptions': ['interfaces-states', 'bgp', 'bgp-junos', 'alarms', 'bfd', 'system', 'system-mount-points', 'junos-optics', 'components-properties', 'junos-linecard-memory']}, 'cr2-drmrs.wikimedia.org:32767': {'subscriptions': ['interfaces-states', 'bgp', 'bgp-junos', 'alarms', 'bfd', 'system', 'system-mount-points', 'junos-optics', 'components-properties', 'junos-linecard-memory']}}
+ targets => {'asw1-b12-drmrs.mgmt.drmrs.wmnet:32767': {'subscriptions': ['interfaces-states', 'subint-states', 'bgp', 'bgp-junos', 'alarms', 'bfd', 'system', 'system-mount-points', 'junos-optics', 'components-properties', 'junos-linecard-memory']}, 'asw1-b13-drmrs.mgmt.drmrs.wmnet:32767': {'subscriptions': ['interfaces-states', 'subint-states', 'bgp', 'bgp-junos', 'alarms', 'bfd', 'system', 'system-mount-points', 'junos-optics', 'components-properties', 'junos-linecard-memory']}, 'cr1-drmrs.wikimedia.org:32767': {'subscriptions': ['interfaces-states', 'subint-states', 'bgp', 'bgp-junos', 'alarms', 'bfd', 'system', 'system-mount-points', 'junos-optics', 'components-properties', 'junos-linecard-memory']}, 'cr2-drmrs.wikimedia.org:32767': {'subscriptions': ['interfaces-states', 'subint-states', 'bgp', 'bgp-junos', 'alarms', 'bfd', 'system', 'system-mount-points', 'junos-optics', 'components-properties', 'junos-linecard-memory']}}
@@
- outputs => {'prom-output': {'type': 'prometheus', 'metric-prefix': 'gnmi', 'expiration': '300s', 'num-workers': 32, 'export-timestamps': True, 'timeout': '50s', 'event-processors': ['delete-tag-name', 'delete-value-name', 'description-to-tag', 'rename-interface-state', 'static-bgp-tags', 'rename-bgp-session-state', 'rename-bgp-global', 'rename-bgp-neighbor', 'rename-bgp-neighbor-tag', 'rename-bgp-neighbor-prefixes', 'rename-bgp-afi-safi', 'rename-bfd-session-state', 'rename-bfd-diagnostic-code', 'static-bfd-tags', 'rename-bfd-peer', 'rename-ospf-int-state', 'rename-ospf-adj-state', 'rename-nokia-ospf', 'rename-healthz-state', 'rename-components-properties-state']}}
+ outputs => {'prom-output': {'type': 'prometheus', 'metric-prefix': 'gnmi', 'expiration': '300s', 'num-workers': 32, 'export-timestamps': True, 'timeout': '50s', 'event-processors': ['drop-bad-subint', 'delete-tag-name', 'delete-value-name', 'description-to-tag', 'rename-interface-state', 'rewrite-subint-name', 'rename-subint-path', 'static-bgp-tags', 'rename-bgp-session-state', 'rename-bgp-global', 'rename-bgp-neighbor', 'rename-bgp-neighbor-tag', 'rename-bgp-neighbor-prefixes', 'rename-bgp-afi-safi', 'rename-bfd-session-state', 'rename-bfd-diagnostic-code', 'static-bfd-tags', 'rename-bfd-peer', 'rename-ospf-int-state', 'rename-ospf-adj-state', 'rename-nokia-ospf', 'rename-healthz-state', 'rename-components-properties-state']}}
@@
- subscriptions => {'junos-linecard-memory': {'prefix': 'openconfig:', 'paths': ['/junos/system/linecard/npu/memory'], 'stream-mode': 'sample', 'sample-interval': '60s'}, 'components-properties': {'prefix': 'openconfig:', 'paths': ['/components/component/properties/property/state/value'], 'stream-mode': 'sample', 'sample-interval': '60s'}, 'healthz': {'prefix': 'openconfig:', 'paths': ['/components/component/healthz/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'interfaces-states': {'prefix': 'openconfig:', 'paths': ['/interfaces/interface/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'bgp': {'prefix': 'openconfig:', 'paths': ['/network-instances/network-instance/protocols/protocol/bgp/global/state/total-paths', '/network-instances/network-instance/protocols/protocol/bgp/global/state/total-prefixes', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-as', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/description', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-group', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/last-established', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'bgp-junos': {'paths': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/interface-error'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'alarms': {'paths': ['/system/alarms/alarm/state/id'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'system': {'paths': ['/system/cpus/cpu/state', '/system/memory/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'system-mount-points': {'paths': ['/system/mount-points/mount-point/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'bfd': {'paths': ['/bfd/interfaces/interface/peers/peer/state/local-address', '/bfd/interfaces/interface/peers/peer/state/remote-address', '/bfd/interfaces/interface/peers/peer/state/session-state', '/bfd/interfaces/interface/peers/peer/state/remote-session-state', '/bfd/interfaces/interface/peers/peer/state/local-diagnostic-code', '/bfd/interfaces/interface/peers/peer/state/remote-diagnostic-code'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'junos-optics': {'paths': ['/junos/system/linecard/optics/'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'ospf-nokia': {'paths': ['/network-instance/protocols/ospf/instance/area/interface/oper-state', '/network-instance/protocols/ospf/instance/area/interface/neighbor-count', '/network-instance/protocols/ospf/instance/area/interface/neighbor/adjacency-state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}}
+ subscriptions => {'junos-linecard-memory': {'prefix': 'openconfig:', 'paths': ['/junos/system/linecard/npu/memory'], 'stream-mode': 'sample', 'sample-interval': '60s'}, 'components-properties': {'prefix': 'openconfig:', 'paths': ['/components/component/properties/property/state/value'], 'stream-mode': 'sample', 'sample-interval': '60s'}, 'healthz': {'prefix': 'openconfig:', 'paths': ['/components/component/healthz/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'interfaces-states': {'prefix': 'openconfig:', 'paths': ['/interfaces/interface/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'subint-states': {'prefix': 'openconfig:', 'paths': ['/interfaces/interface/subinterfaces/subinterface/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'bgp': {'prefix': 'openconfig:', 'paths': ['/network-instances/network-instance/protocols/protocol/bgp/global/state/total-paths', '/network-instances/network-instance/protocols/protocol/bgp/global/state/total-prefixes', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-as', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/description', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-group', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/last-established', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'bgp-junos': {'paths': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/interface-error'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'alarms': {'paths': ['/system/alarms/alarm/state/id'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'system': {'paths': ['/system/cpus/cpu/state', '/system/memory/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'system-mount-points': {'paths': ['/system/mount-points/mount-point/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'bfd': {'paths': ['/bfd/interfaces/interface/peers/peer/state/local-address', '/bfd/interfaces/interface/peers/peer/state/remote-address', '/bfd/interfaces/interface/peers/peer/state/session-state', '/bfd/interfaces/interface/peers/peer/state/remote-session-state', '/bfd/interfaces/interface/peers/peer/state/local-diagnostic-code', '/bfd/interfaces/interface/peers/peer/state/remote-diagnostic-code'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'junos-optics': {'paths': ['/junos/system/linecard/optics/'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'ospf-nokia': {'paths': ['/network-instance/protocols/ospf/instance/area/interface/oper-state', '/network-instance/protocols/ospf/instance/area/interface/neighbor-count', '/network-instance/protocols/ospf/instance/area/interface/neighbor/adjacency-state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}}
@@
- processors => {'delete-tag-name': {'event-delete': {'tag-names': ['^subscription-name']}}, 'delete-value-name': {'event-delete': {'value-names': ['.*(low|high)_(alarm|warning)_threshold(_dbm)?']}}, 'description-to-tag': {'event-value-tag-v2': {'rules': [{'value-name': '/interfaces/interface/state/description', 'tag-name': 'interface_description', 'consume': False}]}}, 'rename-components-properties-state': {'event-strings': {'value-names': ['/components/component/properties/property/state/value'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'TRUE', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'OK', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'Online', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'FALSE', 'new': '10'}}, {'replace': {'apply-on': 'value', 'old': 'Offline', 'new': '11'}}]}}, 'rename-healthz-state': {'event-strings': {'value-names': ['/components/component/healthz/state/status'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'HEALTHY', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'UNHEALTHY', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'UNSPECIFIED', 'new': '0'}}]}}, 'rename-interface-state': {'event-strings': {'value-names': ['/interfaces/interface/state/oper-status'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'UP', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'DOWN', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'TESTING', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'UNKNOWN', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'DORMANT', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'NOT_PRESENT', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'LOWER_LAYER_DOWN', 'new': '7'}}]}}, 'static-bgp-tags': {'event-value-tag-v2': {'rules': [{'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-as', 'tag-name': 'peer_as', 'consume': True}, {'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/description', 'tag-name': 'peer_descr', 'consume': True}, {'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type', 'tag-name': 'peer_type', 'consume': True}, {'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-group', 'tag-name': 'peer_group', 'consume': True}]}}, 'rename-bgp-session-state': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'IDLE', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'CONNECT', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'ACTIVE', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'OPENSENT', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'OPENCONFIRM', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'ESTABLISHED', 'new': '6'}}]}}, 'rename-bgp-global': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/global.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instances/network-instance/protocols/protocol/bgp/global/state', 'new': '/bgp'}}]}}, 'rename-bgp-neighbor': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state', 'new': '/bgp/neighbor'}}]}}, 'rename-bgp-neighbor-tag': {'event-strings': {'tag-names': ['neighbor_neighbor-address'], 'transforms': [{'trim-prefix': {'apply-on': 'name', 'prefix': 'neighbor_neighbor-'}}]}}, 'rename-bgp-neighbor-prefixes': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state', 'new': '/bgp/neighbor'}}]}}, 'rename-bgp-afi-safi': {'event-strings': {'tag-names': ['afi-safi_afi-safi-name'], 'transforms': [{'replace': {'apply-on': 'name', 'old': 'afi-safi_afi-safi-name', 'new': 'afi-safi'}}]}}, 'static-bfd-tags': {'event-value-tag-v2': {'rules': [{'value-name': '/bfd/interfaces/interface/peers/peer/state/local-address', 'tag-name': 'local_address', 'consume': True}, {'value-name': '/bfd/interfaces/interface/peers/peer/state/remote-address', 'tag-name': 'remote_address', 'consume': True}]}}, 'rename-bfd-session-state': {'event-strings': {'value-names': ['/bfd/interfaces/interface/peers/peer/state/session-state', '/bfd/interfaces/interface/peers/peer/state/remote-session-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'ADMIN_DOWN', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'DOWN', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'INIT', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'UP', 'new': '4'}}]}}, 'rename-bfd-diagnostic-code': {'event-strings': {'value-names': ['/bfd/interfaces/interface/peers/peer/state/local-diagnostic-code', '/bfd/interfaces/interface/peers/peer/state/remote-diagnostic-code'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'NO_DIAGNOSTIC', 'new': '0'}}, {'replace': {'apply-on': 'value', 'old': 'DETECTION_TIMEOUT', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'ECHO_FAILED', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'FORWARDING_RESET', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'PATH_DOWN', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'CONCATENATED_PATH_DOWN', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'ADMIN_DOWN', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'REVERSE_CONCATENATED_PATH_DOWN', 'new': '7'}}, {'replace': {'apply-on': 'value', 'old': 'NEIGHBOR_DOWN', 'new': '8'}}]}}, 'rename-bfd-peer': {'event-strings': {'value-names': ['/bfd/interfaces/interface/peers/peer/state.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/bfd/interfaces/interface/peers/peer/state', 'new': '/bfd/peer'}}]}}, 'rename-ospf-int-state': {'event-strings': {'value-names': ['/network-instance/protocols/ospf/instance/area/interface/oper-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'down', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'loopback', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'waiting', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'point-to-point', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'designated-router', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'backup-designated-router', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'other-designated-router', 'new': '7'}}]}}, 'rename-ospf-adj-state': {'event-strings': {'value-names': ['/network-instance/protocols/ospf/instance/area/interface/neighbor/adjacency-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'down', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'attempt', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'init', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'two-way', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'exstart', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'exchange', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'loading', 'new': '7'}}, {'replace': {'apply-on': 'value', 'old': 'full', 'new': '8'}}]}}, 'rename-nokia-ospf': {'event-strings': {'value-names': ['/network-instance/protocols/ospf/instance/area/interface.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instance/protocols/ospf/instance/area/interface', 'new': '/nokia-ospf'}}]}}}
+ processors => {'delete-tag-name': {'event-delete': {'tag-names': ['^subscription-name']}}, 'delete-value-name': {'event-delete': {'value-names': ['.*(low|high)_(alarm|warning)_threshold(_dbm)?']}}, 'description-to-tag': {'event-value-tag-v2': {'rules': [{'value-name': '/interfaces/interface/state/description', 'tag-name': 'interface_description', 'consume': False}]}}, 'rename-components-properties-state': {'event-strings': {'value-names': ['/components/component/properties/property/state/value'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'TRUE', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'OK', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'Online', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'FALSE', 'new': '10'}}, {'replace': {'apply-on': 'value', 'old': 'Offline', 'new': '11'}}]}}, 'rename-healthz-state': {'event-strings': {'value-names': ['/components/component/healthz/state/status'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'HEALTHY', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'UNHEALTHY', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'UNSPECIFIED', 'new': '0'}}]}}, 'rename-interface-state': {'event-strings': {'value-names': ['/interfaces/interface/state/oper-status'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'UP', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'DOWN', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'TESTING', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'UNKNOWN', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'DORMANT', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'NOT_PRESENT', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'LOWER_LAYER_DOWN', 'new': '7'}}]}}, 'static-bgp-tags': {'event-value-tag-v2': {'rules': [{'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-as', 'tag-name': 'peer_as', 'consume': True}, {'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/description', 'tag-name': 'peer_descr', 'consume': True}, {'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type', 'tag-name': 'peer_type', 'consume': True}, {'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-group', 'tag-name': 'peer_group', 'consume': True}]}}, 'rename-bgp-session-state': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'IDLE', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'CONNECT', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'ACTIVE', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'OPENSENT', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'OPENCONFIRM', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'ESTABLISHED', 'new': '6'}}]}}, 'rename-bgp-global': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/global.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instances/network-instance/protocols/protocol/bgp/global/state', 'new': '/bgp'}}]}}, 'rename-bgp-neighbor': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state', 'new': '/bgp/neighbor'}}]}}, 'rename-bgp-neighbor-tag': {'event-strings': {'tag-names': ['neighbor_neighbor-address'], 'transforms': [{'trim-prefix': {'apply-on': 'name', 'prefix': 'neighbor_neighbor-'}}]}}, 'rename-bgp-neighbor-prefixes': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state', 'new': '/bgp/neighbor'}}]}}, 'rename-bgp-afi-safi': {'event-strings': {'tag-names': ['afi-safi_afi-safi-name'], 'transforms': [{'replace': {'apply-on': 'name', 'old': 'afi-safi_afi-safi-name', 'new': 'afi-safi'}}]}}, 'static-bfd-tags': {'event-value-tag-v2': {'rules': [{'value-name': '/bfd/interfaces/interface/peers/peer/state/local-address', 'tag-name': 'local_address', 'consume': True}, {'value-name': '/bfd/interfaces/interface/peers/peer/state/remote-address', 'tag-name': 'remote_address', 'consume': True}]}}, 'rename-bfd-session-state': {'event-strings': {'value-names': ['/bfd/interfaces/interface/peers/peer/state/session-state', '/bfd/interfaces/interface/peers/peer/state/remote-session-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'ADMIN_DOWN', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'DOWN', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'INIT', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'UP', 'new': '4'}}]}}, 'rename-bfd-diagnostic-code': {'event-strings': {'value-names': ['/bfd/interfaces/interface/peers/peer/state/local-diagnostic-code', '/bfd/interfaces/interface/peers/peer/state/remote-diagnostic-code'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'NO_DIAGNOSTIC', 'new': '0'}}, {'replace': {'apply-on': 'value', 'old': 'DETECTION_TIMEOUT', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'ECHO_FAILED', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'FORWARDING_RESET', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'PATH_DOWN', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'CONCATENATED_PATH_DOWN', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'ADMIN_DOWN', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'REVERSE_CONCATENATED_PATH_DOWN', 'new': '7'}}, {'replace': {'apply-on': 'value', 'old': 'NEIGHBOR_DOWN', 'new': '8'}}]}}, 'rename-bfd-peer': {'event-strings': {'value-names': ['/bfd/interfaces/interface/peers/peer/state.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/bfd/interfaces/interface/peers/peer/state', 'new': '/bfd/peer'}}]}}, 'rename-ospf-int-state': {'event-strings': {'value-names': ['/network-instance/protocols/ospf/instance/area/interface/oper-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'down', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'loopback', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'waiting', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'point-to-point', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'designated-router', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'backup-designated-router', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'other-designated-router', 'new': '7'}}]}}, 'rename-ospf-adj-state': {'event-strings': {'value-names': ['/network-instance/protocols/ospf/instance/area/interface/neighbor/adjacency-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'down', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'attempt', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'init', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'two-way', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'exstart', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'exchange', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'loading', 'new': '7'}}, {'replace': {'apply-on': 'value', 'old': 'full', 'new': '8'}}]}}, 'rename-nokia-ospf': {'event-strings': {'value-names': ['/network-instance/protocols/ospf/instance/area/interface.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instance/protocols/ospf/instance/area/interface', 'new': '/nokia-ospf'}}]}}, 'drop-bad-subint': {'event-drop': {'condition': '.tags.subinterface_index == "32767"'}}, 'rewrite-subint-name': {'event-jq': {'expression': 'map(if .tags.subinterface_index then .tags.interface_name += "." + .tags.subinterface_index end)'}}, 'rename-subint-path': {'event-strings': {'value-names': ['/interfaces/interface/subinterfaces/subinterface/state/.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/interfaces/interface/subinterfaces/subinterface/state/', 'new': '/interfaces/interface/state/'}}]}}}
Class[Profile::Gnmi_telemetry]
- Parameters differences:
--- Class[Profile::Gnmi_telemetry].orig
+++ Class[Profile::Gnmi_telemetry]
@@
- subscriptions => {'junos-linecard-memory': {'prefix': 'openconfig:', 'paths': ['/junos/system/linecard/npu/memory'], 'stream-mode': 'sample', 'sample-interval': '60s'}, 'components-properties': {'prefix': 'openconfig:', 'paths': ['/components/component/properties/property/state/value'], 'stream-mode': 'sample', 'sample-interval': '60s'}, 'healthz': {'prefix': 'openconfig:', 'paths': ['/components/component/healthz/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'interfaces-states': {'prefix': 'openconfig:', 'paths': ['/interfaces/interface/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'bgp': {'prefix': 'openconfig:', 'paths': ['/network-instances/network-instance/protocols/protocol/bgp/global/state/total-paths', '/network-instances/network-instance/protocols/protocol/bgp/global/state/total-prefixes', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-as', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/description', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-group', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/last-established', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'bgp-junos': {'paths': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/interface-error'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'alarms': {'paths': ['/system/alarms/alarm/state/id'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'system': {'paths': ['/system/cpus/cpu/state', '/system/memory/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'system-mount-points': {'paths': ['/system/mount-points/mount-point/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'bfd': {'paths': ['/bfd/interfaces/interface/peers/peer/state/local-address', '/bfd/interfaces/interface/peers/peer/state/remote-address', '/bfd/interfaces/interface/peers/peer/state/session-state', '/bfd/interfaces/interface/peers/peer/state/remote-session-state', '/bfd/interfaces/interface/peers/peer/state/local-diagnostic-code', '/bfd/interfaces/interface/peers/peer/state/remote-diagnostic-code'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'junos-optics': {'paths': ['/junos/system/linecard/optics/'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'ospf-nokia': {'paths': ['/network-instance/protocols/ospf/instance/area/interface/oper-state', '/network-instance/protocols/ospf/instance/area/interface/neighbor-count', '/network-instance/protocols/ospf/instance/area/interface/neighbor/adjacency-state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}}
+ subscriptions => {'junos-linecard-memory': {'prefix': 'openconfig:', 'paths': ['/junos/system/linecard/npu/memory'], 'stream-mode': 'sample', 'sample-interval': '60s'}, 'components-properties': {'prefix': 'openconfig:', 'paths': ['/components/component/properties/property/state/value'], 'stream-mode': 'sample', 'sample-interval': '60s'}, 'healthz': {'prefix': 'openconfig:', 'paths': ['/components/component/healthz/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'interfaces-states': {'prefix': 'openconfig:', 'paths': ['/interfaces/interface/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'subint-states': {'prefix': 'openconfig:', 'paths': ['/interfaces/interface/subinterfaces/subinterface/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'bgp': {'prefix': 'openconfig:', 'paths': ['/network-instances/network-instance/protocols/protocol/bgp/global/state/total-paths', '/network-instances/network-instance/protocols/protocol/bgp/global/state/total-prefixes', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-as', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/description', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-group', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/established-transitions', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/last-established', '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'bgp-junos': {'paths': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/interface-error'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'alarms': {'paths': ['/system/alarms/alarm/state/id'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'system': {'paths': ['/system/cpus/cpu/state', '/system/memory/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'system-mount-points': {'paths': ['/system/mount-points/mount-point/state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'bfd': {'paths': ['/bfd/interfaces/interface/peers/peer/state/local-address', '/bfd/interfaces/interface/peers/peer/state/remote-address', '/bfd/interfaces/interface/peers/peer/state/session-state', '/bfd/interfaces/interface/peers/peer/state/remote-session-state', '/bfd/interfaces/interface/peers/peer/state/local-diagnostic-code', '/bfd/interfaces/interface/peers/peer/state/remote-diagnostic-code'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'junos-optics': {'paths': ['/junos/system/linecard/optics/'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}, 'ospf-nokia': {'paths': ['/network-instance/protocols/ospf/instance/area/interface/oper-state', '/network-instance/protocols/ospf/instance/area/interface/neighbor-count', '/network-instance/protocols/ospf/instance/area/interface/neighbor/adjacency-state'], 'stream-mode': 'sample', 'sample-interval': '60s', 'encoding': 'proto'}}
@@
- outputs => {'prom-output': {'type': 'prometheus', 'metric-prefix': 'gnmi', 'expiration': '300s', 'num-workers': 32, 'export-timestamps': True, 'timeout': '50s', 'event-processors': ['delete-tag-name', 'delete-value-name', 'description-to-tag', 'rename-interface-state', 'static-bgp-tags', 'rename-bgp-session-state', 'rename-bgp-global', 'rename-bgp-neighbor', 'rename-bgp-neighbor-tag', 'rename-bgp-neighbor-prefixes', 'rename-bgp-afi-safi', 'rename-bfd-session-state', 'rename-bfd-diagnostic-code', 'static-bfd-tags', 'rename-bfd-peer', 'rename-ospf-int-state', 'rename-ospf-adj-state', 'rename-nokia-ospf', 'rename-healthz-state', 'rename-components-properties-state']}}
+ outputs => {'prom-output': {'type': 'prometheus', 'metric-prefix': 'gnmi', 'expiration': '300s', 'num-workers': 32, 'export-timestamps': True, 'timeout': '50s', 'event-processors': ['drop-bad-subint', 'delete-tag-name', 'delete-value-name', 'description-to-tag', 'rename-interface-state', 'rewrite-subint-name', 'rename-subint-path', 'static-bgp-tags', 'rename-bgp-session-state', 'rename-bgp-global', 'rename-bgp-neighbor', 'rename-bgp-neighbor-tag', 'rename-bgp-neighbor-prefixes', 'rename-bgp-afi-safi', 'rename-bfd-session-state', 'rename-bfd-diagnostic-code', 'static-bfd-tags', 'rename-bfd-peer', 'rename-ospf-int-state', 'rename-ospf-adj-state', 'rename-nokia-ospf', 'rename-healthz-state', 'rename-components-properties-state']}}
@@
- processors => {'delete-tag-name': {'event-delete': {'tag-names': ['^subscription-name']}}, 'delete-value-name': {'event-delete': {'value-names': ['.*(low|high)_(alarm|warning)_threshold(_dbm)?']}}, 'description-to-tag': {'event-value-tag-v2': {'rules': [{'value-name': '/interfaces/interface/state/description', 'tag-name': 'interface_description', 'consume': False}]}}, 'rename-components-properties-state': {'event-strings': {'value-names': ['/components/component/properties/property/state/value'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'TRUE', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'OK', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'Online', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'FALSE', 'new': '10'}}, {'replace': {'apply-on': 'value', 'old': 'Offline', 'new': '11'}}]}}, 'rename-healthz-state': {'event-strings': {'value-names': ['/components/component/healthz/state/status'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'HEALTHY', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'UNHEALTHY', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'UNSPECIFIED', 'new': '0'}}]}}, 'rename-interface-state': {'event-strings': {'value-names': ['/interfaces/interface/state/oper-status'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'UP', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'DOWN', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'TESTING', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'UNKNOWN', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'DORMANT', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'NOT_PRESENT', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'LOWER_LAYER_DOWN', 'new': '7'}}]}}, 'static-bgp-tags': {'event-value-tag-v2': {'rules': [{'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-as', 'tag-name': 'peer_as', 'consume': True}, {'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/description', 'tag-name': 'peer_descr', 'consume': True}, {'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type', 'tag-name': 'peer_type', 'consume': True}, {'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-group', 'tag-name': 'peer_group', 'consume': True}]}}, 'rename-bgp-session-state': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'IDLE', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'CONNECT', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'ACTIVE', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'OPENSENT', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'OPENCONFIRM', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'ESTABLISHED', 'new': '6'}}]}}, 'rename-bgp-global': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/global.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instances/network-instance/protocols/protocol/bgp/global/state', 'new': '/bgp'}}]}}, 'rename-bgp-neighbor': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state', 'new': '/bgp/neighbor'}}]}}, 'rename-bgp-neighbor-tag': {'event-strings': {'tag-names': ['neighbor_neighbor-address'], 'transforms': [{'trim-prefix': {'apply-on': 'name', 'prefix': 'neighbor_neighbor-'}}]}}, 'rename-bgp-neighbor-prefixes': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state', 'new': '/bgp/neighbor'}}]}}, 'rename-bgp-afi-safi': {'event-strings': {'tag-names': ['afi-safi_afi-safi-name'], 'transforms': [{'replace': {'apply-on': 'name', 'old': 'afi-safi_afi-safi-name', 'new': 'afi-safi'}}]}}, 'static-bfd-tags': {'event-value-tag-v2': {'rules': [{'value-name': '/bfd/interfaces/interface/peers/peer/state/local-address', 'tag-name': 'local_address', 'consume': True}, {'value-name': '/bfd/interfaces/interface/peers/peer/state/remote-address', 'tag-name': 'remote_address', 'consume': True}]}}, 'rename-bfd-session-state': {'event-strings': {'value-names': ['/bfd/interfaces/interface/peers/peer/state/session-state', '/bfd/interfaces/interface/peers/peer/state/remote-session-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'ADMIN_DOWN', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'DOWN', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'INIT', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'UP', 'new': '4'}}]}}, 'rename-bfd-diagnostic-code': {'event-strings': {'value-names': ['/bfd/interfaces/interface/peers/peer/state/local-diagnostic-code', '/bfd/interfaces/interface/peers/peer/state/remote-diagnostic-code'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'NO_DIAGNOSTIC', 'new': '0'}}, {'replace': {'apply-on': 'value', 'old': 'DETECTION_TIMEOUT', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'ECHO_FAILED', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'FORWARDING_RESET', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'PATH_DOWN', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'CONCATENATED_PATH_DOWN', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'ADMIN_DOWN', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'REVERSE_CONCATENATED_PATH_DOWN', 'new': '7'}}, {'replace': {'apply-on': 'value', 'old': 'NEIGHBOR_DOWN', 'new': '8'}}]}}, 'rename-bfd-peer': {'event-strings': {'value-names': ['/bfd/interfaces/interface/peers/peer/state.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/bfd/interfaces/interface/peers/peer/state', 'new': '/bfd/peer'}}]}}, 'rename-ospf-int-state': {'event-strings': {'value-names': ['/network-instance/protocols/ospf/instance/area/interface/oper-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'down', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'loopback', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'waiting', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'point-to-point', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'designated-router', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'backup-designated-router', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'other-designated-router', 'new': '7'}}]}}, 'rename-ospf-adj-state': {'event-strings': {'value-names': ['/network-instance/protocols/ospf/instance/area/interface/neighbor/adjacency-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'down', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'attempt', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'init', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'two-way', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'exstart', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'exchange', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'loading', 'new': '7'}}, {'replace': {'apply-on': 'value', 'old': 'full', 'new': '8'}}]}}, 'rename-nokia-ospf': {'event-strings': {'value-names': ['/network-instance/protocols/ospf/instance/area/interface.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instance/protocols/ospf/instance/area/interface', 'new': '/nokia-ospf'}}]}}}
+ processors => {'delete-tag-name': {'event-delete': {'tag-names': ['^subscription-name']}}, 'delete-value-name': {'event-delete': {'value-names': ['.*(low|high)_(alarm|warning)_threshold(_dbm)?']}}, 'description-to-tag': {'event-value-tag-v2': {'rules': [{'value-name': '/interfaces/interface/state/description', 'tag-name': 'interface_description', 'consume': False}]}}, 'rename-components-properties-state': {'event-strings': {'value-names': ['/components/component/properties/property/state/value'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'TRUE', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'OK', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'Online', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'FALSE', 'new': '10'}}, {'replace': {'apply-on': 'value', 'old': 'Offline', 'new': '11'}}]}}, 'rename-healthz-state': {'event-strings': {'value-names': ['/components/component/healthz/state/status'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'HEALTHY', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'UNHEALTHY', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'UNSPECIFIED', 'new': '0'}}]}}, 'rename-interface-state': {'event-strings': {'value-names': ['/interfaces/interface/state/oper-status'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'UP', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'DOWN', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'TESTING', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'UNKNOWN', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'DORMANT', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'NOT_PRESENT', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'LOWER_LAYER_DOWN', 'new': '7'}}]}}, 'static-bgp-tags': {'event-value-tag-v2': {'rules': [{'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-as', 'tag-name': 'peer_as', 'consume': True}, {'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/description', 'tag-name': 'peer_descr', 'consume': True}, {'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-type', 'tag-name': 'peer_type', 'consume': True}, {'value-name': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/peer-group', 'tag-name': 'peer_group', 'consume': True}]}}, 'rename-bgp-session-state': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'IDLE', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'CONNECT', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'ACTIVE', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'OPENSENT', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'OPENCONFIRM', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'ESTABLISHED', 'new': '6'}}]}}, 'rename-bgp-global': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/global.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instances/network-instance/protocols/protocol/bgp/global/state', 'new': '/bgp'}}]}}, 'rename-bgp-neighbor': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state', 'new': '/bgp/neighbor'}}]}}, 'rename-bgp-neighbor-tag': {'event-strings': {'tag-names': ['neighbor_neighbor-address'], 'transforms': [{'trim-prefix': {'apply-on': 'name', 'prefix': 'neighbor_neighbor-'}}]}}, 'rename-bgp-neighbor-prefixes': {'event-strings': {'value-names': ['/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state', 'new': '/bgp/neighbor'}}]}}, 'rename-bgp-afi-safi': {'event-strings': {'tag-names': ['afi-safi_afi-safi-name'], 'transforms': [{'replace': {'apply-on': 'name', 'old': 'afi-safi_afi-safi-name', 'new': 'afi-safi'}}]}}, 'static-bfd-tags': {'event-value-tag-v2': {'rules': [{'value-name': '/bfd/interfaces/interface/peers/peer/state/local-address', 'tag-name': 'local_address', 'consume': True}, {'value-name': '/bfd/interfaces/interface/peers/peer/state/remote-address', 'tag-name': 'remote_address', 'consume': True}]}}, 'rename-bfd-session-state': {'event-strings': {'value-names': ['/bfd/interfaces/interface/peers/peer/state/session-state', '/bfd/interfaces/interface/peers/peer/state/remote-session-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'ADMIN_DOWN', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'DOWN', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'INIT', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'UP', 'new': '4'}}]}}, 'rename-bfd-diagnostic-code': {'event-strings': {'value-names': ['/bfd/interfaces/interface/peers/peer/state/local-diagnostic-code', '/bfd/interfaces/interface/peers/peer/state/remote-diagnostic-code'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'NO_DIAGNOSTIC', 'new': '0'}}, {'replace': {'apply-on': 'value', 'old': 'DETECTION_TIMEOUT', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'ECHO_FAILED', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'FORWARDING_RESET', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'PATH_DOWN', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'CONCATENATED_PATH_DOWN', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'ADMIN_DOWN', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'REVERSE_CONCATENATED_PATH_DOWN', 'new': '7'}}, {'replace': {'apply-on': 'value', 'old': 'NEIGHBOR_DOWN', 'new': '8'}}]}}, 'rename-bfd-peer': {'event-strings': {'value-names': ['/bfd/interfaces/interface/peers/peer/state.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/bfd/interfaces/interface/peers/peer/state', 'new': '/bfd/peer'}}]}}, 'rename-ospf-int-state': {'event-strings': {'value-names': ['/network-instance/protocols/ospf/instance/area/interface/oper-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'down', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'loopback', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'waiting', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'point-to-point', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'designated-router', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'backup-designated-router', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'other-designated-router', 'new': '7'}}]}}, 'rename-ospf-adj-state': {'event-strings': {'value-names': ['/network-instance/protocols/ospf/instance/area/interface/neighbor/adjacency-state'], 'transforms': [{'replace': {'apply-on': 'value', 'old': 'down', 'new': '1'}}, {'replace': {'apply-on': 'value', 'old': 'attempt', 'new': '2'}}, {'replace': {'apply-on': 'value', 'old': 'init', 'new': '3'}}, {'replace': {'apply-on': 'value', 'old': 'two-way', 'new': '4'}}, {'replace': {'apply-on': 'value', 'old': 'exstart', 'new': '5'}}, {'replace': {'apply-on': 'value', 'old': 'exchange', 'new': '6'}}, {'replace': {'apply-on': 'value', 'old': 'loading', 'new': '7'}}, {'replace': {'apply-on': 'value', 'old': 'full', 'new': '8'}}]}}, 'rename-nokia-ospf': {'event-strings': {'value-names': ['/network-instance/protocols/ospf/instance/area/interface.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/network-instance/protocols/ospf/instance/area/interface', 'new': '/nokia-ospf'}}]}}, 'drop-bad-subint': {'event-drop': {'condition': '.tags.subinterface_index == "32767"'}}, 'rewrite-subint-name': {'event-jq': {'expression': 'map(if .tags.subinterface_index then .tags.interface_name += "." + .tags.subinterface_index end)'}}, 'rename-subint-path': {'event-strings': {'value-names': ['/interfaces/interface/subinterfaces/subinterface/state/.*'], 'transforms': [{'replace': {'apply-on': 'name', 'old': '/interfaces/interface/subinterfaces/subinterface/state/', 'new': '/interfaces/interface/state/'}}]}}}
@@
- targets_sub => {'juniper': ['interfaces-states', 'bgp', 'bgp-junos', 'alarms', 'bfd', 'system', 'system-mount-points', 'junos-optics', 'components-properties', 'junos-linecard-memory'], 'nokia': ['interfaces-states', 'bgp', 'ospf-nokia', 'system']}
+ targets_sub => {'juniper': ['interfaces-states', 'subint-states', 'bgp', 'bgp-junos', 'alarms', 'bfd', 'system', 'system-mount-points', 'junos-optics', 'components-properties', 'junos-linecard-memory'], 'nokia': ['interfaces-states', 'subint-states', 'bgp', 'ospf-nokia', 'system']}
- File[/etc/gnmic.yaml]
- Content differences:
--- /etc/gnmic.yaml.orig
+++ /etc/gnmic.yaml
@@ -3,6 +3,7 @@
asw1-b12-drmrs.mgmt.drmrs.wmnet:32767:
subscriptions:
- interfaces-states
+ - subint-states
- bgp
- bgp-junos
- alarms
@@ -15,6 +16,7 @@
asw1-b13-drmrs.mgmt.drmrs.wmnet:32767:
subscriptions:
- interfaces-states
+ - subint-states
- bgp
- bgp-junos
- alarms
@@ -27,6 +29,7 @@
cr1-drmrs.wikimedia.org:32767:
subscriptions:
- interfaces-states
+ - subint-states
- bgp
- bgp-junos
- alarms
@@ -39,6 +42,7 @@
cr2-drmrs.wikimedia.org:32767:
subscriptions:
- interfaces-states
+ - subint-states
- bgp
- bgp-junos
- alarms
@@ -59,10 +63,13 @@
export-timestamps: true
timeout: 50s
event-processors:
+ - drop-bad-subint
- delete-tag-name
- delete-value-name
- description-to-tag
- rename-interface-state
+ - rewrite-subint-name
+ - rename-subint-path
- static-bgp-tags
- rename-bgp-session-state
- rename-bgp-global
@@ -106,6 +113,13 @@
stream-mode: sample
sample-interval: 60s
encoding: proto
+ subint-states:
+ prefix: 'openconfig:'
+ paths:
+ - "/interfaces/interface/subinterfaces/subinterface/state"
+ stream-mode: sample
+ sample-interval: 60s
+ encoding: proto
bgp:
prefix: 'openconfig:'
paths:
@@ -511,6 +525,22 @@
apply-on: name
old: "/network-instance/protocols/ospf/instance/area/interface"
new: "/nokia-ospf"
+ drop-bad-subint:
+ event-drop:
+ condition: .tags.subinterface_index == "32767"
+ rewrite-subint-name:
+ event-jq:
+ expression: map(if .tags.subinterface_index then .tags.interface_name += "."
+ + .tags.subinterface_index end)
+ rename-subint-path:
+ event-strings:
+ value-names:
+ - "/interfaces/interface/subinterfaces/subinterface/state/.*"
+ transforms:
+ - replace:
+ apply-on: name
+ old: "/interfaces/interface/subinterfaces/subinterface/state/"
+ new: "/interfaces/interface/state/"
tls-ca: "/usr/local/share/ca-certificates/network_devices_bundle.crt"
api-server:
enable-metrics: true
Relevant files