### Start REST Server Source: https://context7.com/netenglabs/suzieq/llms.txt Launch the SuzieQ REST API server using command-line arguments. ```bash # Start REST server (uses config from ~/.suzieq/suzieq-cfg.yml) sq-rest-server & # Start with custom config sq-rest-server -c /path/to/suzieq-cfg.yml # Start without HTTPS (not recommended for production) sq-rest-server --no-https # Access API documentation # Swagger UI: https://localhost:8000/api/docs # ReDoc: https://localhost:8000/api/redoc # OpenAPI JSON: https://localhost:8000/api/openapi.json ``` -------------------------------- ### Start Simnodes Source: https://github.com/netenglabs/suzieq/blob/develop/docs/simnode.md Launch the SSH simulator pointing to the directory containing device data. ```bash sq-simnodes -i santa-clara ``` -------------------------------- ### Setup Python Virtual Environment Source: https://github.com/netenglabs/suzieq/blob/develop/docs/getting_started.md Commands to create and activate a virtual environment for SuzieQ. ```bash python -m venv suzieq-env ``` ```bash source bin/activate ``` -------------------------------- ### Install SuzieQ Requirements Source: https://github.com/netenglabs/suzieq/blob/develop/docs/analyzer.md From the SuzieQ directory, install the project's dependencies using pip3 by referencing the requirements.txt file. The --user flag installs packages to the user's home directory, and --disable-pip-version-check prevents warnings about pip version. ```bash pip3 install --user --disable-pip-version-check -r /requirements.txt ``` -------------------------------- ### Example SuzieQ Configuration Source: https://github.com/netenglabs/suzieq/blob/develop/docs/analyzer.md This is an example of a SuzieQ configuration file (suzieq-cfg.yml) specifying directories for data, services, schemas, and temporary files, along with the logging level. ```yaml data-directory: /home/jpiet/parquet-out service-directory: /home/jpiet/suzieq/config schema-directory: /home/jpiet/suzieq/config/schema temp-directory: /tmp/suzieq logging-level: WARNING ``` -------------------------------- ### Run SuzieQ Demo Container Source: https://github.com/netenglabs/suzieq/blob/develop/docs/getting_started.md Starts the SuzieQ demo container and provides access to the CLI and GUI. ```bash docker run -it -p 8501:8501 --name suzieq netenglabs/suzieq-demo suzieq-cli # for the CLI suzieq-gui # for the GUI. Connect to http://localhost:8501 via the browser to access the GUI ``` -------------------------------- ### Install SuzieQ via Pip Source: https://github.com/netenglabs/suzieq/blob/develop/docs/getting_started.md Installs the SuzieQ package using pip. Requires Python 3.8.1 or higher. ```bash pip install suzieq ``` -------------------------------- ### Launch SuzieQ Docker Container Source: https://github.com/netenglabs/suzieq/blob/develop/docs/analyzer.md Starts the SuzieQ environment by mounting a local directory for parquet data. ```bash docker run -it -v :/home/suzieq/parquet --name suzieq netenglabs/suzieq:latest ``` -------------------------------- ### Install SuzieQ using Pip Source: https://github.com/netenglabs/suzieq/blob/develop/README.md Installs the SuzieQ package and its dependencies within the activated Python virtual environment. Ensure the virtual environment is active before running this command. ```bash pip install suzieq ``` -------------------------------- ### Sample Suzieq Hosts File Source: https://github.com/netenglabs/suzieq/blob/develop/docs/hosts-file-format.md An example of a populated Suzieq hosts file demonstrating various URL specifications. ```yaml - namespace: test hosts: - url: ssh://vagrant@192.168.122.20 - url: https://vagrant@192.168.122.150 device=eos - url: ssh://vagrant@192.168.122.37 - url: ssh://vagrant@127.0.0.1:2000 ``` -------------------------------- ### Define a complete SuzieQ inventory file Source: https://github.com/netenglabs/suzieq/blob/develop/docs/inventory.md Example configuration demonstrating the structure of sources, devices, authentication methods, and namespaces. ```yaml sources: - name: netbox-instance-123 token: af8717c89ec0ff420c19d89e6c20646ad55dd54e url: http://127.0.0.1:8000 tag: - suzieq-demo type: netbox period: 3600 - name: dc-02-suzieq-native hosts: - url: ssh://vagrant@10.0.0.1:22 keyfile=/path/to/private_key - url: https://vagrant@10.0.0.2:22 devtype=eos - name: ansible-01 type: ansible path: /path/to/ansible/list devices: - name: devices-without-jump-hosts ignore-known-hosts: true - name: devices-with-jump-hosts transport: ssh jump-host: username@127.0.0.1 jump-host-key-file: /path/to/jump/key ignore-known-hosts: true port: 22 - name: devices-using-rest transport: https devtype: eos auths: - name: credentials-from-file-0 type: cred-file path: /path/to/device/credentials.yaml - name: suzieq-user-01 username: suzieq password: plain:pass - name: suzieq-user-02 username: suzieq password: env:PASSWORD_ENV_VAR - name: suzieq-user-03 username: suzieq password: ask - name: suzieq-user-04 key-passphrase: ask keyfile: path/to/key - name: suzieq-user-05 username: ask password: ask - name: suzieq-user-06 username: env:USERNAME_ENV_VAR password: ask - name: suzieq-user-07 username: env:USERNAME_ENV_VAR password: env:PASSWORD_ENV_VAR - name: suzieq-user-08 username: ask password: env:PASSWORD_ENV_VAR namespaces: - name: testing source: netbox-instance-123 device: devices-with-jump-hosts auth: credentials-from-file-0 ``` -------------------------------- ### GET /help Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/how_to_think_about_verbs.md Retrieves a list of all available commands and services within the SuzieQ CLI environment. ```APIDOC ## GET /help ### Description Lists all available commands and built-in functions supported by the SuzieQ CLI. ### Method GET ### Endpoint help ### Response #### Success Response (200) - **Command** (string) - The name of the command or service. - **Description** (string) - A brief explanation of the command's purpose. ``` -------------------------------- ### Show All Interfaces Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/how_to_think_about_verbs.md Displays all network interfaces across all namespaces. This is a basic command to get an overview. ```bash suzieq> interface show ``` -------------------------------- ### Install SuzieQ via pip Source: https://context7.com/netenglabs/suzieq/llms.txt Installs SuzieQ as a Python package within a virtual environment. This method is recommended for production use. Available commands include `sq-poller`, `suzieq-cli`, `suzieq-gui`, and `sq-rest-server`. ```bash # Create and activate virtual environment python -m venv suzieq-env cd suzieq-env && source bin/activate # Install SuzieQ pip install suzieq # Available commands after installation: # sq-poller - Data collection from network devices # suzieq-cli - Command line interface for analysis # suzieq-gui - Web GUI for visualization # sq-rest-server - REST API server ``` -------------------------------- ### Example of Suzieq CLI Error Output Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/how_to_think_about_verbs.md This example shows the default error message format in the Suzieq CLI when a query fails due to an undefined variable. ```bash suzieq> bgp show query-str='foobar=="user"' error 0 ERROR: UserQueryError: name 'foobar' is not defined suzieq> ``` -------------------------------- ### Launch SuzieQ Docker Container Source: https://github.com/netenglabs/suzieq/blob/develop/docs/rest-server.md Commands to start the SuzieQ container with default or custom port mappings. ```shell docker run -it -p 8000:8000 --name suzieq netenglabs/suzieq:latest ``` ```shell docker run -it -p 7000:8000 --name suzieq netenglabs/suzieq:latest ``` -------------------------------- ### Run SuzieQ Production Container Source: https://context7.com/netenglabs/suzieq/llms.txt Starts a SuzieQ production container, mounting local directories for data and inventory files. Ensure your data and inventory paths are correctly specified. ```bash # Run production container with your own data directory docker run -it -v /home/user/parquet-data:/home/suzieq/parquet \ -v /home/user/inventory.yml:/home/suzieq/inventory.yml \ --name sq-poller netenglabs/suzieq:latest ``` -------------------------------- ### Example SuzieQ Configuration Source: https://github.com/netenglabs/suzieq/blob/develop/docs/config_file.md This snippet shows a basic structure for a SuzieQ configuration file, including settings for data and temporary directories, and configurations for REST and poller components. ```yaml data-directory: /user/parquet-data-dir temp-directory: /tmp/ rest: API_KEY: 496157e6e869ef7f3d6ecb24a6f6d847b224ee4f logging-level: WARNING address: 127.0.0.1 port: 8000 poller: logging-level: WARNING period: 60 connect-timeout: 15 coalescer: period: 1h logging-level: WARNING ``` -------------------------------- ### Launch SuzieQ GUI Docker Container Source: https://github.com/netenglabs/suzieq/blob/develop/docs/gui.md Command to start the SuzieQ GUI in a dedicated Docker container with volume mapping and port forwarding. ```bash docker run -it -v :/home/suzieq/parquet -p 8501:8501 --name suzieq netenglabs/suzieq:latest ``` -------------------------------- ### Launch SuzieQ Poller with Inventory File Source: https://github.com/netenglabs/suzieq/blob/develop/README.md Starts the SuzieQ poller using an inventory file. Use '-D' for SuzieQ native inventory or '-a' for Ansible format. Replace 'inventory.yml' and 'mydatacenter' with your specific file and namespace. ```bash sq-poller -D inventory.yml -n mydatacenter ``` -------------------------------- ### Legacy SuzieQ Inventory Format Source: https://github.com/netenglabs/suzieq/blob/develop/docs/inventory.md Example of a SuzieQ inventory file valid for versions 0.15.x. ```yaml - namespace: eos hosts: - url: https://vagrant@192.168.123.252 devtype=eos - url: ssh://vagrant@192.168.123.232 keyfile=/home/netenglabs/cloud-native-data-center-networking/topologies/dual-attach/.vagrant/machines/internet/libvirt/private_key - url: https://vagrant@192.168.123.164 devtype=eos - url: ssh://192.168.123.70 username=admin password=admin - url: ssh://vagrant@192.168.123.230 keyfile=/home/netenglabs/cloud-native-data-center-networking/topologies/dual-attach/.vagrant/machines/server101/libvirt/private_key - url: ssh://vagrant@192.168.123.54:2023 keyfile=/home/netenglabs/cloud-native-data-center-networking/topologies/dual-attach/.vagrant/machines/server104/libvirt/private_key - url: https://vagrant@192.168.123.123 password=vagrant ``` -------------------------------- ### Launch SuzieQ Docker Container Source: https://github.com/netenglabs/suzieq/blob/develop/docs/poller.md Starts the SuzieQ poller container with mounted volumes for parquet output and inventory configuration. ```bash docker run -it -v /home/${USER}/parquet-out:/home/suzieq/parquet -v /home/${USER}/:/home/suzieq/inventory.yml --name sq-poller netenglabs/suzieq:latest ``` -------------------------------- ### New SuzieQ Inventory Format Source: https://github.com/netenglabs/suzieq/blob/develop/docs/inventory.md Example of the updated inventory format requiring sources and namespaces sections. ```yaml sources: - name: eos-source # namespace is defined below, this is only a name to be used as reference hosts: - url: https://vagrant@192.168.123.252 devtype=eos - url: ssh://vagrant@192.168.123.232 keyfile=/home/netenglabs/cloud-native-data-center-networking/topologies/dual-attach/.vagrant/machines/internet/libvirt/private_key - url: https://vagrant@192.168.123.164 devtype=eos - url: ssh://192.168.123.70 username=admin password=admin - url: ssh://vagrant@192.168.123.230 keyfile=/home/netenglabs/cloud-native-data-center-networking/topologies/dual-attach/.vagrant/machines/server101/libvirt/private_key - url: ssh://vagrant@192.168.123.54:2023 keyfile=/home/netenglabs/cloud-native-data-center-networking/topologies/dual-attach/.vagrant/machines/server104/libvirt/private_key - url: https://vagrant@192.168.123.123 password=vagrant namespaces: - name: eos source: eos-source ``` -------------------------------- ### Show Top Interfaces by Changes Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/how_to_think_about_verbs.md Use the 'top' command to display rows with the maximum value for a specified column. This example shows interfaces with the most changes. ```bash suzieq> interface top what=numChanges namespace=nxos namespace hostname ifname state adminState type mtu vlan master ipAddressList ip6AddressList numChanges timestamp 0 nxos leaf03 Ethernet1/6 up up bond_slave 9216 1 port-channel1 [] [] 6 2021-04-24 07:40:58.539000-07:00 1 nxos leaf04 Ethernet1/6 up up bond_slave 9216 1 port-channel1 [] [] 5 2021-04-24 07:40:59.180000-07:00 2 nxos leaf04 Ethernet1/3 up up bond_slave 9216 20 port-channel3 [] [] 5 2021-04-24 07:40:59.180000-07:00 3 nxos leaf03 Ethernet1/5 up up bond_slave 9216 1 port-channel1 [] [] 5 2021-04-24 07:40:58.539000-07:00 4 nxos leaf04 port-channel3 up up bond 9216 20 port-channel3 [] [] 4 2021-04-24 07:40:59.180000-07:00 suzieq> ``` -------------------------------- ### NXOS show version command output Source: https://github.com/netenglabs/suzieq/blob/develop/docs/developer/adding-a-new-nos.md Example output from the 'show version' command on an NXOS device, highlighting fields for NOS identification, model, and uptime. ```text leaf1# show version Cisco Nexus Operating System (NX-OS) Software TAC support: http://www.cisco.com/tac Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_series_home.html Copyright (c) 2002-2020, Cisco Systems, Inc. All rights reserved. The copyrights to certain works contained herein are owned by other third parties and are used and distributed under license. Some parts of this software are covered under the GNU Public License. A copy of the license is available at http://www.gnu.org/licenses/gpl.html. Nexus 9000v is a demo version of the Nexus Operating System Software BIOS: version NXOS: version 9.3(4) <--- NXOS and version identification BIOS compile time: NXOS image file is: bootflash:///nxos.9.3.4.bin NXOS compile time: 4/28/2020 21:00:00 [04/29/2020 06:28:31] Hardware cisco Nexus9000 C9300v Chassis <--- NXOS Model Identification Intel Core Processor (Skylake, IBRS) with 6096736 kB of memory. Processor Board ID 9R62LBVFU3T Device name: leaf1 bootflash: 4287040 kB Kernel uptime is 2 day(s), 7 hour(s), 11 minute(s), 10 second(s) <--- Uptime Identification Last reset Reason: Unknown System version: Service: plugin Core Plugin, Ethernet Plugin Active Package(s): leaf1# ``` -------------------------------- ### GET /help/{command} Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/how_to_think_about_verbs.md Retrieves detailed help information for a specific command, including available verbs and filtering arguments. ```APIDOC ## GET /help/{command} ### Description Provides detailed documentation for a specific command or service, including available verbs and arguments for filtering data. ### Method GET ### Endpoint help {command} [verb] ### Parameters #### Path Parameters - **command** (string) - Required - The name of the command to query (e.g., bgp, route). - **verb** (string) - Optional - The specific action verb to query (e.g., show). ### Response #### Success Response (200) - **Arguments** (list) - A list of available arguments and filters for the specified command. ``` -------------------------------- ### Query SuzieQ REST API Source: https://github.com/netenglabs/suzieq/blob/develop/docs/rest-server.md Example using curl to fetch device data, requiring an API token. ```shell curl --insecure 'https://localhost:8000/api/v2/device/show?access_token=496157e6e869ef7f3d6ecb24a6f6d847b224ee4f' ``` -------------------------------- ### Map Netbox Sitenames to Namespaces Source: https://github.com/netenglabs/suzieq/blob/develop/docs/inventory.md Configure Netbox data sources and map device sitenames to namespaces. This example shows two Netbox sources and two namespaces, one of which is directly mapped to device sitenames. ```yaml sources: - name: netbox-dc-01 type: netbox token: your-api-token-here url: http://127.0.0.1:8000 tag: - tag1 - tag2, tag3 - name: netbox-dc-02 type: netbox token: your-api-token-here url: http://127.0.0.1:9000 tag: - suzieq auths: - name: auth-st username: user password: my-password namespaces: - name: netbox-sitename # devices namespaces equal to their site names source: netbox-dc-01 auth: auth-st - name: namespace01 # devices namespaces equal to 'namespace01' source: netbox-dc-02 auth: auth-st ``` -------------------------------- ### Start the SuzieQ Poller Source: https://context7.com/netenglabs/suzieq/llms.txt Initiates data collection from network devices using the `sq-poller` command. Specify the inventory file and optionally a custom configuration file. Supports continuous or snapshot modes. ```bash # Start poller in continuous mode (default) sq-poller -I inventory.yml # Start poller with custom config file sq-poller -I inventory.yml -c /path/to/suzieq-cfg.yml # Run in snapshot mode (collect once and exit) sq-poller -I inventory.yml --run-once=update ``` -------------------------------- ### Install Python 3 Pip Source: https://github.com/netenglabs/suzieq/blob/develop/docs/analyzer.md Install the Python 3 pip package manager if it is not already installed on your system. ```bash sudo apt install python3-pip ``` -------------------------------- ### Filter by Hostname Regex (Starts With) Source: https://github.com/netenglabs/suzieq/blob/develop/docs/pandas-query-examples.md Use this to filter hostnames that start with a specific pattern. The asterisk is used as a wildcard. ```python hostname.str.contains("spine*") ``` -------------------------------- ### Run SuzieQ Demo Container Source: https://context7.com/netenglabs/suzieq/llms.txt Launches the SuzieQ demo container with pre-loaded data for immediate exploration. Access the CLI with `suzieq-cli` or the GUI at `http://localhost:8501`. ```bash # Run demo container with pre-loaded data docker run -it -p 8501:8501 --name suzieq netenglabs/suzieq-demo # Inside container, launch CLI or GUI suzieq-cli # For command line interface suzieq-gui # For web GUI at http://localhost:8501 ``` -------------------------------- ### Run SuzieQ Demo Container Source: https://github.com/netenglabs/suzieq/blob/develop/docs/time.md Command to initialize the SuzieQ demo environment and access the CLI. ```bash docker run -it netenglabs/suzieq-demo suzieq-cli // run this command inside the container get into the CLI. ``` -------------------------------- ### Execute a get operation on a table Source: https://github.com/netenglabs/suzieq/blob/develop/docs/developer/pythonAPI.md Invoke the get method on a previously initialized table handle to retrieve data. ```python ospf_df = ospf_tbl().get() ``` -------------------------------- ### Install Python 3.7 on Ubuntu 18.04 Source: https://github.com/netenglabs/suzieq/blob/develop/docs/analyzer.md Use these commands to add the deadsnakes PPA and install Python 3.7 and its development package on Ubuntu 18.04. ```bash sudo add-apt-repository ppa:deadsnakes/ppa sudo apt install python3.7 python3.7-dev ``` -------------------------------- ### Run SuzieQ Demo Docker Container Source: https://github.com/netenglabs/suzieq/blob/develop/README.md Launches a pre-built SuzieQ demo container with included data. Use 'suzieq-cli' for command-line access or 'suzieq-gui' to access the web interface. ```bash docker run -it -p 8501:8501 --name suzieq netenglabs/suzieq-demo ``` -------------------------------- ### GET /api/v2/path/show Source: https://context7.com/netenglabs/suzieq/llms.txt Trace the network path between two endpoints. ```APIDOC ## GET /api/v2/path/show ### Description Trace the path between a source and destination IP address. ### Method GET ### Endpoint /api/v2/path/show ### Parameters #### Query Parameters - **access_token** (string) - Required - API authentication token - **src** (string) - Required - Source IP address - **dest** (string) - Required - Destination IP address - **namespace** (string) - Optional - Network namespace ``` -------------------------------- ### Initialize SuzieQ with Custom Config Source: https://context7.com/netenglabs/suzieq/llms.txt Load a custom YAML configuration file to initialize the SuzieQ context. ```python from suzieq.sqobjects import get_sqobject from suzieq.shared.context import SqContext from suzieq.shared.utils import load_sq_config # Load custom config cfg = load_sq_config(config_file='/path/to/suzieq-cfg.yml') # Create context with config ctxt = SqContext(cfg=cfg) # Use context with table objects bgp_tbl = get_sqobject('bgp') bgp_df = bgp_tbl(context=ctxt).get() ``` -------------------------------- ### GET /api/v2/network/find Source: https://context7.com/netenglabs/suzieq/llms.txt Finds the network attachment point for a specific address. ```APIDOC ## GET /api/v2/network/find ### Description Finds the network attachment point for a given IP address within a specific namespace. ### Method GET ### Endpoint /api/v2/network/find ### Parameters #### Query Parameters - **access_token** (string) - Required - API authentication token - **address** (string) - Required - The IP address to locate - **namespace** (string) - Required - The network namespace to search ``` -------------------------------- ### Access Suzieq Help Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/10things.md Display available commands within the Suzieq CLI. ```text ? ``` -------------------------------- ### GET /api/v2/route/show Source: https://context7.com/netenglabs/suzieq/llms.txt Query routing tables with support for protocol, VRF, and column filtering. ```APIDOC ## GET /api/v2/route/show ### Description Retrieve routing table entries. ### Method GET ### Endpoint /api/v2/route/show ### Parameters #### Query Parameters - **access_token** (string) - Required - API authentication token - **protocol** (string) - Optional - Filter by routing protocol - **vrf** (string) - Optional - Filter by VRF - **columns** (string) - Optional - Specify columns to return ``` -------------------------------- ### GET /api/v2/device/show Source: https://context7.com/netenglabs/suzieq/llms.txt Retrieve device information with optional filtering by namespace, status, or vendor. ```APIDOC ## GET /api/v2/device/show ### Description Retrieve a list of devices and their current status. ### Method GET ### Endpoint /api/v2/device/show ### Parameters #### Query Parameters - **access_token** (string) - Required - API authentication token - **namespace** (string) - Optional - Filter by network namespace - **status** (string) - Optional - Filter by device status (e.g., alive) - **vendor** (string) - Optional - Filter by device vendor ``` -------------------------------- ### Configure Poller Workers Source: https://github.com/netenglabs/suzieq/blob/develop/docs/poller.md Example of launching the poller with a specific number of worker processes. ```shell sq-poller -I inventory -w 2 ``` -------------------------------- ### Enable Nginx Configuration Source: https://github.com/netenglabs/suzieq/blob/develop/docs/gui.md Create a symbolic link to enable the SuzieQ Nginx configuration. ```bash ln -s /etc/nginx/sites-available/suzieq.conf /etc/nginx/sites-enabled/suzieq.conf ``` -------------------------------- ### Reuse source configurations with copy Source: https://github.com/netenglabs/suzieq/blob/develop/docs/inventory.md Demonstrates how to replicate an existing source configuration and override specific fields. ```yaml - name: netbox-orig type: netbox token: your-api-token-here url: http://127.0.0.1:8000 tag: - suzieq-demo period: 3600 - name: netbox-copy # This source will use the same set of parameters of 'netbox-orig' copy: netbox-orig # and only overrides the 'tag' field. tag: - suzieq-copy ``` -------------------------------- ### GET /api/v2/bgp/show Source: https://context7.com/netenglabs/suzieq/llms.txt Queries historical BGP data using time-based filters or view parameters. ```APIDOC ## GET /api/v2/bgp/show ### Description Retrieves historical BGP data. Supports filtering by start time, end time, or viewing all historical records. ### Method GET ### Endpoint /api/v2/bgp/show ### Parameters #### Query Parameters - **access_token** (string) - Required - API authentication token - **start_time** (string) - Optional - Start timestamp for historical query - **end_time** (string) - Optional - End timestamp for historical query - **view** (string) - Optional - Set to 'all' to view all historical data ``` -------------------------------- ### GET /api/v2/bgp/show Source: https://context7.com/netenglabs/suzieq/llms.txt Query BGP session data with support for state, ASN, and namespace filtering. ```APIDOC ## GET /api/v2/bgp/show ### Description Retrieve BGP session information. ### Method GET ### Endpoint /api/v2/bgp/show ### Parameters #### Query Parameters - **access_token** (string) - Required - API authentication token - **state** (string) - Optional - Filter by session state (e.g., Established) - **namespace** (string) - Optional - Filter by namespace - **asn** (string) - Optional - Filter by ASN - **format** (string) - Optional - Output format (csv, markdown) ``` -------------------------------- ### Create Inventory File Source: https://github.com/netenglabs/suzieq/blob/develop/docs/simnode.md Configuration file to map the local SSH simulator ports to the SuzieQ poller. ```yaml --- sources: - name: simnode_testing hosts: - url: ssh://vagrant@127.0.0.1:10000 password=vagrant - url: ssh://vagrant@127.0.0.1:10001 password=vagrant - url: ssh://vagrant@127.0.0.1:10002 password=vagrant - url: ssh://vagrant@127.0.0.1:10003 password=vagrant devices: - name: default ignore-known-hosts: true devtype: iosxe namespaces: - name: testing source: simnode_testing device: default ``` -------------------------------- ### Launch SuzieQ CLI Source: https://github.com/netenglabs/suzieq/blob/develop/docs/remote-cli.md Execute the CLI command after configuring the remote REST engine. ```bash suzieq-cli ``` -------------------------------- ### Build Docker Container Source: https://github.com/netenglabs/suzieq/blob/develop/docs/developer/release-checklist.md Build the SuzieQ demo Docker container. Use 'nightly' or 'rc' options for specific build types. ```bash docker build -t netenglabs/suzieq-demo:latest ``` -------------------------------- ### Explore SuzieQ CLI Tables Source: https://context7.com/netenglabs/suzieq/llms.txt Commands to list available tables, inspect schemas, and view specific columns. ```bash # List all available tables suzieq-cli table show # Describe table schema suzieq-cli bgp describe suzieq-cli interface describe suzieq-cli route describe # Show all columns for any table suzieq-cli bgp show columns='*' ``` -------------------------------- ### Define an Augmented Column in BGP Table Source: https://github.com/netenglabs/suzieq/blob/develop/docs/developer/augmented-columns.md Example of defining an augmented column that concatenates existing fields within the same table. ```json { "name": "afiSafi", "type": "string", "description": "space separated concat of afi and safi fields", "depends": "afi safi" } ``` -------------------------------- ### Enable All Columns Display in Suzieq CLI Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/how_to_think_about_verbs.md Use `set all-columns=yes` to display all columns, allowing them to wrap if necessary. This ensures no data is hidden due to column limitations. ```bash suzieq> set all-columns=yes ``` -------------------------------- ### Activate SuzieQ Virtual Environment Source: https://github.com/netenglabs/suzieq/blob/develop/README.md Activates the previously created 'suzieq' virtual environment. This command needs to be run in the directory containing the 'suzieq' virtual environment folder. ```bash source activate ``` -------------------------------- ### Define a Cross-Table Augmented Column Source: https://github.com/netenglabs/suzieq/blob/develop/docs/developer/augmented-columns.md Example of defining an augmented column that depends on a field from another table, currently not supported in Phase 1. ```json { "name": "os", "type": "string", "description": "network os that created this entry", "depends": "device:os" } ``` -------------------------------- ### Summarize Network Routes Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/10things.md Use 'route summarize' to get an overview of routes within a specified namespace. This provides aggregated data similar to 'bgp summarize'. ```bash route summarize namespace=single-attach_bgp_numbered ``` -------------------------------- ### Show Top Device by Uptime Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/how_to_think_about_verbs.md Use the 'top' command to find the device with the maximum uptime. The 'top' command can only be used with numeric columns. ```bash suzieq> device top what=uptime namespace=nxos namespace hostname model version vendor architecture status address bootupTimestamp uptime timestamp 0 nxos dcedge01 vqfx-10000 19.4R1.10 Juniper alive 10.255.2.250 2021-04-21 06:52:09.329000-07:00 3 days 00:48:49 2021-04-24 07:40:58.329000-07:00 1 nxos firewall01 vm 18.04.3 LTS Ubuntu x86-64 alive 10.255.2.249 2021-04-21 06:52:12-07:00 3 days 00:48:44.497000 2021-04-24 07:40:56.497000-07:00 2 nxos exit01 Nexus9000 C9300v Chassis 9.3(4) Cisco Intel Core Processor (Skylake, IBRS) alive 10.255.2.253 2021-04-21 06:53:03-07:00 3 days 00:48:02.064000 2021-04-24 07:41:05.064000-07:00 3 nxos exit02 Nexus9000 C9300v Chassis 9.3(4) Cisco Intel Core Processor (Skylake, IBRS) alive 10.255.2.254 2021-04-21 06:53:08-07:00 3 days 00:47:57.196000 2021-04-24 07:41:05.196000-07:00 4 nxos spine01 Nexus9000 C9300v Chassis 9.3(4) Cisco Intel Core Processor (Skylake, IBRS) alive 10.255.2.119 2021-04-21 06:53:10-07:00 3 days 00:47:53.589000 2021-04-24 07:41:03.589000-07:00 suzieq> ``` -------------------------------- ### Get Unique MTU Values Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/how_to_think_about_verbs.md Use the 'unique' command to list all distinct MTU values found in the 'eos' namespace. This helps in understanding the variety of MTU configurations. ```bash suzieq> interface unique columns=mtu namespace=eos mtu 0 -1 1 1500 2 1514 3 9164 4 9214 5 9216 6 65535 7 65536 suzieq> ``` -------------------------------- ### Show Devices in Namespace Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/how_to_think_about_verbs.md Use the 'device show' command to display basic information about network devices within a specific namespace. This command retrieves data from a single table and shows a limited set of available columns. ```bash suzieq> device show namespace=nxos namespace hostname model version vendor architecture status address bootupTimestamp 0 nxos dcedge01 vqfx-10000 19.4R1.10 Juniper alive 10.255.2.250 2021-04-21 06:52:09.329000-07:00 1 nxos exit01 Nexus9000 C9300v Chassis 9.3(4) Cisco Intel Core Processor (Skylake, IBRS) alive 10.255.2.253 2021-04-21 06:53:03-07:00 2 nxos exit02 Nexus9000 C9300v Chassis 9.3(4) Cisco Intel Core Processor (Skylake, IBRS) alive 10.255.2.254 2021-04-21 06:53:08-07:00 3 nxos firewall01 vm 18.04.3 LTS Ubuntu x86-64 alive 10.255.2.249 2021-04-21 06:52:12-07:00 4 nxos leaf01 Nexus9000 C9300v Chassis 9.3(4) Cisco Intel Core Processor (Skylake, IBRS) alive 10.255.2.189 2021-04-21 15:22:51-07:00 5 nxos leaf02 Nexus9000 C9300v Chassis 9.3(4) Cisco Intel Core Processor (Skylake, IBRS) alive 10.255.2.188 2021-04-21 15:23:03-07:00 6 nxos leaf03 Nexus9000 C9300v Chassis 9.3(4) Cisco Intel Core Processor (Skylake, IBRS) alive 10.255.2.190 2021-04-21 15:23:16-07:00 7 nxos leaf04 Nexus9000 C9300v Chassis 9.3(4) Cisco Intel Core Processor (Skylake, IBRS) alive 10.255.2.191 2021-04-21 15:23:33-07:00 8 nxos server101 vm 18.04.3 LTS Ubuntu x86-64 alive 10.255.2.204 2021-04-23 05:53:01-07:00 9 nxos server102 vm 18.04.3 LTS Ubuntu x86-64 alive 10.255.2.39 2021-04-23 05:53:01-07:00 10 nxos server301 vm 18.04.3 LTS Ubuntu x86-64 alive 10.255.2.140 2021-04-23 05:53:01-07:00 11 nxos server302 vm 18.04.3 LTS Ubuntu x86-64 alive 10.255.2.114 2021-04-23 05:53:01-07:00 12 nxos spine01 Nexus9000 C9300v Chassis 9.3(4) Cisco Intel Core Processor (Skylake, IBRS) alive 10.255.2.119 2021-04-21 06:53:10-07:00 13 nxos spine02 Nexus9000 C9300v Chassis 9.3(4) Cisco Intel Core Processor (Skylake, IBRS) alive 10.255.2.120 2021-04-21 06:53:14-07:00 ``` -------------------------------- ### Display SuzieQ database tables Source: https://github.com/netenglabs/suzieq/blob/develop/docs/analyzer.md Use this command to list all tables in the database and view associated statistics. ```text table show ``` -------------------------------- ### Summarize Network Interfaces Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/how_to_think_about_verbs.md Use 'interface summarize' to get a summary of network interface statistics within a specified namespace. This includes counts of various interface states and configurations. ```bash suzieq> interface summarize namespace=eos eos deviceCnt 14 interfaceCnt 186 devicesWithL2Cnt 6 devicesWithVxlanCnt 6 ifDownCnt 1 ifAdminDownCnt 0 ifWithMultipleIPCnt 8 uniqueMTUCnt 8 uniqueIfTypesCnt 13 speedCnt 5 ifChangesStat [0, 0, 0.0] ifPerDeviceStat [5, 42, 11.5] uniqueIPv4AddrCnt 55 uniqueIPv6AddrCnt 0 suzieq> ``` -------------------------------- ### List available SuzieQ commands Source: https://github.com/netenglabs/suzieq/blob/develop/docs/tutorials/how_to_think_about_verbs.md Displays the full list of available commands and built-in utilities within the SuzieQ interactive shell. ```bash suzieq> help +-----------+-----------------------------------------------------------------+ | Command | Description | +-----------+-----------------------------------------------------------------+ | ? | help | | address | Act on interface addresses | | arpnd | Act on ARP/ND data | | bgp | Act on BGP data | | clear | clear certain contexts for subsequent commands. Cmd is additive | | devconfig | Act on device data | | device | Act on device data | | evpnVni | Act on EVPN VNI data | | fs | Act on File System data | | help | help | | interface | Act on Interface data | | inventory | Act on inventory data | | lldp | Act on LLDP data | | mac | Act on MAC Table data | | mlag | Act on mlag data | | namespace | Summarize namespace-wide network data | | network | Act on network-wide data | | ospf | Act on OSPF data | | path | build and act on path data | | route | Act on Routes | | set | set certain contexts for subsequent commands. Cmd is additive | | sqPoller | Act on SqPoller data | | table | get data about data captured for various tables | | topcpu | Act on topcpu data | | topmem | Act on topmem data | | topology | build and act on topology data | | version | print the suzieq version | | vlan | Act on vlan data | +-----------+-----------------------------------------------------------------+ Built-in Commands +----------+------------------------------------------------------------------+ | Command | Description | +----------+------------------------------------------------------------------+ | :verbose | Prints or changes verbosity level, accepts integer or True/False | | connect | Start the interactive mode | | exit | Exits the program | | q | Exits the program | | quit | Exits the program | +----------+------------------------------------------------------------------+ Use help [] to get more help For example: help route or help route show suzieq> ``` -------------------------------- ### Show BGP Connections Source: https://github.com/netenglabs/suzieq/blob/develop/docs/analyzer.md Displays detailed information about each BGP connection, including state, ASNs, and connection statistics. Use this to get a comprehensive view of BGP peering status. ```bash bgp show ``` -------------------------------- ### Run SuzieQ Poller Container Source: https://github.com/netenglabs/suzieq/blob/develop/docs/getting_started.md Launches the SuzieQ container with a mounted directory for data storage and attaches to the session. ```bash docker run -it -v dbdir:/home/suzieq/parquet --name sq-poller netenglabs/suzieq docker attach sq-poller # connect to the container ```