Using eAPI to Provide SNMP Extensions

EOS utilizes net-snmp which offers provisions to extend OIDs.  The following script leverages eAPI to gather OSPFv3 interface information and populates the SNMP ospfv3IfTable. The OSPFV3-MIB can be downloaded from here: http://www.oidview.com/mibs/0/OSPFV3-MIB.html #!/usr/bin/python -u # # Arista Networks, Inc. # # Script: ospfv3IfTable.py v1.6 # # This script populates the ospfv3IfTable via a net-snmp extension # # 1. Copy this script to /mnt/flash as ospfv3IfTable.py # # 2. Copy snmp_passpersist to /mnt/flash # https://github.com/nagius/snmp_passpersist # # 3. Enable management api (script uses a unix socket) # management api http-commands # protocol unix-socket # no shutdown # # 4. Configure snmp to...
Continue reading →

Configure groups of interfaces based on description regex

A simple python eAPI script to find groups of interfaces to configure based on a regex match to interface descriptions. The most interesting part is that the script types out the “interface <list of matching interfaces>” command in an interactive manner as if the EOS CLI user typed it. The command is even saved in the command history. Give it a try!   1) Configure a command alias: alias intRegex bash sudo /mnt/flash/intRegex.py %1   2) Load the script in flash: #!/usr/bin/env python # # intRegex.py ver 1.12 # Arista Networks, Inc. import jsonrpclib, os, re, socket, sys, fcntl, termios...
Continue reading →

CloudVision Portal RESTful API Client

Arista Cloudvision® Portal (CVP) provides a central point of management for Arista network switches through shared snippets of configuration (configlets) enabling Network Engineers to provision the network more consistently and efficiently. While CVP highlights a graphical user interface for configuration and management of devices, it also includes a full-featured RESTful API that provides all of the same functionality available via the GUI which can be used to automate workflows and integrate with other tools. CVPRAC is a wrapper client for CVP’s RESTful APIs which greatly simplifies usage of the API and more elegantly handles the connections to the CVP nodes....
Continue reading →

CVP APIs: A Non-Programmer’s Guide

1. What are CVP APIs? Most CloudVision Portal (CVP) users are familiar with the web user interface (UI) that facilitates network provisioning, inventory management, tasks management, change control and so on.  CVP application programming interfaces (APIs) offer an alternative means of realizing the same functionality.  The key difference is that, with the CVP APIs, the functionality is realized over a programmatic interface (i.e typically by a piece of software communicating with another piece of software) rather than by a user navigating over a web page and clicking and/or typing.  Figure 1 shows a simplified example of these two methods of...
Continue reading →

Using dynamic Ansible inventories to manage CloudVision switches.

Ansible Dynamic libraries with CloudVision  The common question when talking with customers about CloudVision is are we able to also use a configuration management tool such as Ansible along with CloudVision?  You can use CVP and Ansible to both manage your Arista devices.  This is a guide to dynamically pull CloudVision for its devices and automatically have Ansible use those CVP managed devices.  Arista has supported Ansible EOS modules for quite some time and are still innovating on new modules in the latest version of Ansible which at the time of writing is 2.3.  Summary Dynamic inventories are setup in Ansible...
Continue reading →

Datacenter Deployment Automated

Planning Methodology There is a lot of talk about automation in the datacenter which indeed saves time but a lot of effort still goes into planning. After all, failing to plan is planning to fail. I needed a way to start automating some of the planning and repetitive tasks needed for deploying the same blueprint across various sites. One of the bigger tasks is the IP Plan and making sure that the correct IP’s get used in configurations. Additionally making sure that the same methodology gets used on different sites. Initially, I set out to use a very nice utility...
Continue reading →

Arista + Ansible – Getting Started

The Ansible 2.1 release made it easier than ever to manage Arista switches.  The following article describes how to leverage Ansible for EOS configuration management. The Basics If you’re brand new to Ansible, it might be helpful to take a spin through their Overview and Getting Started just to familiarize yourself with some of the basic concepts. The Ansible documentation has a great introduction to Ansible for Networking – definitely check it out before reading on. EOS Modules  Ansible modules do all of the heavy-lifting, and there’s a module to do just about anything you could possible think of, from copying a...
Continue reading →

Monitoring EOS with tcollector and OpenTSDB

EOS is a Linux distribution (based on Fedora), which means, among other things, that it can be monitored like any Linux server running Fedora.  In this post we show how to package a popular open-source monitoring framework, tcollector, as an EOS extension. A bit of history OpenTSDB is a distributed time series database used for infrastructure monitoring in many medium to large scale environments.  It uses a push model, meaning that OpenTSDB is not responsible for pulling monitoring from a set list of targets to monitor, rather the targets themselves are responsible for pushing their monitoring data to OpenTSDB, be...
Continue reading →

Arista + Ansible: A Dramatically Simple New Approach

On February 18th, 2016 Ansible (Red Hat) announced a new initiative to help bring years of systems administration experience to the network by creating a new set of modules built specifically for network devices.  This announcement signals a new direction for Ansible, a technology that previously omitted native support for the majority of network vendors.  What does this announcement mean and how can you get started with your Arista devices? A Brief History Astute readers may be wondering, “Why does this matter? I can already manage my Arista device with Ansible.” That’s true, but the announcement from Ansible changes the approach we...
Continue reading →