08. Requirements to use this repository - ksator/junos_monitoring_with_a_TIG_stack GitHub Wiki

Docker
Docker-compose
Python
Junos packages
Junos configuration

Docker

You need to install docker

Check if Docker is already installed

$ docker --version

If it was not already installed, install it. Here's how to install in on Ubuntu 16.04:

$ sudo apt-get update
$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce
$ sudo docker run hello-world
$ sudo groupadd docker
$ sudo usermod -aG docker $USER

Exit the ssh session to your ubuntu and open an new ssh session to your ubuntu and run these commands to verify you installed Docker properly:

$ docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/
$ docker --version
Docker version 18.03.1-ce, build 9ee9f40

Docker compose

You need to install docker-compose

Check if docker compose is already installed

$ docker-compose --version

If it was not already installed, install it.
Here's how to install in on Ubuntu 16.04:

$ sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

Apply executable permissions to the binary:

$ sudo chmod +x /usr/local/bin/docker-compose

Verify

$ docker-compose --version

Python

The python scripts in this repository has dependencies.

$ git clone https://github.com/ksator/junos_monitoring_with_a_TIG_stack.git
$ cd junos_monitoring_with_a_TIG_stack
$ pip install -r requirements.txt

Junos

Junos packages

In order to collect data from Junos using openconfig telemetry, the devices require the Junos packages openconfig and network agent
Starting with Junos OS Release 18.3R1, the Junos OS image includes these 2 packages; therefore, you do not need anymore to install them separately on your device.
If you are using an older Junos release, it is required to install these two packages separately.

Run this command to verify:

jcluser@vMX1> show version | match "Junos:|openconfig|na telemetry"

You can use the python script upgrade-junos.py to install these 2 packages on your Junos devices:

  • git clone https://github.com/ksator/junos_monitoring_with_a_TIG_stack.git
  • cd junos_monitoring_with_a_TIG_stack
  • download the Junos packages openconfig and network agent from http://download.juniper.net/ and save them in the junos_monitoring_with_a_TIG_stack directory
  • Update the file data.yml with your devices details vi data.yml
  • Execute the python script upgrade-junos.py python ./upgrade-junos.py

Junos configuration

This sort of configuration is required if you use the telegraf input plugin snmp

jcluser@vMX-1> show configuration snmp
community public;

This sort of configuration is required if you use the telegraf input plugin jti_openconfig_telemetry

jcluser@vMX-1> show configuration system services extension-service | display set
set system services extension-service request-response grpc clear-text port 32768
set system services extension-service request-response grpc skip-authentication
set system services extension-service notification allow-clients address 0.0.0.0/0

This sort of configuration is required if you use NETCONF

jcluser@vMX-1> show configuration system services netconf | display set
set system services netconf ssh