Table of Contents
- Overview
- Query Structure and Syntax
- Table Reference
- Filters and Query Expressions
- Query Engine Output Formats
- Automation and Integration
- Best Practices
- Common Troubleshooting Queries
- Release-Specific Changes
- Conclusion
SuzieQ Network Observability: Query Engine Overview
What Is the SuzieQ Query Engine?
SuzieQ’s Query Engine is the analytical heart of the SuzieQ network observability platform. Designed for modern, multi-vendor networks, it enables users to examine, audit, and monitor every aspect of their infrastructure with simple but powerful queries. The engine normalizes device data—regardless of vendor or platform—and makes it accessible in a unified, human-readable manner, bridging gaps in visibility across traditional and cloud-native networks.
Why Is It Important?
Knowing how to leverage the SuzieQ Query Engine is critical for network engineers, architects, and operations teams for several reasons:
- Unified Observability Across Vendors: Gone are the days of using different tools for each vendor. SuzieQ’s vendor-agnostic model means you can query Cisco, Arista, Juniper, SONiC, Cumulus, and many more platforms with identical commands.
- Faster Troubleshooting: Its real-time and historical data access enables quick root cause analysis, link status checks, routing audits, and detection of outages or misconfigurations.
- Consistent Documentation & Audits: Automate evidence gathering for compliance, change management, or asset inventory across all devices in your environment.
- Empowers Automation: Seamless integration via REST API, Python, or scripting helps automate standard checks, report generation, and incident response processes.
- Reduces Complexity: By abstracting away device-specific syntax, it simplifies training, cross-team collaboration, and knowledge sharing.
How Does It Work?
SuzieQ’s Query Engine operates using the following workflow:
- Data Collection: It continuously gathers data from network devices using SSH, APIs, streaming protocols, or cloud-native endpoints.
- Normalization: The data from different vendors is normalized into a common schema. This ensures that querying, filtering, and analyzing are uniform regardless of device differences.
- Query Language: Users interact with the engine using concise, table-based queries similar to SQL or Pandas. Queries follow a format like
<table> <verb> [filters]
, making them intuitive and easy to use. - Filtering and Aggregation: Filters and expressions let you narrow results by hostname, state, time window, VLAN, protocol, interface, and much more. Built-in aggregation and summarization allow for immediate network health snapshots or analytics.
- Multiple Interfaces: You can use SuzieQ’s Query Engine via several frontends—CLI, REST API, Python module, or graphical web UI—depending on your workflow or automation needs.
- Accessible Output: Results are returned in multiple formats (plain text, JSON, CSV, markdown), letting you plug results into automation, reporting, dashboards, or documentation with ease.
SuzieQ’s Query Engine makes network observability accessible, actionable, and ready for automation in any multi-vendor or cloud context. Whether you’re debugging, automating, or reporting, learning how to use it enables a smarter, faster, and more resilient network operations practice.
Query Structure and Syntax
This section outlines how SuzieQ Query Engine organizes and executes queries, with clear examples to help you get started:
-
Understand the Query Format:
- All queries use the structure:
<table> <verb> [filters]
. -
Table:
Indicates the dataset you want to analyze (like
bgp
,interface
, orroute
). -
Verb:
Defines the operation, such as
show
(view entries),summarize
(summary stats), orunique
(distinct values). -
Filters:
Optional conditions to narrow the output (like
state=up
,hostname=spine01
, ormtu=">1500"
).
- All queries use the structure:
-
Basic Query Example:
- Display all BGP sessions:
bgp show
- List interfaces on a specific device:
interface show hostname=spine01
- Display all BGP sessions:
-
Using Filters for Precision:
- Find only non-established BGP sessions:
bgp show state=NotEstd
- Show interfaces that are down:
interface show state=down
- Find only non-established BGP sessions:
-
Leverage Advanced Expressions:
-
Advanced conditions support Pandas-like expressions using
AND
,OR
, and parentheses. -
Example: interfaces with MTU between 1,500 and 9,000:
interface show mtu=">1500 <9000"
-
Advanced conditions support Pandas-like expressions using
-
Select Output Columns and Format:
-
Add
columns=<field1,field2>
to display specific fields. -
Specify return type (
format=json
,format=csv
, etc.) for automation or reporting. -
Example:
route show columns=prefix,nhintf format=csv
-
Add
Table Reference
SuzieQ organizes network information into logical tables. Each table represents a critical aspect of network state, making queries intuitive and efficient. Here’s an overview of the most common tables you’ll use:
-
bgp:
Contains BGP neighbor details, including session status and peer information. Useful for analyzing routing adjacency and connection health. -
ospf:
Holds OSPF adjacency and neighbor state data for devices running OSPF. Ideal for troubleshooting dynamic routing environments. -
route:
Tracks routing table entries, next-hop resolution, and route selection. Crucial for path and reachability checks. -
interface:
Shows device interface information such as operational status, speed, duplex, MTU, and assigned VLANs. -
device:
Lists inventory and metadata, covering device types, roles, operating system versions, and platform details. -
arp:
Contains ARP table entries for mapping IPs to MAC addresses. Useful for troubleshooting L2/L3 issues. -
lldp:
Shows LLDP neighbor data, supporting discovery of physical connections and verifying cabling. -
mac:
Provides MAC forwarding table details. Helps in locating endpoints and analyzing L2 forwarding.
To see a full list of available tables in your SuzieQ deployment, you can run:
table show
Choosing the right table is the first step in crafting a focused and effective network query.
Filters and Query Expressions
Filters and query expressions in SuzieQ empower you to zero in on the network data that matters most. This section walks you through building both simple and advanced filters, step by step.
-
Basic Filtering:
- Focus on a specific device:
hostname="leaf01"
- Match several devices by listing them:
hostname="leaf01" or hostname="spine01"
- Or more efficiently, in a list:
hostname=["leaf01", "spine01"]
- Focus on a specific device:
-
Advanced Filtering:
-
Combine conditions using
and
,or
, and parentheses.
Example:hostname="spine01" and state="up"
-
Exclude items with
!=
:
hostname != "leaf01"
-
Filter numerical values:
mtu > 1500
or1500 < mtu < 9000
-
Combine conditions using
-
Regular Expressions:
-
Use
.str.contains()
for pattern matching.
Example: all hostnames starting with “spine”:hostname.str.contains("spine")
-
Match interface names using patterns:
ifname.str.contains("1/[1-9]$")
-
Use
-
Time and View Filters:
-
Specify a time range for queries:
start-time="-1d"
(last day),end-time="2025-07-23"
-
Control data type shown with
view
:
view=latest
(default) orview=changes
-
Specify a time range for queries:
-
Query Expression Syntax:
-
String equality requires double quotes:
hostname == "leaf01"
- Regular expressions and lists enhance matching power
-
Example combining several techniques:
(hostname=="spine01" or hostname=="spine02") and mtu > 1500
-
String equality requires double quotes:
Use the query_str
parameter for complex expressions and experiment with combining different filters for more targeted results.
Query Engine Output Formats
SuzieQ Query Engine supports several output formats, allowing you to easily integrate its results into different workflows and automation pipelines. Here’s how to select and use each format:
-
Plain Text:
- The default output when running commands interactively or via CLI.
- Human-readable, ideal for troubleshooting directly in a terminal session.
-
Example:
interface show
-
JSON:
- Returns structured output for programmatic processing.
- Well-suited for integration with scripts, APIs, and automation tools.
-
Example:
route show format=json
-
CSV:
- Tabular data export compatible with spreadsheets, reporting software, or custom analytics.
- Easily imported into tools like Excel.
-
Example:
bgp show format=csv
-
Markdown:
- Output is formatted for documentation, wikis, or blog articles.
- Useful for sharing results in collaborative environments.
-
Example:
device show format=markdown
Choose the format that best fits your use case by adding the format
parameter to your query. Adjusting the output makes it simpler to automate reporting, share findings, or feed results into downstream tools in your network operations workflow.
Automation and Integration
SuzieQ is built for integration and automation, enabling network teams to streamline operations, enhance visibility, and embed observability into workflows. Here’s how you can automate SuzieQ and connect it with your existing toolchain:
-
REST API Integration:
- SuzieQ ships with a REST API that exposes the complete suite of query and data retrieval capabilities.
- Automate common tasks—such as fetching interface states or validating BGP sessions—by calling REST endpoints from scripts, orchestration frameworks, or monitoring systems.
-
The REST server includes an interactive Swagger UI interface (usually at
/api/docs
), making it easy to test queries and generate client code. -
Sample API usage to retrieve network device inventory:
GET /api/v1/device/
-
Python Module:
- SuzieQ can be imported as a Python library, letting you interact with network data as Pandas DataFrames.
- Use Python scripts or Jupyter notebooks for custom analysis, scheduled validation, or network documentation generation.
-
Example usage:
from suzieq.sqobjects import get_sqobject
bgp = get_sqobject('bgp')
bgp_tbl = bgp.fetch(hostname="spine01")
-
GUI Integration:
- The Web UI offers intuitive visualization, assisted query-building, and easy export for sharing observability data.
- Useful for teams who want a no-code experience, while advanced users can build and test queries before automating them.
-
Connecting with Third-Party Tools:
- Integrate SuzieQ with inventory platforms such as NetBox for enriched state validation and automated documentation.
- Results from queries can be routed to ticketing, alerting, or change management systems to trigger automated remediation or notifications.
-
Workflow Suggestions:
- Schedule periodic checks—like auditing configurations or validating compliance—using Python scripts or REST endpoints in cron jobs.
- Incorporate SuzieQ queries into CI/CD pipelines to validate infrastructure changes before and after deployments.
- Use webhooks or REST calls to push critical network changes or findings into chatops channels or dashboards.
Whether you prefer scripting, point-and-click, or integrating directly with other automation tools, SuzieQ flexibly adapts to your organization’s observability and network automation workflows.
Best Practices
Applying best practices ensures your SuzieQ experience is efficient, consistent, and delivers reliable network insights. Here’s a step-by-step approach for making the most of SuzieQ Query Engine:
-
Organize by Namespace:
- Use namespaces to logically segment network infrastructure—by location, function, or business unit. This keeps queries focused and makes large environments manageable.
-
Example:
interface show namespace=prod-campus
-
Leverage Filters Early:
-
Always use filters (like
hostname
,state
, ormtu
) to narrow your result sets. This speeds up analysis and reduces noise. -
Example:
route show namespace=prod state=active
-
Always use filters (like
-
Use Time Windows for Change Tracking:
-
Add
start-time
andend-time
to investigate network changes, troubleshooting, or audits. -
Example:
bgp show start-time="-2h"
-
Add
-
Summarize and Get Unique Values:
-
Use
summarize
to get high-level statistics, which are ideal for dashboards and health checks. -
Example:
interface summarize namespace=core
-
Use
unique
to quickly inventory VLANs, next hops, or device types. -
Example:
interface unique vlan
-
Use
-
Automate Checks and Reporting:
- Schedule routine checks using the REST API or Python module to validate states or compliance.
- Output queries in JSON or CSV for integration with ticketing or reporting systems.
-
Example:
device show format=json
-
Track and Document Incidents:
- Export query results in Markdown to share in documentation, wikis, or team chat for faster incident response.
-
Example:
bgp show format=markdown
-
Validate and Standardize Inventory:
- Regularly run inventory queries and validate devices for configuration drift or unexpected changes.
-
Example:
device show
Following these practices will help you achieve faster problem resolution, clearer analytics, and a more reliable, well-documented network environment.
Common Troubleshooting Queries
Being able to quickly pinpoint network issues is essential. SuzieQ comes with a set of practical queries for common troubleshooting scenarios. This section guides you through typical tasks and the queries to accomplish them:
Scenario | Sample Query | Purpose |
---|---|---|
BGP peer down | bgp show state=NotEstd |
List BGP sessions that are not established for rapid troubleshooting of peering issues. |
Interface status summary | interface summarize |
Get a high-level summary of all interface statuses, great for a quick health check. |
All VLANs in use | interface unique vlan |
Inventory which VLANs are actively assigned on interfaces across the environment. |
Historical route changes | route show view=changes start-time=-1d |
View changes to routing tables over the last day for incident reviews or audits. |
Device inventory | device show |
Pull a real-time list of devices and their attributes for validation or documentation. |
You can modify these queries to fit more targeted investigations by applying filters or changing the time range. Having a standard troubleshooting toolkit accelerates both simple checks and deep dives.
Release-Specific Changes
SuzieQ continues to evolve with each release, introducing new features, improvements, and expanded integrations. Stay abreast of the latest updates to take full advantage of recent enhancements. Here’s a step-by-step outline of common change types to watch for:
-
REST API Improvements:
- Performance enhancements in REST endpoints for faster data retrieval.
- Additional endpoints to cover new query types and network state data.
-
More comprehensive error messages and improved documentation at
/api/docs
.
-
Enhanced Filtering Support:
- Support for advanced range queries on numeric fields, improving precision when troubleshooting metrics like MTU or status codes.
- Ability to filter with multiple conditions, regular expressions, and lists.
-
NetBox Integration:
- Multi-tag support in NetBox queries, allowing richer device and inventory selection from automation scripts and UI.
-
Assertion Reason Columns:
- Added columns to assertion outputs to explain the reasoning behind pass/fail states, speeding up root cause analysis.
-
Additional Enhancements:
- UI and CLI refinements for more intuitive workflows.
- Expanded device, interface, or protocol support in logical tables.
- Streamlined export and reporting options for all output formats.
Check release notes regularly to stay updated on new commands, filters, performance tweaks, and integration capabilities in your version of SuzieQ.
Conclusion
Throughout this blog, we explored how SuzieQ’s Query Engine empowers network teams to observe, analyze, and automate complex network environments with clarity and precision. From understanding the structure of SuzieQ queries to mastering filters, output formats, and automation techniques, we’ve walked through the core components that make this platform so effective.
We looked at:
- How SuzieQ structures query syntax to make network data easily accessible across vendors.
- The various tables available to inspect devices, protocols, interfaces, routes, and more.
- Practical ways to use filters, advanced expressions, and regular expressions to refine results.
- Output options like JSON, CSV, Markdown, and how to tailor answers for reports, scripts, and documentation.
- Integration pathways using the REST API, Python, or GUI for workflow automation.
- A collection of troubleshooting queries for day-to-day operations.
- Best practices for maintaining clarity, consistency, and observability across your network.
- What’s new in recent releases that helps you stay on top of your infrastructure with even more efficiency.
SuzieQ isn’t just a visibility tool—it’s a stepping stone to building truly intelligent, automated, and resilient network operations. Whether you’re just starting with SuzieQ or looking to expand your automation playbook, its flexibility will keep you well-positioned for proactive infrastructure management.
Thanks for reading and exploring this with us. Happy querying—and may your network always be visible, validated, and under your control!