07. About the repository content - ksator/junos_monitoring_with_a_TIG_stack GitHub Wiki

Variables

The yaml file data.yml has the details about the Junos devices you want to monitor (ip addresses, ...).

Templates

The directory templates has jinja templates.

The script render.py

This script uses the yaml file data.yml and the templates from the directory templates to generate:

docker-compose

The file docker-compose.yml can be used to manage the TIG stack (create, start, stop, remove).

The file docker-compose.yml is generated from the template docker-compose.j2 and variables data.yml

Makefile

The Makefile can be used to manage the TIG stack as an alternative to docker-compose commands.

Junos

The python file upgrade-junos.py can be used to install the Junos packages openconfig and network agent on the Junos devices

Grafana

The file datasource.yaml is config file.
It contains a list of datasources that will be added during Grafana start up.

The file dashboards.yaml is a config file.
It contains a list of dashboards providers that will load dashboards into Grafana from the local filesystem.
When Grafana starts, it will insert all dashboards json files available in the paths configured in the file dashboards.yaml

The directory dashboards has dashboards json files

All these files are used by the template docker-compose.j2

Telegraf

The yaml file data.yml has the Junos devices details (ip addresses, ...).

The python script render.py generates a telegraf configuration file from a template and variables:

  • The python script render.py uses the yaml file data.yml and the template telegraf-openconfig.j2 to generate the telegraf configuration file for Openconfig telegraf-openconfig.conf
    • The telegraf configuration file telegraf-openconfig.conf uses the telegraf jti_openconfig_telemetry input plugin (grpc client to collect telemetry on junos devices) and influxbd output plugin (database to store the data collected)
    • The telegraf configuration file telegraf-openconfig.conf will create the influxdb database juniper and the influxdb user juniper with a password juniper
  • The python script render.py uses the yaml file data.yml and the template telegraf-snmp.j2 to generate the telegraf configuration file for SNMP telegraf-snmp.conf
    • The telegraf configuration file telegraf-snmp.conf uses the telegraf snmp input plugin (grpc client to collect telemetry on junos devices) and influxbd output plugin (database to store the data collected)
    • The telegraf configuration file telegraf-snmp.conf will create the influxdb database juniper and the influxdb user juniper with a password juniper