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:valueOperators
+(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 healthyDisconnected- Collector is not connectedError- Collector has an errorConfiguring- Collector is applying a new configurationDeleted- Collector is marked for deletionUpgrading- Collector is upgradingPending- Collector is queued for configurationIncompatible- 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:
Text Search
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:ConnectedPlatform filter: Equivalent to
platform:linuxSearch box: Equivalent to text search tokens
Label filters: Equivalent to label-based queries
Advanced Search
The UI search box supports the same query syntax as the CLI.
Type
status:Connectedto filter by statusType
platform:linuxto filter by platformType
environment:productionto filter by labels
Common Use Cases
Environment Management
Maintenance Operations
Configuration Management
Platform-Specific Operations
Examples Summary
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?