Add SNMP config

main
Daniel Ankers 2024-01-11 16:45:22 +00:00
parent 211ce5ec9e
commit b2036bfe4d
2 changed files with 18 additions and 0 deletions

View File

@ -165,6 +165,23 @@ interfaces {
}
{%- endmacro %}
{% macro snmpsection(rack, config_context) %}
snmp {
location "Domicilium Datacentre RS02 {{ rack }}";
contact "{{ config_context['snmp']['contact'] }}";
community {{ config_context['snmp']['community'] }} {
authorization read-only;
{% for client in config_context['snmp']['clients'] %}
{% if loop.first %}
clients {
{% endif %}
{{ client }};
{% if loop.last %}
}
{% endif %}
}
}
{- endmacro %}
{% macro routingoptionssection(primary_ip4, config_context) %}
routing-options {

View File

@ -28,6 +28,7 @@ policy-options {
}
}
}
{{ junos.snmpsection(rack, config_context) }}
{{ junos.routingoptionssection(primary_ip4, config_context) }}
protocols {
{{ junos.bgpsection(device,tenant['spines']) }}