Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Add InfluxDB support (aristanetworks#3705)
Browse files Browse the repository at this point in the history
  • Loading branch information
laxmikantchintakindi authored May 13, 2024
1 parent 89edd1c commit b8e7925
Show file tree
Hide file tree
Showing 13 changed files with 765 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# monitor-telemetry-influx

## Table of Contents

- [Management](#management)
- [Management Interfaces](#management-interfaces)
- [InfluxDB Telemetry](#influxdb-telemetry)
- [InfluxDB Telemetry Summary](#influxdb-telemetry-summary)
- [InfluxDB Telemetry Device Configuration](#influxdb-telemetry-device-configuration)

## 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
```

## InfluxDB Telemetry

### InfluxDB Telemetry Summary

Source Group Standard Disabled : True

#### InfluxDB Telemetry Destinations

| Destination | Database | URL | VRF | Username |
| ----------- | -------- | --- | --- | -------- |
| test | test | https://influx_test.localhost | test | test |
| test1 | test1 | https://influx_test1.localhost | test | test1 |

#### InfluxDB Telemetry Sources

| Source Name | URL | Connection Limit |
| ----------- | --- | ---------------- |
| socket1 | unix:///var/run/example2.sock | 100 |
| socket2 | unix:///var/run/example3.sock | 22222 |

#### InfluxDB Telemetry Tags

| Tag | Value |
| --- | ----- |
| tag1 | value1 |
| tag2 | value2 |

### InfluxDB Telemetry Device Configuration

```eos
!
monitor telemetry influx
destination influxdb test
url https://influx_test.localhost
database name test
retention policy test
vrf test
username test password 7 <removed>
!
destination influxdb test1
url https://influx_test1.localhost
database name test1
retention policy test1
vrf test
username test1 password 7 <removed>
!
source socket socket1
url unix:///var/run/example2.sock
connection limit 100
!
source socket socket2
url unix:///var/run/example3.sock
connection limit 22222
tag global tag1 value1
tag global tag2 value2
source group standard disabled
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
!RANCID-CONTENT-TYPE: arista
!
transceiver qsfp default-mode 4x10G
!
hostname monitor-telemetry-influx
!
no enable password
no aaa root
!
monitor telemetry influx
destination influxdb test
url https://influx_test.localhost
database name test
retention policy test
vrf test
username test password 7 <password>
!
destination influxdb test1
url https://influx_test1.localhost
database name test1
retention policy test1
vrf test
username test1 password 7 131112011F5D
!
source socket socket1
url unix:///var/run/example2.sock
connection limit 100
!
source socket socket2
url unix:///var/run/example3.sock
connection limit 22222
tag global tag1 value1
tag global tag2 value2
source group standard disabled
!
interface Management1
description oob_management
vrf MGMT
ip address 10.73.255.122/24
!
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
monitor_telemetry_influx:
vrf: test
destinations:
- name: test
database: test
data_retention_policy: test
url: https://influx_test.localhost
username: test
password: <password>
- name: test1
database: test1
data_retention_policy: test1
url: https://influx_test1.localhost
username: test1
password: 131112011F5D
password_type: "7"
source_group_standard_disabled: true
source_sockets:
- name: socket1
connection_limit: 100
url: unix:///var/run/example2.sock
- name: socket2
connection_limit: 22222
url: unix:///var/run/example3.sock
tags:
- name: tag1
value: value1
- name: tag2
value: value2
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ mlag-configuration
monitor-layer1
monitor-connectivity
monitor-sessions
monitor-telemetry-influx
mpls
none_configuration
ntp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!--
~ 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_influx</samp>](## "monitor_telemetry_influx") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;vrf</samp>](## "monitor_telemetry_influx.vrf") | String | | | | |
| [<samp>&nbsp;&nbsp;destinations</samp>](## "monitor_telemetry_influx.destinations") | List, items: Dictionary | | | | Configure telemetry output destinations. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "monitor_telemetry_influx.destinations.[].name") | String | Required, Unique | | | InfluxDB connection name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;database</samp>](## "monitor_telemetry_influx.destinations.[].database") | String | | | | Set name of the database. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data_retention_policy</samp>](## "monitor_telemetry_influx.destinations.[].data_retention_policy") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url</samp>](## "monitor_telemetry_influx.destinations.[].url") | String | | | Pattern: (http(s)?|udp|unix)://.+ | It only accepts http(s), udp and unix domain destination URL. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;username</samp>](## "monitor_telemetry_influx.destinations.[].username") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;password</samp>](## "monitor_telemetry_influx.destinations.[].password") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;password_type</samp>](## "monitor_telemetry_influx.destinations.[].password_type") | String | | `7` | Valid Values:<br>- <code>0</code><br>- <code>7</code><br>- <code>8a</code> | |
| [<samp>&nbsp;&nbsp;source_group_standard_disabled</samp>](## "monitor_telemetry_influx.source_group_standard_disabled") | Boolean | | | | Disable standard set of telemetry. |
| [<samp>&nbsp;&nbsp;source_sockets</samp>](## "monitor_telemetry_influx.source_sockets") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "monitor_telemetry_influx.source_sockets.[].name") | String | Required, Unique | | | Label of the socket connection. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connection_limit</samp>](## "monitor_telemetry_influx.source_sockets.[].connection_limit") | Integer | | | Min: 0<br>Max: 4294967295 | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url</samp>](## "monitor_telemetry_influx.source_sockets.[].url") | String | | | Pattern: (http(s)?|udp|unix)://.+ | It only accepts http(s), udp and unix domain socket URL. |
| [<samp>&nbsp;&nbsp;tags</samp>](## "monitor_telemetry_influx.tags") | List, items: Dictionary | | | | Extra tags added to the telemetry output. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "monitor_telemetry_influx.tags.[].name") | String | Required, Unique | | | Key of the global tag pair. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value</samp>](## "monitor_telemetry_influx.tags.[].value") | String | Required | | | Value of the global tag pair. |

=== "YAML"

```yaml
monitor_telemetry_influx:
vrf: <str>

# Configure telemetry output destinations.
destinations:

# InfluxDB connection name.
- name: <str; required; unique>

# Set name of the database.
database: <str>
data_retention_policy: <str>

# It only accepts http(s), udp and unix domain destination URL.
url: <str>
username: <str>
password: <str>
password_type: <str; "0" | "7" | "8a"; default="7">

# Disable standard set of telemetry.
source_group_standard_disabled: <bool>
source_sockets:

# Label of the socket connection.
- name: <str; required; unique>
connection_limit: <int; 0-4294967295>

# It only accepts http(s), udp and unix domain socket URL.
url: <str>

# Extra tags added to the telemetry output.
tags:

# Key of the global tag pair.
- name: <str; required; unique>

# Value of the global tag pair.
value: <str; required>
```

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

Loading

0 comments on commit b8e7925

Please sign in to comment.