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): Add support for Postcard telemetry #3642

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
2b93bb6
Feat(eos_cli_config_gen): Add support for Postcard telemetry
laxmikantchintakindi Feb 20, 2024
58a209a
Feat(eos_cli_config_gen): Add support for Postcard telemetry
laxmikantchintakindi Feb 20, 2024
f1a5d56
Feat(eos_cli_config_gen): Add support for Postcard telemetry
laxmikantchintakindi Feb 21, 2024
345d233
Fixing data model and template
laxmikantchintakindi Feb 21, 2024
09110f5
Adding support to include port name in match rules
laxmikantchintakindi Feb 21, 2024
0b2e7f6
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Feb 21, 2024
7b453e7
Multiple sample policies and match rules can be created
laxmikantchintakindi Feb 22, 2024
6d5334f
Fixing pre-commit
Shivani-gslab Feb 22, 2024
d8c35ec
Modified test data and few descriptions in schema
laxmikantchintakindi Feb 22, 2024
def7f99
Added punctuations to descriptions
laxmikantchintakindi Feb 28, 2024
0dd1c76
Made some changes in Schema and template
laxmikantchintakindi Mar 1, 2024
ced7e97
Changing template file after editing EOL
laxmikantchintakindi Mar 1, 2024
40d40ea
Changing template file after removing one line EOF
laxmikantchintakindi Mar 1, 2024
5aa9032
Again changing template file after editing EOL
laxmikantchintakindi Mar 1, 2024
71ccd57
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Mar 1, 2024
bd32c3f
Added template file based on unix
laxmikantchintakindi Mar 1, 2024
c81b5f3
Added template file based on unix
laxmikantchintakindi Mar 1, 2024
8adb05d
Fix schema and template.
laxmikantchintakindi Apr 22, 2024
0df054a
Corrected schemas to support for multiple source/destination ports c…
laxmikantchintakindi Apr 22, 2024
0c815cf
Merge branch 'devel' into postcardtelemetry
laxmikantchintakindi Apr 23, 2024
26f6da5
Fixed CI failure.
laxmikantchintakindi Apr 23, 2024
f4b043d
Adding range to tcp-udp-checksum.
laxmikantchintakindi Apr 29, 2024
36ea338
Added document template and marker command.
laxmikantchintakindi May 7, 2024
13021ff
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 7, 2024
a589237
Fixing CI issues.
laxmikantchintakindi May 7, 2024
6b3468c
Address comments.
laxmikantchintakindi May 7, 2024
caaae2c
Fixing template.
laxmikantchintakindi May 7, 2024
e8549d2
Merge branch 'devel' into postcardtelemetry
laxmikantchintakindi May 7, 2024
9b68d1f
Merge branch 'devel' into postcardtelemetry
laxmikantchintakindi May 8, 2024
b294146
Address multiple comments.
laxmikantchintakindi May 8, 2024
9160898
Merge branch 'devel' into postcardtelemetry
laxmikantchintakindi May 8, 2024
3e51d70
Adding new changes in eos template.
laxmikantchintakindi May 9, 2024
490e0f4
Update ansible_collections/arista/avd/roles/eos_cli_config_gen/schema…
laxmikantchintakindi May 9, 2024
7df10a5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 9, 2024
3831b36
Fixing order of prefix commands.
laxmikantchintakindi May 9, 2024
86ef12a
Removing extra empty line characters.
laxmikantchintakindi May 10, 2024
be1ab2e
Fix logic for empty line character.
laxmikantchintakindi May 10, 2024
cfb8e22
Fixing the template
Shivani-gslab May 10, 2024
a176ff6
Making disabled key defaulttrue.
laxmikantchintakindi May 10, 2024
c17fff7
Merge branch 'devel' into HEAD
Shivani-gslab May 14, 2024
2b02bc2
Fixing EOS template.
laxmikantchintakindi May 14, 2024
0741f6f
Update ansible_collections/arista/avd/roles/eos_cli_config_gen/templa…
Vibhu-gslab May 14, 2024
440b15c
Fixed marker configuration.
May 17, 2024
ee33f26
Fixing schemas and eos template for source and destination ports.
May 22, 2024
cf39994
Minor change in schema.
May 22, 2024
6812a4a
Minor correctiong in schema.
May 22, 2024
47be37a
Correction in schema.
May 22, 2024
736fe0f
Enhacing eos template.
May 22, 2024
606b46f
Fixing eos template for marker config.
May 24, 2024
822c219
Merge branch 'devel' into postcardtelemetry
ClausHolbechArista May 29, 2024
d5e4027
Fixing CI issue.
May 29, 2024
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
@@ -0,0 +1,104 @@
# monitor-telemetry-postcard-policy

## Table of Contents

- [Management](#management)
- [Management Interfaces](#management-interfaces)
- [Monitoring](#monitoring)
- [Monitor Telemetry Postcard Policy](#monitor-telemetry-postcard-policy-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

### Monitor Telemetry Postcard Policy

#### Sample Policy Summary

##### samplepo1

###### Match rules

| Rule Name | Rule Type | Source Prefix | Destination Prefix | Protocol | Source Ports | Destination Ports |
| --------- | --------- | ------------- | ------------------ | -------- | ------------ | ----------------- |
| rule1 | ipv4 | 3.4.5.0/24 | 10.3.3.0/24 | tcp<br>udp | -<br>98 | 77, 78-80, 82<br>99 |
| rule2 | ipv6 | 5::0/128 | 4::0/128 | udp | - | 747, 748-800 |
| rule3 | ipv4 | - | - | - | - | - |

##### samplepo2

###### Match rules

| Rule Name | Rule Type | Source Prefix | Destination Prefix | Protocol | Source Ports | Destination Ports |
| --------- | --------- | ------------- | ------------------ | -------- | ------------ | ----------------- |
| rule1 | ipv4 | 3.4.5.0/24 | 10.3.3.0/24 | udp | bgp | https |

#### Telemetry Postcard Policy Profiles

| Profile Name | Ingress Sample Policy |
| ------------ | --------------------- |
| profile1 | samplepo1 |
| profile2 | samplepo2 |

#### Monitor Telemetry Postcard Policy Configuration

```eos
!
monitor telemetry postcard policy
no disabled
ingress sample rate 16384
marker vxlan header word 0 bit 30
ingress collection gre source 10.3.3.3 destination 10.3.3.4 version 2
!
sample policy samplepo1
match rule1 ipv4
source prefix 3.4.5.0/24
destination prefix 10.3.3.0/24
protocol tcp destination port 77, 78-80, 82
protocol udp source port 98 destination port 99
!
match rule2 ipv6
source prefix 5::0/128
destination prefix 4::0/128
protocol udp destination port 747, 748-800
!
match rule3 ipv4
!
sample policy samplepo2
match rule1 ipv4
source prefix 3.4.5.0/24
destination prefix 10.3.3.0/24
protocol udp source port bgp destination port https
!
profile profile1
ingress sample policy samplepo1
!
profile profile2
ingress sample policy samplepo2
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
!RANCID-CONTENT-TYPE: arista
!
transceiver qsfp default-mode 4x10G
!
hostname monitor-telemetry-postcard-policy
!
no enable password
no aaa root
!
interface Management1
description oob_management
vrf MGMT
ip address 10.73.255.122/24
!
monitor telemetry postcard policy
no disabled
ingress sample rate 16384
marker vxlan header word 0 bit 30
ingress collection gre source 10.3.3.3 destination 10.3.3.4 version 2
!
sample policy samplepo1
match rule1 ipv4
source prefix 3.4.5.0/24
destination prefix 10.3.3.0/24
protocol tcp destination port 77, 78-80, 82
protocol udp source port 98 destination port 99
!
match rule2 ipv6
source prefix 5::0/128
destination prefix 4::0/128
protocol udp destination port 747, 748-800
!
match rule3 ipv4
!
sample policy samplepo2
match rule1 ipv4
source prefix 3.4.5.0/24
destination prefix 10.3.3.0/24
protocol udp source port bgp destination port https
!
profile profile1
ingress sample policy samplepo1
!
profile profile2
ingress sample policy samplepo2
!
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
monitor_telemetry_postcard_policy:
disabled: false
ingress:
collection:
source: 10.3.3.3
destination: 10.3.3.4
version: 2
sample:
rate: 16384
tcp_udp_checksum:
value: 65000
mask: "0xffff"
marker_vxlan:
enabled: true
header_word_zero_bit: 30
profiles:
- name: profile1
ingress_sample_policy: samplepo1
- name: profile2
ingress_sample_policy: samplepo2
sample_policies:
- name: samplepo1
match_rules:
- name: rule1
type: ipv4
destination_prefix: 10.3.3.0/24
source_prefix: 3.4.5.0/24
protocols:
- protocol: tcp
destination_ports:
- '77'
- 78-80
- 82
- protocol: udp
destination_ports:
- "99"
source_ports:
- "98"
- name: rule2
type: ipv6
destination_prefix: 4::0/128
source_prefix: 5::0/128
protocols:
- protocol: udp
destination_ports:
- '747'
- 748-800
- name: rule3
type: ipv4
- name: samplepo2
match_rules:
- name: rule1
type: ipv4
destination_prefix: 10.3.3.0/24
source_prefix: 3.4.5.0/24
protocols:
- protocol: udp
source_ports:
- bgp
destination_ports:
- https
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ monitor-layer1
monitor-connectivity
monitor-sessions
monitor-telemetry-influx
monitor-telemetry-postcard-policy
mpls
none_configuration
ntp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<!--
~ Copyright (c) 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.
-->
=== "Table"

| Variable | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| [<samp>monitor_telemetry_postcard_policy</samp>](## "monitor_telemetry_postcard_policy") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;disabled</samp>](## "monitor_telemetry_postcard_policy.disabled") | Boolean | | `True` | | Enable or disable the postcard telemetry feature. |
| [<samp>&nbsp;&nbsp;ingress</samp>](## "monitor_telemetry_postcard_policy.ingress") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;collection</samp>](## "monitor_telemetry_postcard_policy.ingress.collection") | Dictionary | | | | Collector configuration. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source</samp>](## "monitor_telemetry_postcard_policy.ingress.collection.source") | String | | | | Source IP address of GRE tunnel. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;destination</samp>](## "monitor_telemetry_postcard_policy.ingress.collection.destination") | String | | | | Destination IP address of GRE tunnel. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version</samp>](## "monitor_telemetry_postcard_policy.ingress.collection.version") | Integer | | | Valid Values:<br>- <code>1</code><br>- <code>2</code> | Postcard version. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;sample</samp>](## "monitor_telemetry_postcard_policy.ingress.sample") | Dictionary | | | | Sampling parameters. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rate</samp>](## "monitor_telemetry_postcard_policy.ingress.sample.rate") | Integer | | | Valid Values:<br>- <code>16384</code><br>- <code>32768</code><br>- <code>65536</code> | Sampling rate. `rate` is preferred when both `rate` and `tcp_udp_checksum` are defined. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tcp_udp_checksum</samp>](## "monitor_telemetry_postcard_policy.ingress.sample.tcp_udp_checksum") | Dictionary | | | | TCP/UDP parameters. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value</samp>](## "monitor_telemetry_postcard_policy.ingress.sample.tcp_udp_checksum.value") | Integer | | | Min: 0<br>Max: 65535 | TCP/UDP checksum or IP ID value. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mask</samp>](## "monitor_telemetry_postcard_policy.ingress.sample.tcp_udp_checksum.mask") | String | | | | 16 bit hexadecimal mask for TCP/UDP or IP ID with atmost 2 unset bits. |
| [<samp>&nbsp;&nbsp;marker_vxlan</samp>](## "monitor_telemetry_postcard_policy.marker_vxlan") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;enabled</samp>](## "monitor_telemetry_postcard_policy.marker_vxlan.enabled") | Boolean | | | | Enable vxlan marking using default bit 0. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;header_word_zero_bit</samp>](## "monitor_telemetry_postcard_policy.marker_vxlan.header_word_zero_bit") | Integer | | | Min: 1<br>Max: 31 | |
| [<samp>&nbsp;&nbsp;profiles</samp>](## "monitor_telemetry_postcard_policy.profiles") | List, items: Dictionary | | | | Postcard telemetry profiles. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "monitor_telemetry_postcard_policy.profiles.[].name") | String | Required, Unique | | | Profile name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ingress_sample_policy</samp>](## "monitor_telemetry_postcard_policy.profiles.[].ingress_sample_policy") | String | | | | |
| [<samp>&nbsp;&nbsp;sample_policies</samp>](## "monitor_telemetry_postcard_policy.sample_policies") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "monitor_telemetry_postcard_policy.sample_policies.[].name") | String | Required, Unique | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;match_rules</samp>](## "monitor_telemetry_postcard_policy.sample_policies.[].match_rules") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "monitor_telemetry_postcard_policy.sample_policies.[].match_rules.[].name") | String | Required, Unique | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type</samp>](## "monitor_telemetry_postcard_policy.sample_policies.[].match_rules.[].type") | String | Required | | Valid Values:<br>- <code>ipv4</code><br>- <code>ipv6</code> | IP address version. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;destination_prefix</samp>](## "monitor_telemetry_postcard_policy.sample_policies.[].match_rules.[].destination_prefix") | String | | | | IPv4 Network/Mask or IPv6 Network/Mask. Host part of prefix must be zero.<br>eg. 10.3.3.0/24 |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source_prefix</samp>](## "monitor_telemetry_postcard_policy.sample_policies.[].match_rules.[].source_prefix") | String | | | | IPv4 Network/Mask or IPv6 Network/Mask. Host part of prefix must be zero.<br>eg. 10.3.3.0/24 |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;protocols</samp>](## "monitor_telemetry_postcard_policy.sample_policies.[].match_rules.[].protocols") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;protocol</samp>](## "monitor_telemetry_postcard_policy.sample_policies.[].match_rules.[].protocols.[].protocol") | String | Required, Unique | | Valid Values:<br>- <code>tcp</code><br>- <code>udp</code> | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source_ports</samp>](## "monitor_telemetry_postcard_policy.sample_policies.[].match_rules.[].protocols.[].source_ports") | List, items: String | | | | A list of port numbers or port range or port name. Combination of port numbers or range and port name is not supported on EOS. The port numbers should be in range of 0-65535.<br>e.g.<br> [ "12", "14-20" ]<br> [ "www" ] |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&lt;str&gt;</samp>](## "monitor_telemetry_postcard_policy.sample_policies.[].match_rules.[].protocols.[].source_ports.[]") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;destination_ports</samp>](## "monitor_telemetry_postcard_policy.sample_policies.[].match_rules.[].protocols.[].destination_ports") | List, items: String | | | | A list of port numbers or port range or port name. Combination of port numbers or range and port name is not supported on EOS. The port numbers should be in range of 0-65535.<br>e.g.<br> [ "12", "14-20", "80" ]<br> [ "https" ] |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&lt;str&gt;</samp>](## "monitor_telemetry_postcard_policy.sample_policies.[].match_rules.[].protocols.[].destination_ports.[]") | String | | | | |

=== "YAML"

```yaml
monitor_telemetry_postcard_policy:

# Enable or disable the postcard telemetry feature.
disabled: <bool; default=True>
ingress:

# Collector configuration.
collection:

# Source IP address of GRE tunnel.
source: <str>

# Destination IP address of GRE tunnel.
destination: <str>

# Postcard version.
version: <int; 1 | 2>

# Sampling parameters.
sample:

# Sampling rate. `rate` is preferred when both `rate` and `tcp_udp_checksum` are defined.
rate: <int; 16384 | 32768 | 65536>

# TCP/UDP parameters.
tcp_udp_checksum:

# TCP/UDP checksum or IP ID value.
value: <int; 0-65535>

# 16 bit hexadecimal mask for TCP/UDP or IP ID with atmost 2 unset bits.
mask: <str>
marker_vxlan:

# Enable vxlan marking using default bit 0.
enabled: <bool>
header_word_zero_bit: <int; 1-31>

# Postcard telemetry profiles.
profiles:

# Profile name.
- name: <str; required; unique>
ingress_sample_policy: <str>
sample_policies:
- name: <str; required; unique>
match_rules:
- name: <str; required; unique>

# IP address version.
type: <str; "ipv4" | "ipv6"; required>

# IPv4 Network/Mask or IPv6 Network/Mask. Host part of prefix must be zero.
# eg. 10.3.3.0/24
destination_prefix: <str>

# IPv4 Network/Mask or IPv6 Network/Mask. Host part of prefix must be zero.
# eg. 10.3.3.0/24
source_prefix: <str>
protocols:
- protocol: <str; "tcp" | "udp"; required; unique>

# A list of port numbers or port range or port name. Combination of port numbers or range and port name is not supported on EOS. The port numbers should be in range of 0-65535.
# e.g.
# [ "12", "14-20" ]
# [ "www" ]
source_ports:
- <str>

# A list of port numbers or port range or port name. Combination of port numbers or range and port name is not supported on EOS. The port numbers should be in range of 0-65535.
# e.g.
# [ "12", "14-20", "80" ]
# [ "https" ]
destination_ports:
- <str>
```
Loading
Loading