Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/admbe/FluxOp/llms.txt

Use this file to discover all available pages before exploring further.

Flux stores all data in a single DuckDB file located at FLUX_DUCKDB_PATH (default data/flux.duckdb). The schema is designed to be append-only — collections add rows and materialized “current” tables present the latest state for each resource or scope. Nothing is overwritten on collection; historical snapshots accumulate alongside current views.

Design principles

  • Snapshot, don’t overwrite. Every successful collection appends rows to a *_snapshots table. A corresponding *_current table (or view) presents the newest record per resource ID or scope, so resources absent from a later collection do not silently persist as current.
  • Four hot tables use CREATE OR REPLACE. The highest-read projections — resources_current, costs_current, commitment_costs_current, and policy_posture_current — are rebuilt as full replacement tables after each snapshot write and on startup. This provides O(1) lookup without recomputing arg_max window functions on every API read.
  • Exact-pinned DuckDB version. DuckDB is pinned to 1.4.5 in requirements.txt. A floating version range caused five corruption incidents in five days when different engine builds wrote and checkpointed the same on-disk file. Do not relax this pin.
  • All writes serialized through one worker. The singleton sync worker holds the DuckDB writer lock. Multiple concurrent writers are not safe — read-only API queries must acquire the cross-process read lease, and the web process returns 503 Retry-After rather than hanging when the writer holds the lock.

Configuration and sync

TableDescription
azure_integrationOne active Azure provider configuration: tenant, subscriptions, provider type, and managed-identity settings.
sync_runsSynchronization request state and history. Records are written on enqueue and updated through runningcomplete / failed.
sync_source_runsPer-request, per-source, and per-subscription/scope attempts. Records row counts, retry attempts, and last-good retention status. The worker’s checkpoint table — recovery reads this to skip completed scopes.
source_sync_stateSuccessful collection markers per source and scope. Advances only when a scope fully completes, so a failed or partial run never replaces the previous good result.

Inventory

TableDescription
resource_snapshotsAppend-only inventory and enrichment observations from Azure Resource Graph. Key fields: normalized resource ID, subscription, resource group, resource type, region, name, tags, raw ARG JSON, and nullable enrichment fields (cost, utilization, opportunity kind/reason/savings).
resources_currentCREATE OR REPLACE TABLE rebuilt after each snapshot write. Presents the newest complete ARG snapshot per Azure resource ID. Resources absent from the latest collection are not retained as current.
policy_posture_snapshotsAssignment-level Azure Policy state summaries from ARG, appended per sync.
policy_posture_currentCREATE OR REPLACE TABLE presenting the latest Policy posture per assignment scope.

Cost

TableDescription
cost_snapshotsAppend-only actual and amortized month-to-date resource costs from the Cost Management Query API, one record per resource per subscription per cost type per sync.
costs_currentCREATE OR REPLACE TABLE presenting the latest MTD cost per resource and cost type. Retained independently for each successfully queried subscription — a throttled subscription retains its previous good cost view.
daily_cost_historyCheckpointed actual and amortized daily cost grouped by resource ID and service name. First collection backfills 90 days; later runs replace only a 14-day rolling window. Includes collection lineage.
cost_history_runsDurable daily-history job completion, failure, and retry-priority state per subscription and cost type.
cost_history_scope_runsPer-scope completion and last-good status for the daily-history collector.
cost_details_backfill_scopesPer-subscription, cost-type, and calendar-month checkpoints for the asynchronous Cost Details fallback. Activated when the Query API persistently fails for a scope.
focus_import_runsIdempotent FOCUS v1.0 ingestion job records, one per manifest import attempt.
focus_export_manifestsImport provenance for each discovered FOCUS export manifest blob.
focus_cost_chargesFOCUS v1.0 charge-level ledger: lineage, coverage, pricing model, commitment, resource, and raw source evidence. Current FOCUS dates take precedence over Query API rows for the same period.
commitment_cost_snapshotsActual month-to-date usage cost grouped by Meter ID and Pricing Model (On-demand, Reservation, SavingsPlan). Used for the directional commitment cost-mix dashboard.
commitment_costs_currentCREATE OR REPLACE TABLE presenting the latest commitment cost mix per meter and pricing model.
retail_price_snapshotsAppend-only Azure Retail Prices attempts per region, SKU, OS/license profile, and currency.
retail_prices_currentLast-good, unambiguous VM target rates keyed by region, SKU, OS/license profile, and currency. Spot, Low Priority, tiered, and ambiguous multi-rate matches are excluded.

Cost anomalies

TableDescription
cost_anomaly_runsMethod-versioned anomaly evaluation job records per subscription/scope, including evaluation date, method version, and warm-up status.
cost_anomaly_snapshotsPer-scope, per-service, and per-resource anomaly evaluations. Only anomalous findings and compact warming-up scopes are retained — normal results are not materialized.
cost_anomalies_currentThe current set of active anomaly findings, with baseline evidence and seasonal method lineage.
cost_anomaly_reviewsAdministrator investigation state and notes, keyed to immutable anomaly evidence records.

Opportunities and valuation

TableDescription
advisor_recommendation_snapshotsThe complete set of active Advisor Cost and Performance recommendations per sync, semantically de-duplicated by scope, resource, recommendation type, action, and target context.
advisor_recommendations_currentThe latest complete active Advisor recommendation set.
rule_opportunity_snapshotsVersioned multi-finding Flux Signals rule observations with evidence JSON and confidence.
rule_opportunities_currentThe latest Flux Signals findings per resource.
opportunity_confidence_snapshotsReproducible heuristic confidence scores built from persistence, corroboration, evidence freshness, and telemetry coverage. Method-versioned.
opportunity_confidence_currentThe latest confidence score per opportunity.
opportunity_valuation_snapshots_v2Method-versioned gross and risk-adjusted monthly opportunity values with current Cost Management run rate, target retail meter, Advisor fallback, and calculation lineage.
opportunity_valuation_currentThe latest valuation per opportunity.

Inventory drift

TableDescription
inventory_drift_runsPer-sync drift evaluation job records, including the snapshot pair evaluated and scope-level baseline state.
inventory_changesExact consecutive-snapshot diffs: creates, deletes, resizes, retiers, retags, moves, and reconfigurations, each with governed fingerprint evidence.
inventory_change_anomaliesScope-level median/MAD change-volume baselines and anomaly findings. A scope is warming_up until it has at least FLUX_DRIFT_MIN_BASELINE_POINTS completed drift intervals.

Telemetry and right-sizing

TableDescription
rightsizing_recommendation_snapshotsPer-telemetry-run VM coverage status, governed utilization evidence (CPU, memory, network), candidate action (idle / resize / review), and savings lineage.
rightsizing_recommendations_currentThe latest right-sizing recommendation per VM, including explicit coverage state (no-data, warming-up, partial, conflicting, actionable).
telemetry_metric_samplesDeduplicated incremental LogicMonitor CPU, memory, disk, and network observations. Rolling 30-day retention of raw samples.
telemetry_collection_checkpointsPer-LogicMonitor-device collection progress. Later runs resume without re-reading long history. Records the last collected timestamp per device and datasource.

Intelligence

TableDescription
intelligence_usage_events30-day request timing, token counts, estimated cost, tool calls, errors, user feedback, and browser end-to-end telemetry for every Ask Flux request.
intelligence_transcript_events30-day administrator-reviewable prompts, validated replies, context, and raw final responses. Model reasoning traces are excluded. Set FLUX_AI_TRANSCRIPT_RETENTION_DAYS=0 to disable transcript storage.

FinOps Toolkit

TablesDescription
finops_toolkit_*Checksum-pinned Microsoft FinOps Toolkit v14 reference data: meter-to-service mappings, pricing model eligibility, Hybrid Benefit eligibility references, and import provenance. The checksum pin prevents silent upstream drift.

Virtual tags

TableDescription
virtual_tag_dimensionsRegistered business dimensions (e.g. BusinessRegion, CostCenter, Application). Each dimension has a unique key and display name.
virtual_tag_rulesEffective-dated, prioritized include and exclude assignment rules. Each rule carries a version, audit trail, condition JSON, effectiveFrom/effectiveTo, priority, status (active/inactive), and effect (include/exclude).
virtual_tag_overridesResource-specific manual and imported overrides. Each record carries the resource ID, tag key, tag value, and source (manual or imported).

Notes

Interactive API documentation covering all endpoints and response schemas is available at /docs (FastAPI Swagger UI).
The DuckDB file must not be opened by multiple writers simultaneously. All writes are serialized through the singleton sync worker. The web process acquires a cross-process read lease; API requests return 503 Retry-After rather than hanging when the writer holds the lock.

Build docs developers (and LLMs) love