Filtering with Query Syntax

The Bindplane query syntax provides a powerful way to filter and search resources using a flexible token-based format.

This guide covers how to use the --query flag in the CLI and equivalent filtering in the UI using the Filter bar on the Agents and Configurations pages.

What is Query Syntax?

Query syntax allows you to filter and search Bindplane resources using a token-based format. You can filter collectors by status, platform, version, and other fields, search by labels and configuration names, use negation operators to exclude specific criteria, and combine multiple conditions with AND logic.

Basic Syntax

Token Format

Queries are composed of space-separated tokens in the format:

[operator]name:value

Operators

  • + (optional): Positive match (default)

  • - : Negation (NOT match)

  • No operator: Positive match (default)

Field-Based Filtering

Agent Status

Filter collectors by their connection and operational status:

Available Status Values:

  • Connected - Collector is connected and healthy

  • Disconnected - Collector is not connected

  • Error - Collector has an error

  • Configuring - Collector is applying a new configuration

  • Deleted - Collector is marked for deletion

  • Upgrading - Collector is upgrading

  • Pending - Collector is queued for configuration

  • Incompatible - Collector configuration is incompatible

Platform and Architecture

Filter by system characteristics:

Version Management

Filter by collector version:

Collector Type and Identity

Filter by collector type and identification:

Label-Based Filtering

Labels are key-value pairs that provide flexible categorization:

Configuration-Based Filtering

Filter collectors by their configuration assignments:

Rollout-Based Filtering

Filter collectors by their rollout status:

Perform substring matching across all searchable fields:

Complex Queries

Combine multiple conditions for precise filtering:

Quoted Values

Use quotes to include spaces in values:

Using Queries with Commands

Get Command

Delete Command

Label Command

UI Filtering Equivalents

In the Bindplane UI, you have access to the same filtering.

Collector List Filters

  • Status dropdown: Equivalent to status:Connected

  • Platform filter: Equivalent to platform:linux

  • Search box: Equivalent to text search tokens

  • Label filters: Equivalent to label-based queries

The UI search box supports the same query syntax as the CLI.

  • Type status:Connected to filter by status

  • Type platform:linux to filter by platform

  • Type environment:production to filter by labels

Common Use Cases

Environment Management

Maintenance Operations

Configuration Management

Platform-Specific Operations

Examples Summary

Use Case
Query Example

Find connected collectors

status:Connected

Find Linux collectors

platform:linux

Find production collectors

environment:production

Find collectors with errors

status:Error

Find collectors needing updates

outOfDate:true

Find collectors with specific config

configuration:web-config

Find collectors NOT in test

-environment:test

Find collectors with latest version

version:latest

Find collectors by hostname pattern

hostname:web-*

Find collectors with rollout errors

rollout-error:

The query syntax provides a powerful and flexible way to filter Bindplane resources, enabling efficient management and automation of your telemetry infrastructure.

Last updated

Was this helpful?