From 7f7c073b2d49aede84edfd544134f110394e6cb9 Mon Sep 17 00:00:00 2001 From: Shivani-gslab Date: Wed, 13 Nov 2024 14:50:10 +0530 Subject: [PATCH] Logging --- .../documentation/devices/host1.md | 88 +++++++++++++ .../documentation/devices/host2.md | 29 ++++ .../devices/logging-match-list.md | 56 -------- .../documentation/devices/logging-minimal.md | 63 --------- .../documentation/devices/logging.md | 124 ------------------ .../intended/configs/host1.cfg | 36 +++++ .../intended/configs/host2.cfg | 8 ++ .../intended/configs/logging-match-list.cfg | 9 -- .../intended/configs/logging-minimal.cfg | 13 -- .../intended/configs/logging.cfg | 40 ------ .../host_vars/{ => host1}/logging.yml | 5 + .../logging.yml} | 0 .../host_vars/logging-match-list.yml | 9 -- .../eos_cli_config_gen/inventory/hosts.yml | 3 - 14 files changed, 166 insertions(+), 317 deletions(-) delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/logging-match-list.md delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/logging-minimal.md delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/logging.md delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/logging-match-list.cfg delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/logging-minimal.cfg delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/logging.cfg rename ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/{ => host1}/logging.yml (95%) rename ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/{logging-minimal.yml => host2/logging.yml} (100%) delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/logging-match-list.yml diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md index 4e8ebb2ff1d..e16a3369f8b 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md @@ -49,6 +49,7 @@ - [System Boot Device Configuration](#system-boot-device-configuration) - [Monitoring](#monitoring) - [Custom daemons](#custom-daemons) + - [Logging](#logging) - [MCS Client Summary](#mcs-client-summary) - [Monitor Sessions](#monitor-sessions) - [Tap Aggregation](#tap-aggregation) @@ -1160,6 +1161,93 @@ daemon random shutdown ``` +### Logging + +#### Logging Servers and Features Summary + +| Type | Level | +| -----| ----- | +| Console | errors | +| Buffer | warnings | +| Trap | disabled | +| Synchronous | critical | + +| Format Type | Setting | +| ----------- | ------- | +| Timestamp | traditional year timezone | +| Hostname | hostname | +| Sequence-numbers | false | +| RFC5424 | True | + +| VRF | Source Interface | +| --- | ---------------- | +| default | Loopback0 | +| mgt | Management0 | + +| VRF | Hosts | Ports | Protocol | +| --- | ----- | ----- | -------- | +| default | 20.20.20.7 | Default | UDP | +| default | 50.50.50.7 | 100, 200 | TCP | +| default | 60.60.60.7 | 100, 200 | UDP | +| default | 2001:db8::20:7 | Default | UDP | +| default | 2001:db8::50:7 | 100, 200 | TCP | +| default | 2001:db8::60:7 | 100, 200 | UDP | +| mgt | 10.10.10.7 | Default | UDP | +| mgt | 30.30.30.7 | 100, 200 | TCP | +| mgt | 40.40.40.7 | 300, 400 | UDP | +| mgt | 2001:db8::10:7 | Default | UDP | +| mgt | 2001:db8::30:7 | 100, 200 | TCP | +| mgt | 2001:db8::40:7 | 300, 400 | UDP | +| vrf_with_no_source_interface | 1.2.3.4 | Default | UDP | +| vrf_with_no_source_interface | 2001:db8::1:2:3:4 | Default | UDP | + +| Facility | Severity | +| -------- | -------- | +| AAA | warnings | +| ACL | critical | +| BGP | 0 | + +#### Logging Servers and Features Device Configuration + +```eos +! +logging event storm-control discards global +logging event storm-control discards interval 10 +! +logging event congestion-drops interval 10 +! +logging repeat-messages +logging buffered 1000000 warnings +no logging trap +logging console errors +logging synchronous level critical +logging host 20.20.20.7 +logging host 50.50.50.7 100 200 protocol tcp +logging host 60.60.60.7 100 200 +logging host 2001:db8::20:7 +logging host 2001:db8::50:7 100 200 protocol tcp +logging host 2001:db8::60:7 100 200 +logging vrf mgt host 10.10.10.7 +logging vrf mgt host 30.30.30.7 100 200 protocol tcp +logging vrf mgt host 40.40.40.7 300 400 +logging vrf mgt host 2001:db8::10:7 +logging vrf mgt host 2001:db8::30:7 100 200 protocol tcp +logging vrf mgt host 2001:db8::40:7 300 400 +logging vrf vrf_with_no_source_interface host 1.2.3.4 +logging vrf vrf_with_no_source_interface host 2001:db8::1:2:3:4 +logging format timestamp traditional year timezone +logging format rfc5424 +logging source-interface Loopback0 +logging vrf mgt source-interface Management0 +logging policy match match-list molecule discard +! +logging level AAA warnings +logging level ACL critical +logging level BGP 0 +! +no logging event link-status global +``` + ### MCS Client Summary MCS client is enabled diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md index 6dbc3025561..c3efe4da770 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host2.md @@ -23,6 +23,8 @@ - [DHCP Relay Device Configuration](#dhcp-relay-device-configuration) - [System Boot Settings](#system-boot-settings) - [System Boot Device Configuration](#system-boot-device-configuration) +- [Monitoring](#monitoring) + - [Logging](#logging) - [Monitor Connectivity](#monitor-connectivity) - [Global Configuration](#global-configuration) - [Monitor Connectivity Device Configuration](#monitor-connectivity-device-configuration) @@ -293,6 +295,33 @@ dhcp relay ! ``` +## Monitoring + +### Logging + +#### Logging Servers and Features Summary + +| Type | Level | +| -----| ----- | +| Console | informational | +| Monitor | debugging | +| Buffer | - | + +**Syslog facility value:** syslog + +#### Logging Servers and Features Device Configuration + +```eos +! +no logging repeat-messages +logging buffered 64000 +logging console informational +logging monitor debugging +logging facility syslog +! +logging event link-status global +``` + ## Monitor Connectivity ### Global Configuration diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/logging-match-list.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/logging-match-list.md deleted file mode 100644 index 654d6c48612..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/logging-match-list.md +++ /dev/null @@ -1,56 +0,0 @@ -# logging-match-list - -## Table of Contents - -- [Management](#management) - - [Management Interfaces](#management-interfaces) -- [Monitoring](#monitoring) - - [Logging](#logging) - -## Management - -### Management Interfaces - -#### Management Interfaces Summary - -##### IPv4 - -| Management Interface | Description | Type | VRF | IP Address | Gateway | -| -------------------- | ----------- | ---- | --- | ---------- | ------- | -| Management1 | OOB_MANAGEMENT | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 | - -##### IPv6 - -| Management Interface | Description | Type | VRF | IPv6 Address | IPv6 Gateway | -| -------------------- | ----------- | ---- | --- | ------------ | ------------ | -| Management1 | OOB_MANAGEMENT | oob | MGMT | - | - | - -#### Management Interfaces Device Configuration - -```eos -! -interface Management1 - description OOB_MANAGEMENT - vrf MGMT - ip address 10.73.255.122/24 -``` - -## Monitoring - -### Logging - -#### Logging Servers and Features Summary - -| Type | Level | -| -----| ----- | -| Console | informational | -| Monitor | debugging | - -#### Logging Servers and Features Device Configuration - -```eos -! -logging console informational -logging monitor debugging -logging policy match match-list molecule discard -``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/logging-minimal.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/logging-minimal.md deleted file mode 100644 index 744fc471f35..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/logging-minimal.md +++ /dev/null @@ -1,63 +0,0 @@ -# logging-minimal - -## Table of Contents - -- [Management](#management) - - [Management Interfaces](#management-interfaces) -- [Monitoring](#monitoring) - - [Logging](#logging) - -## Management - -### Management Interfaces - -#### Management Interfaces Summary - -##### IPv4 - -| Management Interface | Description | Type | VRF | IP Address | Gateway | -| -------------------- | ----------- | ---- | --- | ---------- | ------- | -| Management1 | OOB_MANAGEMENT | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 | - -##### IPv6 - -| Management Interface | Description | Type | VRF | IPv6 Address | IPv6 Gateway | -| -------------------- | ----------- | ---- | --- | ------------ | ------------ | -| Management1 | OOB_MANAGEMENT | oob | MGMT | - | - | - -#### Management Interfaces Device Configuration - -```eos -! -interface Management1 - description OOB_MANAGEMENT - vrf MGMT - ip address 10.73.255.122/24 -``` - -## Monitoring - -### Logging - -#### Logging Servers and Features Summary - -| Type | Level | -| -----| ----- | -| Console | informational | -| Monitor | debugging | -| Buffer | - | - -**Syslog facility value:** syslog - -#### Logging Servers and Features Device Configuration - -```eos -! -no logging repeat-messages -logging buffered 64000 -logging console informational -logging monitor debugging -logging facility syslog -! -logging event link-status global -``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/logging.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/logging.md deleted file mode 100644 index 775a2f4cbe0..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/logging.md +++ /dev/null @@ -1,124 +0,0 @@ -# logging - -## Table of Contents - -- [Management](#management) - - [Management Interfaces](#management-interfaces) -- [Monitoring](#monitoring) - - [Logging](#logging-1) - -## Management - -### Management Interfaces - -#### Management Interfaces Summary - -##### IPv4 - -| Management Interface | Description | Type | VRF | IP Address | Gateway | -| -------------------- | ----------- | ---- | --- | ---------- | ------- | -| Management1 | OOB_MANAGEMENT | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 | - -##### IPv6 - -| Management Interface | Description | Type | VRF | IPv6 Address | IPv6 Gateway | -| -------------------- | ----------- | ---- | --- | ------------ | ------------ | -| Management1 | OOB_MANAGEMENT | oob | MGMT | - | - | - -#### Management Interfaces Device Configuration - -```eos -! -interface Management1 - description OOB_MANAGEMENT - vrf MGMT - ip address 10.73.255.122/24 -``` - -## Monitoring - -### Logging - -#### Logging Servers and Features Summary - -| Type | Level | -| -----| ----- | -| Console | errors | -| Buffer | warnings | -| Trap | disabled | -| Synchronous | critical | - -| Format Type | Setting | -| ----------- | ------- | -| Timestamp | traditional year timezone | -| Hostname | hostname | -| Sequence-numbers | false | -| RFC5424 | True | - -| VRF | Source Interface | -| --- | ---------------- | -| default | Loopback0 | -| mgt | Management0 | - -| VRF | Hosts | Ports | Protocol | -| --- | ----- | ----- | -------- | -| default | 20.20.20.7 | Default | UDP | -| default | 50.50.50.7 | 100, 200 | TCP | -| default | 60.60.60.7 | 100, 200 | UDP | -| default | 2001:db8::20:7 | Default | UDP | -| default | 2001:db8::50:7 | 100, 200 | TCP | -| default | 2001:db8::60:7 | 100, 200 | UDP | -| mgt | 10.10.10.7 | Default | UDP | -| mgt | 30.30.30.7 | 100, 200 | TCP | -| mgt | 40.40.40.7 | 300, 400 | UDP | -| mgt | 2001:db8::10:7 | Default | UDP | -| mgt | 2001:db8::30:7 | 100, 200 | TCP | -| mgt | 2001:db8::40:7 | 300, 400 | UDP | -| vrf_with_no_source_interface | 1.2.3.4 | Default | UDP | -| vrf_with_no_source_interface | 2001:db8::1:2:3:4 | Default | UDP | - -| Facility | Severity | -| -------- | -------- | -| AAA | warnings | -| ACL | critical | -| BGP | 0 | - -#### Logging Servers and Features Device Configuration - -```eos -! -logging event storm-control discards global -logging event storm-control discards interval 10 -! -logging event congestion-drops interval 10 -! -logging repeat-messages -logging buffered 1000000 warnings -no logging trap -logging console errors -logging synchronous level critical -logging host 20.20.20.7 -logging host 50.50.50.7 100 200 protocol tcp -logging host 60.60.60.7 100 200 -logging host 2001:db8::20:7 -logging host 2001:db8::50:7 100 200 protocol tcp -logging host 2001:db8::60:7 100 200 -logging vrf mgt host 10.10.10.7 -logging vrf mgt host 30.30.30.7 100 200 protocol tcp -logging vrf mgt host 40.40.40.7 300 400 -logging vrf mgt host 2001:db8::10:7 -logging vrf mgt host 2001:db8::30:7 100 200 protocol tcp -logging vrf mgt host 2001:db8::40:7 300 400 -logging vrf vrf_with_no_source_interface host 1.2.3.4 -logging vrf vrf_with_no_source_interface host 2001:db8::1:2:3:4 -logging format timestamp traditional year timezone -logging format rfc5424 -logging source-interface Loopback0 -logging vrf mgt source-interface Management0 -! -logging level AAA warnings -logging level ACL critical -logging level BGP 0 -! -no logging event link-status global -``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg index 1e1915189a4..73e7f6e39a5 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg @@ -29,6 +29,9 @@ terminal width 1000 alias wr copy running-config startup-config alias siib show ip interface brief +! +logging event storm-control discards global +logging event storm-control discards interval 10 ! daemon ocprometheus exec /usr/bin/ocprometheus -config /usr/bin/ocprometheus.yml -addr localhost:6042 @@ -190,6 +193,8 @@ ip igmp snooping proxy ip igmp snooping vlan 23 proxy no ip igmp snooping vlan 25 proxy ! +logging event congestion-drops interval 10 +! load-interval default 25 ! service routing protocols model multi-agent @@ -216,6 +221,37 @@ link tracking group EVPN_MH_ES1 recovery delay 500 link tracking group EVPN_MH_ES2 ! +logging repeat-messages +logging buffered 1000000 warnings +no logging trap +logging console errors +logging synchronous level critical +logging host 20.20.20.7 +logging host 50.50.50.7 100 200 protocol tcp +logging host 60.60.60.7 100 200 +logging host 2001:db8::20:7 +logging host 2001:db8::50:7 100 200 protocol tcp +logging host 2001:db8::60:7 100 200 +logging vrf mgt host 10.10.10.7 +logging vrf mgt host 30.30.30.7 100 200 protocol tcp +logging vrf mgt host 40.40.40.7 300 400 +logging vrf mgt host 2001:db8::10:7 +logging vrf mgt host 2001:db8::30:7 100 200 protocol tcp +logging vrf mgt host 2001:db8::40:7 300 400 +logging vrf vrf_with_no_source_interface host 1.2.3.4 +logging vrf vrf_with_no_source_interface host 2001:db8::1:2:3:4 +logging format timestamp traditional year timezone +logging format rfc5424 +logging source-interface Loopback0 +logging vrf mgt source-interface Management0 +logging policy match match-list molecule discard +! +logging level AAA warnings +logging level ACL critical +logging level BGP 0 +! +no logging event link-status global +! match-list input string molecule 10 match regex ^.*MOLECULE.*$ 20 match regex ^.*TESTING.*$ diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host2.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host2.cfg index 73e3f4c1987..13540336412 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host2.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host2.cfg @@ -23,6 +23,14 @@ queue-monitor length no queue-monitor length notifying queue-monitor length default threshold 100 ! +no logging repeat-messages +logging buffered 64000 +logging console informational +logging monitor debugging +logging facility syslog +! +logging event link-status global +! router adaptive-virtual-topology topology role edge gateway vxlan ! diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/logging-match-list.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/logging-match-list.cfg deleted file mode 100644 index 161111b5346..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/logging-match-list.cfg +++ /dev/null @@ -1,9 +0,0 @@ -! -logging console informational -logging monitor debugging -logging policy match match-list molecule discard -! -interface Management1 - description OOB_MANAGEMENT - vrf MGMT - ip address 10.73.255.122/24 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/logging-minimal.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/logging-minimal.cfg deleted file mode 100644 index f3f3e2ae51d..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/logging-minimal.cfg +++ /dev/null @@ -1,13 +0,0 @@ -! -no logging repeat-messages -logging buffered 64000 -logging console informational -logging monitor debugging -logging facility syslog -! -logging event link-status global -! -interface Management1 - description OOB_MANAGEMENT - vrf MGMT - ip address 10.73.255.122/24 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/logging.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/logging.cfg deleted file mode 100644 index 1110a0650b8..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/logging.cfg +++ /dev/null @@ -1,40 +0,0 @@ -! -logging event storm-control discards global -logging event storm-control discards interval 10 -! -logging event congestion-drops interval 10 -! -logging repeat-messages -logging buffered 1000000 warnings -no logging trap -logging console errors -logging synchronous level critical -logging host 20.20.20.7 -logging host 50.50.50.7 100 200 protocol tcp -logging host 60.60.60.7 100 200 -logging host 2001:db8::20:7 -logging host 2001:db8::50:7 100 200 protocol tcp -logging host 2001:db8::60:7 100 200 -logging vrf mgt host 10.10.10.7 -logging vrf mgt host 30.30.30.7 100 200 protocol tcp -logging vrf mgt host 40.40.40.7 300 400 -logging vrf mgt host 2001:db8::10:7 -logging vrf mgt host 2001:db8::30:7 100 200 protocol tcp -logging vrf mgt host 2001:db8::40:7 300 400 -logging vrf vrf_with_no_source_interface host 1.2.3.4 -logging vrf vrf_with_no_source_interface host 2001:db8::1:2:3:4 -logging format timestamp traditional year timezone -logging format rfc5424 -logging source-interface Loopback0 -logging vrf mgt source-interface Management0 -! -logging level AAA warnings -logging level ACL critical -logging level BGP 0 -! -no logging event link-status global -! -interface Management1 - description OOB_MANAGEMENT - vrf MGMT - ip address 10.73.255.122/24 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/logging.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/logging.yml similarity index 95% rename from ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/logging.yml rename to ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/logging.yml index 26d61019fa8..cedef27c206 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/logging.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/logging.yml @@ -81,3 +81,8 @@ logging: severity: warnings - facility: ACL severity: critical + policy: + match: + match_lists: + - name: molecule + action: discard diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/logging-minimal.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host2/logging.yml similarity index 100% rename from ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/logging-minimal.yml rename to ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host2/logging.yml diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/logging-match-list.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/logging-match-list.yml deleted file mode 100644 index 03315d7e8c6..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/logging-match-list.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -logging: - console: informational - monitor: debugging - policy: - match: - match_lists: - - name: molecule - action: discard diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.yml index e6a586e9cdb..503e5483ca1 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.yml @@ -34,9 +34,6 @@ test_hosts: ipv6-access-lists: l2-protocol-forwarding: lldp: - logging-match-list: - logging-minimal: - logging: management-accounts: management-api-http: management-cvx: