Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

AOSOM-Streaming Guide

AOSOM-Streaming Overview

Note:

AOSOM streaming is demonstration software, not intended for production environments.

You can configure Apstra to generate Google Protocol Buffer (protobuf) streams for counter data (perfmon), alerts, and events. Each data type is sent to a streaming receiver over its own TCP socket. Even if all three data types are configured for the same streaming receiver, three connections are created between the Apstra server and the streaming receiver. This also allows for all three types to be sent to three different streaming receivers. You can choose from the many open-source projects, or develop your own solutions to capture, store and inspect the protobuf data. Apstra has developed a project available on GitHub called AOSOM-Streaming to demonstrate how this can be achieved using several open-source components. The AOSOM-Streaming project is meant to help you understand how you can consume the AOS protobuf stream. It is for demonstration purposes only, except for the Apstra Telegraf input plugin. Apstra software fully supports this plug-in for use as part of your streaming telemetry solution.

The Aosom Streaming project provides a packaged solution to collect and visualize telemetry streaming information coming from an Apstra server. This provides a web interface experience and example queries to handle alerts, counters, and Apstra events. This open-source project officially lives on Github at https://github.com/Apstra/aosom-streaming.

The packaged solution includes:

  • A graphical Interface based on Grafana (port 3000)
  • Prometheus for Counters and Alerts (port 9090)
  • Influxdb for Events (port 8086)
  • 2 Collectors, one for each database based on Telegraf.

Grafana

From a web browser enter the URL http://<aosom-streaming>:3000 and enter username admin (default) and password admin (default).

The grafana GUI includes two main sections (top left). Apstra AOS Blueprint describes overall telemetry alerts and traffic throughput, as well as individual devices for interface telemetry. Blueprints are learned automatically using the Apstra ‘telegraf’ Docker container; no further configuration is necessary.

In the screenshot above, we can observe traffic in the demo Apstra environment, and aggregate CPU, traffic, and errors.

To filter telemetry events based on specific and individual devices, change the dashboard at the top to Apstra AOS Device. Here we can observe there are two active route anomalies in the blueprint, and Apstra has received telemetry for two leaf switches.

Scroll down to view device statistics such as CPU and Memory:

Prometheus

Prometheus is used for alerts and device telemetry counter storage in the Aosom-streaming appliance. From a web browser enter the URL http://<aosom-streaming>:9090 to access the Prometheus GUI.

When incoming events appear, Apstra dynamically builds each of the queries. To see example query names, begin typing under ‘execute’. Starting with ‘alert’ it tab-completes available alerts that prometheus has received from Apstra.

Here is an example of BGP Neighbors being offline.

InfluxDB

InfluxDB is used to store Apstra events from telemetry streaming. From a web browser enter the URL http://<aosom-streaming>:8083 to access InfluxDB.

We can show the available influxdb keys with queries, such as show field keys or show measurements.

Once we know a measurement, we can view the data and keys with select * from <measurement> -- In this case, we’ll capture the LAG interface status.

Note:

Developing an influx-db application is beyond the scope of this documentation.

Configure Aosom-Streaming

To configure telemetry streaming as part of this project, you'll edit variables.env, run the make start file and restart the containers. No Apstra server configuration is required. Documentation for starting, stopping, and clearing data is available at https://github.com/Apstra/aosom-streaming

The telegraf project connects to the Apstra API and posts an IP:Port that Apstra uses to stream realtime telemetry data back to.

  1. Copy variables.default to variables.env:
  2. Configure variables.env.
    • AOS_SERVER - the IP address of the Apstra server that sends telemetry data to the aosom-streaming server.
    • LOCAL_IP - the IP address assigned to ens33 (first ethernet interface). In this case, it is learned via DHCP on this VM. See ip addr show dev ens33. GRAFANA configuration options to specify the username and password for the grafana web interface.
    • AOS_LOGIN, AOS_PASSWORD, AOS_PORT - You can customize username, port and password information.
  3. Run the command make start to set up the project, or if you're making configuration changes, run make update.

Reconfigure Aosom-streaming after Apstra Server Upgrade

After you upgrade the Apstra server you must reconfigure to ensure a proper streaming connection.
  1. If you upgraded the Apstra server onto a different VM (or if the server IP address is different for any reason), update the variables.env file with the new Apstra IP address.
  2. Run the docker ps command to verify that the current Telegraf container image matches the proper version for the new Apstra release.

    You can check the different Telegraf versions in the Apstra Docker Hub.

  3. If required, modify the docker-compose.yml file and point to the correct Docker image.
  4. Run the command docker-compose up -d to restart the service.
  5. Run the docker ps command to verify that the container is running with the new image.
    Note:

    For assistance regarding which version to install or if you have any questions about the procedure, contact Juniper Support.

Build Aosom-Streaming VM (Optional)

You can build your own Aosom-streaming VM, which is a Docker container. This steps show you how to set up a basic Docker server.

Install Ubuntu 16.04.2

Download the Ubuntu 16.04.2 ISO and provision a new VM. The default username is aosom and the password is admin.

For larger blueprints, we recommend changing RAM to at least 8GB and CPU to at least 2 vCPU. More disk space may also be required.

Resource Quantity
RAM 8GB
CPU 2 vCPU
Network 1 vNIC

Install Packages

Install required packages, based on Ubuntu 16.04.2.

Update the system to ensure all packages are up to date.

Add the aosom user to the Docker group. This allows ‘aosom’ to make Docker configuration changes without having to escalate to sudo.

Copy the Aosom-streaming Docker containers over with ‘git clone’.

Set Container Restart Policy

The AOSOM-Streaming package does not set the Docker restart policy; this is up to your orchestration toolchain. Open aosom-streaming/docker-compose.yml and add restart: always to each of the service directives. This ensures that Docker containers are online after a service reboot.

Set up variables.env and start container per Aosom-Streaming application setup section.

Change System Hostname

Modify /etc/hostname to aosom, and change the loopback IP in /etc/hosts to aosom from ubuntu.

Troubleshooting

While most troubleshooting information is included in the Github main page at https://github.com/Apstra/aosom-streaming, you can run some simple commands to make sure the environment is healthy.

Check for Logs from Apstra to Aosom-streaming

Run Docker logs aosomstreaming_telegraf-influx_1

You should see a blueprint ID, and some influxdb ‘write’ events when telemetry events occur on AOS - BGP, liveness, config deviation, etc.

Ensure Containers are Running

To see and ensure that all the expected containers are running, run docker ps: