Skip to content

sFlow poller uplink

Go to Automation

View in GitLab

Description

This script configures sFlow monitoring on a network switch by identifying the upstream interface. It first determines the switch OS version (AOS6 or AOS8), then retrieves the default gateway IP from the routing table. Using the gateway IP, it finds the corresponding interface via the ARP table. If successful, it sets an sFlow receiver and assigns the upstream interface as the sFlow poller with a 5-second interval.

If any step fails (e.g., missing gateway or interface), it logs an error. The script ensures compatibility with both AOS6 and AOS8 command formats.

This script is typically run on head switches of remote sites that are not connected with fiber to the core.

Credentials

none

Input

None

Output

Script output can be found in OmniVista 2500 NMS under menu ADMINISTRATION > Audit > Audit Log View Home > Configuration > cliscripting.

Output:

<switch name> sFlow configured for upstream interface <interface/port>

Dependencies