Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

SFlow-RT snmp ifalias

23 views
Skip to first unread message

tom ter huurne

unread,
Jan 10, 2025, 12:07:19 PMJan 10
to sFlow-RT
Hi Peter,

I've configured a server with Sflow-rt, Prometheus and Grafana. It's all working realy nice! I've also enabled snmp in the sflow-rt.conf and this also works, but I would also like to see the alias/description of a switch interface/port. I can get the correct information via this snmpwalk command; snmpwalk -v2c -c <community> <agent-ip> IF-MIB::ifAlias

But I cannot find how I could add this to the sflow-rt configuration, so it also reads out the interface description. 
Can you help me with this?

Kind regards,
Tom ter Huurne

Peter Phaal

unread,
Jan 10, 2025, 1:11:41 PMJan 10
to sFlow-RT
Hi Tom,

Support for SNMP in sFlow-RT is minimal and is intended only to provide hostname / portname information for sFlow agents that do not natively export the information using standard sFlow structures: struct host_descr and struct port_name. The ifname information is of particular interest when using sFlow-RT for automation where the ifname is needed to implement configuration changes, e.g. Cumulus Linux 3.4 REST API 

In the case where you want to augment metrics exported to Prometheus, you would need to create a map of agent_ip,ifindex -> ifAlias using a script that retrieves that data from the switch via SNMP or an API (or if there are only a small number of links you care about, you could manually create the map). This is only one use case, there are many other types of metadata you might want to join with sFlow metrics, e.g. Real-time BGP route analyticsTopology and Internet eXchange Provider (IXP) Metrics

How you use the map depends on whether you want to augment counters or flows:
1. For counters you would need to write your own sFlow-RT script, or modify the existing prometheus export application, https://github.com/sflow-rt/prometheus, to augment metric exports.
2. For flows you can install the map file via the REST API or via script, https://sflow-rt.com/reference.php, and reference it in a flow definition, e.g. map:[concat:,:agent,inputifindex]:ifalias

Alternatively, you might be able to load the map into Grafana as a data source and do a join when you create the dashboard.

Regards,
Peter
Reply all
Reply to author
Forward
0 new messages