Skip to main content

Command Palette

Search for a command to run...

monocle v1.1.0

Updated
4 min read
monocle v1.1.0
M

Principal System Engineer at Cloudflare, founder and maintainer of BGPKIT. Build tools and pipelines to watch BGP data across the Internet.

Monocle v1.1.0 focuses on interface consistency and day-to-day usability. This release simplifies feature gates, standardizes data refresh APIs, and adds quality-of-life improvements across parsing, search, and configuration workflows.

TL;DR

  • Feature flags are now simplified to lib, server, and cli.

  • Config and update flows are more consistent (config update, config backup, config sources, and --no-update).

  • Data refresh APIs are standardized across ASInfo, AS2Rel, RPKI, and Pfx2as.

  • Cache TTL defaults are unified at 7 days, with clearer staleness reporting.

  • Parse/search workflows gain multi-value filters, negation filters, field selection, ordering, timestamp format control, and local cache support.

What's New

Simpler feature flags

The crate feature model is now reduced to three options:

  • lib: complete library functionality (database + lenses + display)

  • server: WebSocket server support (implies lib)

  • cli: full command-line binary (implies lib and server)

This replaces the previous multi-tier setup and makes dependency selection easier for downstream users.

Standardized data refresh APIs

Database refresh behavior is now more uniform across ASInfo, AS2Rel, RPKI, and Pfx2as:

  • Consistent needs_*_refresh(ttl) checks

  • A shared RefreshResult shape with source and load details

  • Standardized naming (refresh_*) with compatibility aliases where needed

  • URL and local-path loading paths available across repositories

This update reduces API drift and makes maintenance code paths more predictable.

Config command updates

Configuration and maintenance commands now use clearer naming:

  • monocle config db-refresh -> monocle config update

  • monocle config db-backup -> monocle config backup

  • monocle config db-sources -> monocle config sources

The global no-refresh toggle was also renamed for consistency:

  • --no-refresh -> --no-update

The following command shows the active configuration, cache TTL settings, database status, and server defaults:

monocle config

Example output:

Monocle Configuration
=====================

General:
  Config file:    /home/user/.monocle/monocle.toml
  Data dir:       /home/user/.monocle/

Cache TTL:
  ASInfo:         7 days
  AS2Rel:         7 days
  RPKI:           7 days
  Pfx2as:         7 days

Database:
  Path:           /home/user/.monocle/monocle-data.sqlite3
  Status:         exists
  Size:           512.47 MB
  Schema:         initialized (v3)
  ASInfo:         120953 records (updated: 2026-02-02 19:54:01 UTC)
  AS2Rel:         877937 records (updated: 2026-02-02 14:25:34 UTC)
  RPKI:           796899 ROAs, 962 ASPAs (updated: 2026-02-10 19:53:50 UTC)
  Pfx2as:         1580626 records (updated: 2026-02-02 20:02:10 UTC)

Better cache control defaults

All major data sources now support configurable cache TTL with a 7-day default. This applies to ASInfo, AS2Rel, RPKI, and Pfx2as.

monocle config sources now reports staleness based on TTL, so it is easier to see what needs updating.

The following command shows per-source status, staleness, and last update recency:

monocle config sources

Example output:

Data Sources:

  Name         Status          Stale      Last Updated
  ------------------------------------------------------------
  asinfo       120953 records  yes        a week ago
  as2rel       877937 records  yes        a week ago
  rpki         797861 records  no         2 hours ago
  pfx2as       1580626 records yes        a week ago

Configuration:
  ASInfo cache TTL: 7 days
  AS2Rel cache TTL: 7 days
  RPKI cache TTL:   7 days
  Pfx2as cache TTL: 7 days

RPKI improvements

Monocle now supports fetching ROAs via RTR (RPKI-to-Router), including endpoint override support and fallback behavior.

The following command refreshes only RPKI data and uses the provided RTR endpoint for this run instead of the default configured source.

monocle config update --rpki --rtr-endpoint rtr.rpki.cloudflare.com:8282

Parse and search enhancements

parse and search gained several output and filtering improvements:

  • Multi-value filters with OR semantics

  • Negation filters using !

  • Validation for ASN/prefix filter inputs

  • --fields for column selection

  • --order-by and --order for sorted output

  • --time-format for unix or RFC3339 display

  • search --cache-dir local file + broker query caching

The following command searches one hour of updates starting at 2024-01-01, filters for prefix 1.1.1.0/24, and caches downloaded MRT files plus broker query results under /tmp/mrt-cache for faster repeat runs.

monocle search -t 2024-01-01 -d 1h -p 1.1.1.0/24 --cache-dir /tmp/mrt-cache

The following command uses multi-value filters with negation to exclude two origin ASNs while also matching either of two peer ASNs:

monocle search -t 2024-01-01 -d 1h -o '!13335,!15169' -J 174,2914

Negation and positive values cannot be mixed within the same filter field.

Breaking Changes and Migration Notes

1) Feature flag migration

If you previously used feature tiers like database, lens-core, lens-bgpkit, lens-full, or display, switch to:

  • lib for library use

  • server for WebSocket API use

  • cli for full command-line use

2) CLI and subcommand renames

Update scripts and automation:

  • --no-refresh -> --no-update

  • config db-refresh -> config update

  • config db-backup -> config backup

  • config db-sources -> config sources

3) Parse/search filter type updates (library API)

ParseFilters moved from scalar optional fields to vector-based values for multi-value and negation support. Library consumers should update filter construction accordingly.

Additional Improvements

  • AS name rendering now prefers PeeringDB naming fields before falling back to AS2Org/core names

  • Data refresh logging now shows specific reasons (empty vs outdated)

  • Example layout was reorganized to one example per lens

Full Change List

See the v1.1.0 section in CHANGELOG.md for the complete list of changes.