Add sflow configuration

main
Daniel Ankers 2024-02-01 14:18:59 +00:00
parent 6ef28c7c95
commit 072d3812bc
2 changed files with 15 additions and 0 deletions

View File

@ -305,6 +305,20 @@ routing-options {
{%- endmacro %}
{% macro sflowsection(device) %}
{% if device['config_context']['sflow'] %}
sflow {
{% for collector in device['config_context']['sflow']['collectors'] %}
collector {{ collector }};
{% endfor %}
{% for interface in device['config_context']['sflow']['interfaces'] %}
interface {{ interface }};
{% endfor %}
}
{% endif %}
{%- endmacro %}
{% macro vlanssection(vlans,device) %}
vlans {
{# This next line selects all of the VLANs which are configured on this device #}

View File

@ -41,6 +41,7 @@ protocols {
lldp {
interface all;
}
{{ junos.sflowsection(device) }}
}
{% if device_role['name'] == 'Leaf' %}
switch-options {