Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(eos_cli_config_gen): Global logging keys for congestion-drops, link-status, and repeat-messages #4493

Merged
merged 15 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ interface Management1

```eos
!
no logging repeat-messages
logging buffered 64000
logging console informational
logging monitor debugging
logging event link-status global
logging facility syslog
```
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ interface Management1

```eos
!
logging repeat-messages
logging buffered 1000000 warnings
no logging trap
logging console errors
no logging event link-status global
logging event storm-control discards global
logging event storm-control discards interval 10
logging synchronous level critical
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
!
no logging repeat-messages
logging buffered 64000
logging console informational
logging monitor debugging
logging event link-status global
logging facility syslog
!
interface Management1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
logging event congestion-drops interval 10
!
logging repeat-messages
logging buffered 1000000 warnings
no logging trap
logging console errors
no logging event link-status global
logging event storm-control discards global
logging event storm-control discards interval 10
logging synchronous level critical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ logging:
console: informational
monitor: debugging
facility: syslog
repeat_messages: false
buffered:
size: 64000
event:
global_link_status: true
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ logging:
buffered:
size: 1000000
level: warnings
repeat_messages: true
trap: disabled
synchronous:
level:
Expand Down Expand Up @@ -67,6 +68,8 @@ logging:
- 100
- 200
event:
congestion_drops_interval: 10
global_link_status: false
storm_control:
discards:
global: true
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
{% include 'eos/flow-tracking.j2' %}
{# ip igmp snooping #}
{% include 'eos/ip-igmp-snooping.j2' %}
{# logging event congestion-drops #}
{% include 'eos/logging-event-congestion-drops.j2' %}
{# load-interval #}
{% include 'eos/load-interval.j2' %}
{# hardware configuration #}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{#
Copyright (c) 2023-2024 Arista Networks, Inc.
Use of this source code is governed by the Apache License 2.0
that can be found in the LICENSE file.
#}
{# eos - logging event congestion-drops #}
{% if logging.event.congestion_drops_interval is arista.avd.defined %}
logging event congestion-drops interval {{ logging.event.congestion_drops_interval }}
{% endif %}
10 changes: 10 additions & 0 deletions python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/logging.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
{# eos - logging #}
{% if logging is arista.avd.defined %}
!
{% if logging.repeat_messages is arista.avd.defined(false) %}
no logging repeat-messages
gmuloc marked this conversation as resolved.
Show resolved Hide resolved
{% elif logging.repeat_messages is arista.avd.defined(true) %}
logging repeat-messages
{% endif %}
{% if logging.buffered.level is arista.avd.defined('disabled') %}
no logging buffered
{% elif logging.buffered.size is arista.avd.defined or logging.buffered.level is arista.avd.defined %}
Expand Down Expand Up @@ -33,6 +38,11 @@ no logging monitor
{% elif logging.monitor is arista.avd.defined %}
logging monitor {{ logging.monitor }}
{% endif %}
{% if logging.event.global_link_status is arista.avd.defined(false) %}
no logging event link-status global
{% elif logging.event.global_link_status is arista.avd.defined(true) %}
logging event link-status global
gmuloc marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}
{% if logging.event.storm_control.discards.global is arista.avd.defined(true) %}
logging event storm-control discards global
{% endif %}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ keys:
console:
type: str
valid_values: ["debugging", "informational", "notifications", "warnings", "errors", "critical", "alerts", "emergencies", "disabled"]
description: |
Console logging severity level.
description: Console logging severity level.
monitor:
type: str
valid_values: ["debugging", "informational", "notifications", "warnings", "errors", "critical", "alerts", "emergencies", "disabled"]
description: |
Monitor logging severity level.
description: Monitor logging severity level.
buffered:
type: dict
keys:
Expand All @@ -31,21 +29,21 @@ keys:
level:
type: str
valid_values: ["alerts", "critical", "debugging", "emergencies", "errors", "informational", "notifications", "warnings", "disabled"]
description: |
Buffer logging severity level.
description: Buffer logging severity level.
repeat_messages:
type: bool
description: Summarize concurrent repeat messages.
trap:
type: str
valid_values: ["alerts", "critical", "debugging", "emergencies", "errors", "informational", "notifications", "system", "warnings", "disabled"]
description: |
Trap logging severity level.
description: Trap logging severity level.
synchronous:
type: dict
keys:
level:
type: str
valid_values: ["alerts", "all", "critical", "debugging", "emergencies", "errors", "informational", "notifications", "warnings", "disabled"]
description: |
Synchronous logging severity level.
description: Synchronous logging severity level.
default: "critical"
format:
type: dict
Expand All @@ -60,12 +58,10 @@ keys:
description: Hostname format in syslogs. For hostname _only_, remove the line. (default EOS CLI behaviour).
sequence_numbers:
type: bool
description: |
Add sequence numbers to log messages.
description: Add sequence numbers to log messages.
rfc5424:
type: bool
description: |
Forward logs in RFC5424 format.
description: Forward logs in RFC5424 format.
facility:
type: str
valid_values: ["auth", "cron", "daemon", "kern", "local0", "local1", "local2", "local3", "local4",
Expand Down Expand Up @@ -128,6 +124,15 @@ keys:
event:
type: dict
keys:
congestion_drops_interval:
type: int
convert_types:
- str
min: 1
max: 65535
description: Logging interval in seconds.
global_link_status:
type: bool
storm_control:
type: dict
keys:
Expand Down
Loading