Skip to content

Local Development Environment Setup

The NetObs app, at the time of this writing, is designed to generate Telegraf configurations for monitoring network devices, enrich data written to a Time Series Database (TSDB), and enhance graphing and alerting capabilities. Additionally, it can back up the "NetObs Stack" configurations from Grafana, Mimir, and Loki, storing them in a Git repository for safekeeping.

This setup guide will help get the app installed in a local instance of Nautobot.

App Installation & Setup

  1. Add the Nautobot NetObs App repository to the pyproject.toml file including proper authentication as this is a private repo. This requires a Personal Access Token to be generated.

    [tool.poetry.dependencies]
    # NetObs App
    nautobot-netobs = { git = "https://<user>:<pa_token>@github.com/networktocode-llc/nautobot-app-netobs.git", rev = "v0.102.0" }
    
  2. Add "nautobot_netobs"to the PLUGINS variable in development/nautobot_config.py.

    PLUGINS = [
        "nautobot_netobs",
    ]
    
  3. Re-deploy Nautobot so the app is installed and then verify the app is installed.

    a. poetry lock --no-update

    b. invoke stop build debug

    Installed Apps

  4. In Nautobot, navigate to Extensibility > Git Repositories to add 2 repositories. Secrets and Secrets Groups will be needed for these repositories. Be sure to use the generated Personal Access Token mentioned above in Secrets.

    a. Add the repository Nautobot NetObs Library: https://github.com/networktocode-llc/nautobot-netobs-library. The Provides setting should be set to Netobs Library.

    b. Add the repository Telegraph Configurations: https://github.com/github_username/telegraf-configurations.git . The Provides setting should be Telegraph Generated Configs.

  5. In Nautobot, navigate to NetObs > Dashboard. Run Import from Netobs Library. Choose Select All for the various groups options. This will import the objects from the Nautobot NetObs Library repository.

  6. In Nautobot, navigate to Organization > Dynamic Groups to add a new dynamic group. A Dynamic Group is a collection of devices monitored using Telegraf. These devices will have Telegraf configurations automatically generated for them. Create the Dynamic Group and any filters associated with it.

  7. In Nautobot, navigate to NetObs > Agent Groups to add a new agent group.

    a. Name: ZID Airspace

    b. Status: Active

    c. Max Devices Per Agent: 50

    • Set to 0 for unlimited, otherwise agents/n number of Telegraf pods will be created and devices evenly distributed among them.

    d. Dynamic Group: Cisco Devices

    e. Location Type: Airspace

    • This will group all devices in that Location Type into a Telegraf instance. i.e. if you have Site selected, a Telegraf instance per site will be created and the devices associated with the given site will be associated with the requisite Telegraf instance assigned to that site.

    f. Agent Naming Pattern: telegraf-{{obj.label}}-{{index}}

    g. Generated Config Repository: telegraf-configurations

    • Repository created earlier.

    h. Agent Configuration Path: {{obj.label}}-{{agent_name}}.conf

    i. Generated Templates:

    • "See documentation for Kubernetes related material."

    j. Jinja Template Path:

    • "See documentation for Kubernetes related material."

    k. Telegraf Plugin Gruops: Cisco IOS-XE

    • This should be the platform of devices in the Dynamic Group.

    l. Connection Type: DNS

    • Use the hostname (DNS) or the primary ip of the device (IP).

    m. Agent Schema: Agent Config (Reference)

    • This section is for advanced usage and beyond the scope of this guide.

    n. Agent Group Details: Default

    • This section is for advanced usage and beyond the scope of this guide.
  8. In Nautobot, navigate to NetObs > Dashboard. Run Telegraf Nautobot Pipeline. Click Select All for Agent Groups.

    a. This will generate the files and push them to your defined Git Repository.

    b. Assign devices to agents. The job figures out how many agents are needed and which devices should be associated with which Telegraf agents based on the settings provided in step 7.

    c. Generate the Telegraf and Kubernetes configurations.

    d. Push any new configurations or changes to the Git Repository.