avd icon indicating copy to clipboard operation
avd copied to clipboard

Add InfluxDB support

Open chetryan opened this issue 2 years ago • 2 comments

Enhancement summary

At the moment, to configure Telegraf on EOS devices using AVD, we have to add all the configuration in the eos_cli field.

An improvement on this, if the user is knowledgable enough, is to build a custom eos_config_cli template that will generate the configuration.

The enhancement request is to have eos_design functionality to generate the configuration for Telegraf to stream to InfluxDB. Edit: I think that eos_config_cli support should be enough.

Which component of AVD is impacted

eos_cli_config_gen

Use case example

To configure Telegraf on EOS devices to stream to InfluxDB.

Refer to the ToI article here : https://www.arista.com/en/support/toi/eos-4-25-2f/14735-influxdb-telemetry-streaming

Example Swich configuration:

monitor telemetry influx
   destination influxdb Test
      url https://influx_test.localhost
      database name test
      retention policy two_hours
      username user1 password 7 08314D5D1A0E0A05165A
   !
   source socket example_2
      url unix:///var/run/example2.sock
      connection limit 3
   !
   source socket socket_example
      url unix:///var/run/new.sock
      connection limit 10
   tag global key1 value1
   tag global key2 value2

Proposed yaml structure to capture this (please amend as required):

monitor_influxdb:
  # The below should default to true. 
  # Only if false should we consider the sources
  enable_standard_group: True|False 
  sources:
    - name: <name here>
      socket_url: unix:///var/run/new.sock
      connection_limit: <int from 0 up to 4294967295>
  tags: 
    - key: <key name>
      value: <value>
  # (currently, only 1 vrf is supported that has to be the same for all destinations)
  vrf: <VRF Name>
  destinations:
    - name: DestA
      database: DatabaseNameA
      retention: <policyname>
      url: <valid url>
      username: <string>
      password: <password>

Describe the solution you would like

The desired solution would :

  • Allow for Telegraf configuration to be defined in group_vars yaml definitions
  • [ ] eos_designs would pick up these definition and generate the corresponding eos_cli_config_gen structured_config
  • [ ] #3479

Nice to have:

  • eos_validate_state would verify that Telegraf is running as expected on EOS devices, when such definitions are defined in structured_config

Describe alternatives you have considered

  • Adding configuration under eos_cli. This solution is not in line with defining the configuration is a structured format.
  • Custom eos_cli_config_gen to generate the configuration . This solution is not portable to other users, and would require each user to manually add it. Further more, it is not in line with the strategy to capture as much intended state through eos_designs. It does not allow for future development example : eos_validate_state checking telegraf state.

Additional context

No response

Contributing Guide

  • [X] I agree to follow this project's Code of Conduct

chetryan avatar Jan 24 '23 10:01 chetryan

Thank you for taking this on yourself. Please create separate PRs per role. Easiest to start with eos_cli_config_gen.

ClausHolbechArista avatar Jan 26 '23 06:01 ClausHolbechArista

This issue is stale because it has been open 90 days with no activity. The issue will be reviewed by a maintainer and may be closed

github-actions[bot] avatar Apr 27 '23 00:04 github-actions[bot]