Files
arista-evpn-vxlan-clab/monitoring/gnmic/gnmic.yaml

324 lines
8.9 KiB
YAML

# gNMIc configuration for Arista EVPN-VXLAN fabric
# Enhanced with VXLAN-specific telemetry via Vxlan1 interface
# Paths verified for Arista cEOS 4.35 compatibility
#
# Usage:
# gnmic subscribe --config /path/to/gnmic.yaml
#
# Test connectivity:
# gnmic -a 172.16.0.1:6030 -u admin -p admin --insecure capabilities
#
# Debug subscriptions:
# gnmic -a 172.16.0.25:6030 -u admin -p admin --insecure \
# get --path /interfaces/interface[name=Vxlan1]
# ============================================================================
# Global settings
# ============================================================================
username: admin
password: admin
insecure: true
encoding: json_ietf
log: true
debug: false
timeout: 30s
retry: 10s
# ============================================================================
# Target devices - All switches in the fabric
# ============================================================================
targets:
# --------------------------------------------------------------------------
# Spine switches (AS 65000) - No VXLAN subscription needed
# --------------------------------------------------------------------------
spine1:
address: 172.16.0.1:6030
subscriptions:
- interfaces
- system
- bgp
labels:
role: spine
fabric_tier: spine
device: spine1
asn: "65000"
spine2:
address: 172.16.0.2:6030
subscriptions:
- interfaces
- system
- bgp
labels:
role: spine
fabric_tier: spine
device: spine2
asn: "65000"
# --------------------------------------------------------------------------
# Leaf switches - VTEP1 (AS 65001) - Include VXLAN subscription
# --------------------------------------------------------------------------
leaf1:
address: 172.16.0.25:6030
subscriptions:
- interfaces
- system
- bgp
- lacp
- vxlan
labels:
role: leaf
fabric_tier: leaf
vtep: vtep1
mlag_pair: "1"
device: leaf1
asn: "65001"
leaf2:
address: 172.16.0.50:6030
subscriptions:
- interfaces
- system
- bgp
- lacp
- vxlan
labels:
role: leaf
fabric_tier: leaf
vtep: vtep1
mlag_pair: "1"
device: leaf2
asn: "65001"
# --------------------------------------------------------------------------
# Leaf switches - VTEP2 (AS 65002)
# --------------------------------------------------------------------------
leaf3:
address: 172.16.0.27:6030
subscriptions:
- interfaces
- system
- bgp
- lacp
- vxlan
labels:
role: leaf
fabric_tier: leaf
vtep: vtep2
mlag_pair: "2"
device: leaf3
asn: "65002"
leaf4:
address: 172.16.0.28:6030
subscriptions:
- interfaces
- system
- bgp
- lacp
- vxlan
labels:
role: leaf
fabric_tier: leaf
vtep: vtep2
mlag_pair: "2"
device: leaf4
asn: "65002"
# --------------------------------------------------------------------------
# Leaf switches - VTEP3 (AS 65003)
# --------------------------------------------------------------------------
leaf5:
address: 172.16.0.29:6030
subscriptions:
- interfaces
- system
- bgp
- lacp
- vxlan
labels:
role: leaf
fabric_tier: leaf
vtep: vtep3
mlag_pair: "3"
device: leaf5
asn: "65003"
leaf6:
address: 172.16.0.30:6030
subscriptions:
- interfaces
- system
- bgp
- lacp
- vxlan
labels:
role: leaf
fabric_tier: leaf
vtep: vtep3
mlag_pair: "3"
device: leaf6
asn: "65003"
# --------------------------------------------------------------------------
# Leaf switches - VTEP4 (AS 65004)
# --------------------------------------------------------------------------
leaf7:
address: 172.16.0.31:6030
subscriptions:
- interfaces
- system
- bgp
- lacp
- vxlan
labels:
role: leaf
fabric_tier: leaf
vtep: vtep4
mlag_pair: "4"
device: leaf7
asn: "65004"
leaf8:
address: 172.16.0.32:6030
subscriptions:
- interfaces
- system
- bgp
- lacp
- vxlan
labels:
role: leaf
fabric_tier: leaf
vtep: vtep4
mlag_pair: "4"
device: leaf8
asn: "65004"
# ============================================================================
# Subscriptions - define what telemetry to collect
# Paths verified for Arista cEOS OpenConfig + native augmentations
# ============================================================================
subscriptions:
# --------------------------------------------------------------------------
# Interface statistics - for Flow Plugin bandwidth visualization
# Includes all interfaces (Ethernet + Vxlan1)
# --------------------------------------------------------------------------
interfaces:
paths:
# Interface state and counters - VERIFIED WORKING
- /interfaces/interface/state/counters
- /interfaces/interface/state/oper-status
- /interfaces/interface/state/admin-status
# Interface configuration for metadata
- /interfaces/interface/config
# Ethernet-specific counters
- /interfaces/interface/ethernet/state
mode: stream
stream-mode: sample
sample-interval: 10s
encoding: json_ietf
# --------------------------------------------------------------------------
# VXLAN-specific telemetry - Arista augmented interface data
# Captures VNI-to-VLAN mappings, source interface, UDP port
# VERIFIED WORKING - Returns arista-exp-eos-vxlan augmentation!
# --------------------------------------------------------------------------
vxlan:
paths:
# Vxlan1 interface with Arista VXLAN augmentations
- /interfaces/interface[name=Vxlan1]
mode: stream
stream-mode: on_change # VNI mappings don't change frequently
encoding: json_ietf
# --------------------------------------------------------------------------
# System information - hostname, uptime, memory, CPU
# --------------------------------------------------------------------------
system:
paths:
# System state - VERIFIED WORKING
- /system/state
# Memory state
- /system/memory/state
# CPU state
- /system/cpus/cpu/state
mode: stream
stream-mode: sample
sample-interval: 30s
encoding: json_ietf
# --------------------------------------------------------------------------
# BGP telemetry - for fabric health and EVPN overlay monitoring
# --------------------------------------------------------------------------
bgp:
paths:
# BGP global state - VERIFIED PATH for Arista
- /network-instances/network-instance/protocols/protocol/bgp/global/state
# BGP neighbor state - VERIFIED PATH for Arista
- /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state
# BGP AFI/SAFI state including EVPN - VERIFIED PATH for Arista
- /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state
mode: stream
stream-mode: sample
sample-interval: 30s
encoding: json_ietf
# --------------------------------------------------------------------------
# LACP/MLAG telemetry - for redundancy monitoring
# --------------------------------------------------------------------------
lacp:
paths:
# LACP interface state - VERIFIED PATH for Arista
- /lacp/interfaces/interface/state
# LACP member state
- /lacp/interfaces/interface/members/member/state
mode: stream
stream-mode: sample
sample-interval: 15s
encoding: json_ietf
# ============================================================================
# Prometheus output configuration
# ============================================================================
outputs:
prometheus:
type: prometheus
listen: :9804
path: /metrics
metric-prefix: gnmic
append-subscription-name: true
export-timestamps: true
strings-as-labels: true
debug: false
# Expiration time for metrics (prevents stale data)
expiration: 120s
# Event processors to clean up metric names
event-processors:
- trim-prefixes
- add-subscription-name
# ============================================================================
# Event processors - clean up and transform metrics
# ============================================================================
processors:
# Remove long path prefixes from metric names
trim-prefixes:
event-strings:
value-names:
- ".*"
transforms:
- path-base:
apply-on: "name"
# Keep subscription name for better organization
add-subscription-name:
event-strings:
value-names:
- ".*"
transforms:
- replace:
apply-on: "name"
old: ""
new: ""