User Guide
This guide is for anyone who wants to use FinFocus to see costs for their Pulumi infrastructure.
Table of Contents
Section titled “Table of Contents”- What is FinFocus?
- Installation
- Quick Start
- Cost Types
- Cost History
- Common Workflows
- Configuration
- Budget Management
- Output Formats
- Filtering and Grouping
- Debugging and Logging
- Logging Configuration
- Troubleshooting
What is FinFocus?
Section titled “What is FinFocus?”FinFocus is a command-line tool that calculates cloud infrastructure costs from your Pulumi infrastructure definitions.
Key Features:
- 📊 Projected Costs - Estimate costs before deploying
- 💰 Actual Costs - See what you’re actually paying
- 🔌 Multiple Cost Sources - Works with Vantage, local specs, and more
- 🎯 Flexible Filtering - Filter by resource type, tags, or custom criteria
- 📈 Cost Aggregation - Group costs by provider, type, date, or tags
- 📱 Multiple Formats - Table, JSON, or NDJSON output
Installation
Section titled “Installation”Prerequisites
Section titled “Prerequisites”- Pulumi CLI installed and working
- Go 1.27.1+ (if building from source)
- Cloud credentials configured (AWS, Azure, GCP, etc.)
Option 1: Download Binary (Recommended)
Section titled “Option 1: Download Binary (Recommended)”Coming soon - prebuilt binaries for Linux, macOS, and Windows.
Option 2: Build from Source
Section titled “Option 2: Build from Source”git clone https://github.com/rshade/finfocuscd finfocusmake build./bin/finfocus --helpVerify Installation
Section titled “Verify Installation”finfocus --versionfinfocus --helpQuick Start
Section titled “Quick Start”1. Generate Pulumi Plan
Section titled “1. Generate Pulumi Plan”cd your-pulumi-projectpulumi preview --json > plan.json2. View Projected Costs
Section titled “2. View Projected Costs”finfocus cost projected --pulumi-json plan.jsonOutput:
RESOURCE TYPE MONTHLY CURRENCYaws:ec2/instance:Instance aws:ec2:Instance $7.50 USDaws:s3/bucket:Bucket aws:s3:Bucket $0.00 USDaws:rds/instance:Instance aws:rds:Instance $0.00 USD
Total: $7.50 USD3. (Optional) View Actual Costs
Section titled “3. (Optional) View Actual Costs”Requires plugin configuration. See Configuration.
finfocus cost actual --pulumi-json plan.json --from 2024-01-01Cost Types
Section titled “Cost Types”Projected Costs
Section titled “Projected Costs”What it is: Estimated costs based on your infrastructure definitions
When to use:
- Before deploying infrastructure
- During planning and design phases
- Comparing different infrastructure options
Command:
finfocus cost projected --pulumi-json plan.jsonActual Costs
Section titled “Actual Costs”What it is: Real costs from your cloud provider’s billing system
When to use:
- After infrastructure is deployed and running
- Cost optimization and analysis
- Budget tracking and reporting
Command:
finfocus cost actual --pulumi-json plan.json --from 2024-01-01 --to 2024-01-31Note: Requires plugin setup (Vantage, Kubecost, etc.)
Cost Forecast
Section titled “Cost Forecast”cost forecast prices the current plan, then projects that monthly cost
forward. A plugin can mark a resource none, linear, or exponential.
--growth-rate 0.10 is 10% per month. Linear growth is
base * (1 + rate * month). Exponential growth compounds. The current
monthly price does not change.
The default view is an ASCII chart for 12 months ahead. --output json
returns the points with timestamps. When --stack has cost history in the
same currency, that series is included. A missing history file does not fail
the command. The interactive history chart is a separate view.
finfocus cost forecast --pulumi-json plan.json --growth-type linear --growth-rate 0.10finfocus cost forecast --stack prod --months 6 --growth-rate 0.05 --output jsonFull page: cost forecast
Cost History
Section titled “Cost History”cost history stores a projected-cost snapshot for each successful Pulumi
update and charts that timeline later without calling plugins.
collect needs the Pulumi CLI and a cost plugin. It keeps successful
update and destroy checkpoints. A destroy is stored as $0 with the
annotation Stack destroyed. view, list, diff, prune, and export
read the per-stack database only. --versions defaults to 0 (every
checkpoint not already stored).
--versions 1 keeps the newest checkpoint, which is the post-deploy
pattern. CI recipes are in CI/CD cost tracking.
collect prices cloud resources only. Pulumi’s own resources, such as the
default provider (pulumi:providers:aws), are skipped. If a plugin has no
price for another resource, collect stops with no plugin available for resource type and stores nothing for that update, so a checkpoint never holds
an understated total. This includes a resource whose type an installed plugin
declines to price.
import and refresh updates are skipped by design. A checkpoint is a
deployment of the program, so cost that an import adds first appears at the next
update. collect reads the whole Pulumi history, page by page, not only the
newest updates.
collect can run for minutes, so it is not offered as an MCP tool, where it
would stall the server’s other calls. Run it from the CLI. list skips a
database it cannot open, such as one a running collect holds locked, and says
which on stderr. view --provider stops with an error when no snapshot has that
provider, rather than drawing a $0 line, and its caption and amounts use the
snapshots’ currency.
view warns when the selected range mixes currencies and charts the
currency with the most snapshots. --currency USD keeps one currency.
--strict stops instead of dropping the others.
diff compares two stored snapshots by resource URN and prints the
monthly cost impact. --from and --to take a version such as v35 or
a date such as 2025-03-15. --to defaults to the latest snapshot.
--threshold hides smaller changes. --output json prints the delta.
prune deletes old snapshots for one stack. --keep retains the newest
snapshots. --older-than takes a duration such as 365d, 6m, or 2y.
--dry-run prints the plan. --force skips the confirmation. After a
delete, the database is compacted. Set cost.history.retention.auto_prune
to apply max_snapshots and max_age_days after collect.
export writes the same database as JSON, CSV, or NDJSON. --from and
--to limit the dates. --provider keeps one provider’s monthly cost.
When a stack has history, cost projected and cost actual add a Trend
column of Unicode block sparklines. A stack with no history file omits
that column.
finfocus cost history collect --stack devfinfocus cost history view --stack devfinfocus cost history view --stack dev --currency USDfinfocus cost history listfinfocus cost history diff --stack dev --from v35 --to v42finfocus cost history export --stack dev --format jsonfinfocus cost history prune --stack dev --older-than 365d --dry-runDatabases live under the FinFocus config directory in history/, one file per
stack of each project: <project>@<stack>.history.db. Two projects that both
have a stack named dev get separate histories. FinFocus takes the project from
the Pulumi.yaml in the current directory, or from a fully qualified
--stack org/project/dev. A database never accepts snapshots from another
project, and list shows each one as project/stack.
Databases written by earlier versions are named <stack>.history.db. They keep
working: the project is read from the resource URNs they hold, and a project
that does not own one gets a new file instead of sharing it. Outside a project
directory, --stack dev uses a single matching database, and asks for a project
when several match. view --output json prints the snapshots and annotations.
--plain forces the text chart.
Automatic Pulumi Integration
Section titled “Automatic Pulumi Integration”When you run finfocus cost projected or finfocus cost actual inside a Pulumi
project directory, FinFocus automatically detects the project and runs the appropriate
Pulumi CLI command. No flags required.
Simplified Workflow
Section titled “Simplified Workflow”# Just cd into your Pulumi project and runcd my-pulumi-project/finfocus cost projected
# For actual costsfinfocus cost actualThis replaces the manual two-step workflow:
# Old workflow (still supported)pulumi preview --json > plan.jsonfinfocus cost projected --pulumi-json plan.jsonHow Auto-Detection Works
Section titled “How Auto-Detection Works”- FinFocus looks for
Pulumi.yamlorPulumi.ymlin the current directory and parent directories - It verifies the
pulumiCLI is available in your PATH - It determines the active stack (or uses
--stackif provided) - For projected costs: runs
pulumi preview --json - For actual costs: runs
pulumi stack exportand auto-detects the date range from resource timestamps
Stack Selection
Section titled “Stack Selection”Use --stack to target a specific stack without changing your active stack:
finfocus cost projected --stack productionfinfocus cost actual --stack stagingPrecedence Rules
Section titled “Precedence Rules”- Explicit file flags always take priority:
--pulumi-jsonor--pulumi-state - When no file flag is provided, auto-detection is attempted
--stackonly applies during auto-detection (ignored with file flags)
Requirements
Section titled “Requirements”- The
pulumiCLI must be installed and available in PATH - You must be inside a Pulumi project directory (or a subdirectory)
- Environment variables for your cloud provider and Pulumi backend must be configured
Auto-Detection Errors
Section titled “Auto-Detection Errors”If auto-detection fails, you’ll see actionable error messages:
- “pulumi CLI not found”: Install from https://www.pulumi.com/docs/install/
- “no Pulumi project found”: Run from a directory containing
Pulumi.yaml - “no active Pulumi stack”: Use
--stackto specify one, or runpulumi stack select
Zero-Click Cost Estimation (Analyzer)
Section titled “Zero-Click Cost Estimation (Analyzer)”FinFocus can integrate directly with the Pulumi CLI as an Analyzer, providing instant
cost estimates during pulumi preview. This eliminates the need for a separate
finfocus command to see projected costs.
For detailed setup instructions, refer to the Analyzer Setup Guide.
Cross-Provider Aggregation
Section titled “Cross-Provider Aggregation”FinFocus supports aggregating costs across multiple cloud providers and services, allowing you to get a holistic view of your infrastructure spending. This feature is particularly powerful when combining actual cost data from various plugins.
Daily Cost Trends
Section titled “Daily Cost Trends”View daily cost trends across all configured providers for a specific period:
finfocus cost actual --pulumi-json plan.json --from 2025-01-01 --to 2025-01-31 --group-by dailyMonthly Comparison
Section titled “Monthly Comparison”Generate a monthly cost comparison. You can output this as JSON for further processing:
finfocus cost actual --pulumi-json plan.json --from 2025-01-01 --group-by monthly --output jsonSustainability Metrics
Section titled “Sustainability Metrics”FinFocus now supports sustainability metrics, allowing you to estimate the carbon footprint of your infrastructure.
Carbon Footprint
Section titled “Carbon Footprint”The table output includes a “CO₂” column showing the estimated carbon emissions for supported resources.
Example Output:
RESOURCE TYPE MONTHLY CURRENCY CO₂aws:ec2/instance:Instance aws:ec2:Instance $7.50 USD 12.5 kgUtilization Rate
Section titled “Utilization Rate”You can adjust the assumed utilization rate for sustainability calculations using the
--utilization flag. The default is 1.0 (100%).
finfocus cost projected --pulumi-json plan.json --utilization 0.8Common Workflows
Section titled “Common Workflows”1. Check Cost Before Deploying
Section titled “1. Check Cost Before Deploying”# Generate planpulumi preview --json > plan.json
# Check projected costsfinfocus cost projected --pulumi-json plan.json
# Review output and make decisions2. Compare Costs of Different Configurations
Section titled “2. Compare Costs of Different Configurations”# Try one configurationpulumi preview --json > config1.jsonfinfocus cost projected --pulumi-json config1.json
# Switch configuration# ... modify Pulumi code ...
# Try another configurationpulumi preview --json > config2.jsonfinfocus cost projected --pulumi-json config2.json
# Compare outputs3. Track Historical Spending
Section titled “3. Track Historical Spending”# View last 7 daysfinfocus cost actual --from 2024-01-24
# View last monthfinfocus cost actual --from 2024-01-01 --to 2024-01-31
# View by dayfinfocus cost actual --from 2024-01-01 --to 2024-01-31 --group-by daily4. Find Expensive Resources
Section titled “4. Find Expensive Resources”# Sort by cost (output shows highest first)finfocus cost projected --pulumi-json plan.json --output json | jq '.resources | sort_by(.estimatedCost) | reverse'
# Or filter to specific resource typefinfocus cost projected --pulumi-json plan.json --filter "type=aws:rds*"5. Cost by Environment
Section titled “5. Cost by Environment”# Assuming resources are tagged with 'env' tagfinfocus cost actual --filter "tag:env=prod" --from 2024-01-01
finfocus cost actual --filter "tag:env=dev" --from 2024-01-01Configuration
Section titled “Configuration”Using Vantage Plugin
Section titled “Using Vantage Plugin”Vantage provides unified cost data from multiple cloud providers.
Setup:
- Get Vantage API key from Vantage
- Configure plugin (see Vantage Plugin Setup)
- Run commands with Vantage data
Commands:
finfocus cost actual --from 2024-01-01 --to 2024-01-31Using Local Pricing Specs
Section titled “Using Local Pricing Specs”Use local YAML files for cost estimates without external services.
Setup:
- Create YAML spec file:
~/.finfocus/specs/my-specs.yaml - Add resource pricing definitions
- FinFocus automatically uses them
Example spec file:
---resources: aws:ec2/instance:Instance: t3.micro: monthly: 7.50 currency: USD notes: Linux on-demand t3.small: monthly: 15.00 currency: USDBudget Management
Section titled “Budget Management”FinFocus allows you to set spending limits and receive alerts when your cloud costs approach or exceed configured thresholds. This helps you stay in control of your infrastructure spending.
Configuring a Budget
Section titled “Configuring a Budget”Add a budget configuration to your ~/.finfocus/config.yaml:
cost: budgets: amount: 1000.00 currency: USD period: monthly alerts: - threshold: 50 type: actual - threshold: 80 type: actual - threshold: 100 type: forecastedConfiguration Fields:
| Field | Description | Example |
|---|---|---|
amount |
Total spend limit for the period | 1000.00 |
currency |
ISO 4217 currency code | USD, EUR |
period |
Budget period (default: monthly) | monthly |
alerts |
List of threshold alerts | See below |
Alert Configuration:
| Field | Description | Values |
|---|---|---|
threshold |
Percentage of budget that triggers alert | 0 - 1000 |
type |
What spend to check against threshold | actual, forecasted |
Alert Types
Section titled “Alert Types”Actual Alerts (type: actual)
Triggers when your current spending exceeds the threshold percentage of your budget.
alerts: - threshold: 80 type: actual # Alert when actual spend reaches 80% of budgetForecasted Alerts (type: forecasted)
Triggers when your projected end-of-period spend exceeds the threshold. Uses linear extrapolation based on your current daily spending rate.
alerts: - threshold: 100 type: forecasted # Alert when forecasted spend will exceed budgetViewing Budget Status
Section titled “Viewing Budget Status”When a budget is configured, FinFocus automatically displays budget status after cost calculations:
Terminal Output (TTY):
╭──────────────────────────────────────────╮│ BUDGET STATUS ││ ──────────────────────────────────── ││ ││ Budget: $1,000.00/monthly ││ Current Spend: $850.00 (85.0%) ││ [WARNING] Exceeds 80% threshold ││ ││ ██████████████████████████░░░░ 85% ││ ││ ⚠ WARNING - spend exceeds 80% threshold ││ ││ Forecasted: $1,240.00 (124.0%) │╰──────────────────────────────────────────╯CI/CD Output (Non-TTY):
BUDGET STATUS=============Budget: $1000.00/monthlyCurrent Spend: $850.00 (85.0%)Status: [WARNING] Exceeds 80% thresholdForecasted: $1240.00 (124.0%)Progress Bar Colors
Section titled “Progress Bar Colors”The progress bar color indicates budget health:
| Color | Meaning |
|---|---|
| Green | Under 80% of budget |
| Yellow | Between 80% and 100% of budget |
| Red | Over 100% of budget |
Alert Status Levels
Section titled “Alert Status Levels”| Status | Indicator | Description |
|---|---|---|
| OK | (none) | Spend is below threshold |
| APPROACHING | ◉ | Within 5% of threshold (e.g., 75-80%) |
| EXCEEDED | ⚠ | At or above threshold |
Forecasting Logic
Section titled “Forecasting Logic”Forecasted spend uses linear extrapolation:
Forecasted Spend = (Current Spend / Current Day) × Total Days in MonthExample:
- Current day: 15th of a 31-day month
- Current spend: $600
- Daily rate: $600 / 15 = $40/day
- Forecasted spend: $40 × 31 = $1,240
Common Budget Configurations
Section titled “Common Budget Configurations”Basic Budget with Single Alert:
cost: budgets: amount: 500.00 currency: USD alerts: - threshold: 80 type: actualComprehensive Budget with Multiple Alerts:
cost: budgets: amount: 2000.00 currency: USD period: monthly alerts: - threshold: 50 type: actual # Heads-up at 50% - threshold: 80 type: actual # Warning at 80% - threshold: 100 type: actual # Critical at 100% - threshold: 100 type: forecasted # Proactive: warn if forecast exceeds budgetProactive Forecasting Only:
cost: budgets: amount: 1000.00 currency: USD alerts: - threshold: 90 type: forecasted # Warn if forecast will hit 90% - threshold: 100 type: forecasted # Critical if forecast will exceed budgetDisabling Budgets
Section titled “Disabling Budgets”Set the amount to 0 to disable budget tracking:
cost: budgets: amount: 0 # Budget disabledMulti-Currency Support
Section titled “Multi-Currency Support”FinFocus supports multiple currencies for budget display:
| Currency | Symbol |
|---|---|
| USD | $ |
| EUR | € |
| GBP | £ |
| JPY | ¥ |
| CAD | C$ |
| AUD | A$ |
| CHF | CHF |
Note: Budget currency must match your actual cost currency. A currency mismatch will result in an error.
Output Formats
Section titled “Output Formats”cost projected prices the plan as a before and after comparison, so every
format reports each resource’s change. The samples below use one plan: a new
instance, a resized database, and an unchanged bucket.
Changed in v0.4.1. The table used to be a
COST SUMMARYand now is theCOST DIFFtable below, including on a terminal. NDJSON lines used to be one cost result per resource and are now one diff entry with nestedbeforeandaftercost results.summary.totalMonthlyis the projected bill after the plan, so a deleted resource no longer counts toward it. Scripts that read the old NDJSON line shape orCOST SUMMARYneed updating.
Table (Default)
Section titled “Table (Default)”finfocus cost projected --pulumi-json plan.jsonOutput:
COST DIFFBefore 14.30 USDAfter 25.50 USDChange +11.20 USDResources 3 (1 create, 1 update, 0 delete, 1 unchanged)
OP RESOURCE BEFORE AFTER CHANGE CURRENCY+ aws:ec2/instance:Instance/web 0.00 7.50 +7.50 USD~ aws:rds/instance:Instance/db 12.00 15.70 +3.70 USD= aws:s3/bucket:Bucket/assets 2.30 2.30 +0.00 USDOP is + for a create, ~ for an update or replace, - for a delete, and
= for a resource the plan does not change.
finfocus cost projected --pulumi-json plan.json --output jsonOutput (trimmed; each resource also carries adapter, hourly, notes, and
the other cost result fields):
{ "finfocus": { "summary": { "totalMonthly": 25.5, "currency": "USD", ... }, "diff": { "totalBefore": 14.3, "totalAfter": 25.5, "totalDelta": 11.2, "currency": "USD", "creates": 1, "updates": 1, "deletes": 0, "unchanged": 1 }, "resources": [ { "operation": "create", "resourceId": "web", "beforeMonthly": 0, "monthly": 7.5, "deltaMonthly": 7.5, "currency": "USD", ... }, { "operation": "update", "resourceId": "db", "beforeMonthly": 12, "monthly": 15.7, "deltaMonthly": 3.7, "currency": "USD", ... }, { "operation": "same", "resourceId": "assets", "beforeMonthly": 2.3, "monthly": 2.3, "deltaMonthly": 0, "currency": "USD", ... } ] }}NDJSON (Newline-Delimited JSON)
Section titled “NDJSON (Newline-Delimited JSON)”Useful for streaming and pipeline processing. Each line is one diff entry with
the resource’s before and after cost results.
finfocus cost projected --pulumi-json plan.json --output ndjsonOutput (each line trimmed; before and after are full cost results):
{"operation":"create","resourceType":"aws:ec2/instance:Instance","resourceId":"web","before":{...},"after":{...},"deltaMonthly":7.5,"currency":"USD"}{"operation":"update","resourceType":"aws:rds/instance:Instance","resourceId":"db","before":{...},"after":{...},"deltaMonthly":3.7,"currency":"USD"}Filtering and Grouping
Section titled “Filtering and Grouping”Filtering by Resource Type
Section titled “Filtering by Resource Type”# EC2 instances onlyfinfocus cost projected --pulumi-json plan.json --filter "type=aws:ec2*"
# RDS databasesfinfocus cost projected --pulumi-json plan.json --filter "type=aws:rds*"Filtering by Tags
Section titled “Filtering by Tags”# Production resourcesfinfocus cost actual --filter "tag:env=prod" --from 2024-01-01
# Team resourcesfinfocus cost actual --filter "tag:team=platform" --from 2024-01-01
# Multiple conditionsfinfocus cost actual --filter "tag:env=prod AND tag:team=platform" --from 2024-01-01Grouping by Dimension
Section titled “Grouping by Dimension”# By provider (AWS, Azure, GCP)finfocus cost actual --group-by provider --from 2024-01-01
# By resource typefinfocus cost actual --group-by type --from 2024-01-01
# By date (daily breakdown)finfocus cost actual --group-by daily --from 2024-01-01 --to 2024-01-31
# By tagfinfocus cost actual --group-by "tag:env" --from 2024-01-01Debugging and Logging
Section titled “Debugging and Logging”Using Debug Mode
Section titled “Using Debug Mode”FinFocus includes a --debug flag that enables verbose logging to help troubleshoot issues:
# Enable debug output for any commandfinfocus cost projected --debug --pulumi-json plan.json
# Debug output shows:# - Command start/stop with duration# - Resource ingestion details# - Plugin lookup attempts# - Cost calculation decisions# - Fallback behavior when plugins don't return dataExample Debug Output:
2025-01-15T10:30:45Z INF command started command=projected trace_id=01HQ7X2J3K4M5N6P7Q8R9S0T1U component=cli2025-01-15T10:30:45Z DBG loading Pulumi plan plan_path=plan.json component=ingest2025-01-15T10:30:45Z DBG extracted 3 resources from plan component=ingest2025-01-15T10:30:45Z DBG querying plugin for projected cost resource_type=aws:ec2:Instance plugin=vantage component=engine2025-01-15T10:30:46Z DBG plugin returned cost data monthly_cost=7.50 component=engine2025-01-15T10:30:46Z INF projected cost calculation complete result_count=3 duration_ms=245 component=engineEnvironment Variables for Logging
Section titled “Environment Variables for Logging”Configure logging behavior via environment variables:
# Set log level (trace, debug, info, warn, error)export FINFOCUS_LOG_LEVEL=debug
# Set log format (json, text, console)export FINFOCUS_LOG_FORMAT=json
# Inject external trace ID for correlation with other systemsexport FINFOCUS_TRACE_ID=my-pipeline-trace-12345
# Example: Debug with JSON format for log aggregationFINFOCUS_LOG_LEVEL=debug FINFOCUS_LOG_FORMAT=json \ finfocus cost projected --pulumi-json plan.json 2> debug.logConfiguration Precedence
Section titled “Configuration Precedence”Log settings are applied in this order (highest priority first):
- CLI flags (
--debug) - Environment variables (
FINFOCUS_LOG_LEVEL) - Config file (
~/.finfocus/config.yaml) - Defaults (info level, text format)
Trace ID for Debugging
Section titled “Trace ID for Debugging”Every command generates a unique trace ID that appears in all log entries. This helps correlate log entries for a single operation:
# Use external trace ID for pipeline correlationFINFOCUS_TRACE_ID=jenkins-build-123 finfocus cost projected --debug --pulumi-json plan.json
# All logs will include: trace_id=jenkins-build-123Logging Configuration
Section titled “Logging Configuration”FinFocus provides comprehensive logging capabilities for debugging, monitoring, and auditing.
Configuration File
Section titled “Configuration File”Create or edit ~/.finfocus/config.yaml to configure logging:
logging: # Log level: trace, debug, info, warn, error (default: info) level: info
# Log format: json, text, console (default: console) format: json
# Log to file (optional - defaults to stderr) file: /var/log/finfocus/finfocus.log
# Audit logging for compliance (optional) audit: enabled: true file: /var/log/finfocus/audit.logLog Output Locations
Section titled “Log Output Locations”Default Behavior:
- Without configuration: logs go to stderr in console format
- With
--debugflag: forces debug level, console format, and stderr output
File Logging:
When file logging is configured, FinFocus displays the log location at startup:
$ finfocus cost projected --pulumi-json plan.jsonLogging to: /var/log/finfocus/finfocus.logCOST DIFF...Fallback Behavior:
If the configured log file cannot be written (permissions, disk full), FinFocus:
- Falls back to stderr
- Displays a warning with the reason
$ finfocus cost projected --pulumi-json plan.jsonWarning: Could not write to log file, falling back to stderr (permission denied)COST DIFF...Audit Logging
Section titled “Audit Logging”Audit logging tracks all cost queries for compliance and analysis.
Enable Audit Logging:
logging: audit: enabled: true file: /var/log/finfocus/audit.logAudit Log Entry Example:
{ "time": "2025-01-15T10:30:45Z", "level": "info", "audit": true, "command": "cost projected", "trace_id": "01HQ7X2J3K4M5N6P7Q8R9S0T1U", "duration_ms": 245, "success": true, "result_count": 3, "total_cost": 7.5, "parameters": { "pulumi_json": "plan.json", "output": "table" }}Audit Entry Fields:
| Field | Description |
|---|---|
command |
CLI command executed (e.g., “cost projected”, “cost actual”) |
trace_id |
Unique request identifier for correlation |
duration_ms |
Command execution time in milliseconds |
success |
Whether the command completed successfully |
result_count |
Number of resources processed |
total_cost |
Sum of all calculated costs |
parameters |
Command parameters (sensitive values redacted) |
Security: Sensitive parameter values (API keys, passwords, tokens) are automatically redacted in audit logs.
Log Rotation
Section titled “Log Rotation”FinFocus does not perform log rotation internally. Use external tools:
Linux (logrotate):
/var/log/finfocus/*.log { daily rotate 7 compress delaycompress missingok notifempty}systemd journald:
If running as a service, logs go to journald automatically:
journalctl -u finfocus --since todayTroubleshooting
Section titled “Troubleshooting”“No cost data available”
Section titled ““No cost data available””Problem: No pricing information found for resources
Solutions:
- Check if plugin is configured correctly
- Verify API credentials are valid
- Some resources may not have pricing data - this is normal
- Check troubleshooting guide: Troubleshooting
“Invalid date format”
Section titled ““Invalid date format””Problem: Date format not recognized
Solutions:
- Use format:
YYYY-MM-DD(e.g.,2024-01-01) - Or RFC3339:
2024-01-01T00:00:00Z - Example:
--from 2024-01-01 --to 2024-01-31
“Plugin not found”
Section titled ““Plugin not found””Problem: Cost source plugin not installed
Solutions:
# List installed pluginsfinfocus plugin list
# Validate installationsfinfocus plugin validate
# See plugin setup guide for your cost source# - Vantage: docs/plugins/vantage/setup.mdGetting Help
Section titled “Getting Help”- FAQ: Frequently Asked Questions
- Troubleshooting: Detailed Troubleshooting Guide
- Report Issue: GitHub Issues
Next Steps
Section titled “Next Steps”- Quick Start: 5-Minute Quickstart
- Installation: Detailed Installation Guide
- Vantage Setup: Setting up Vantage Plugin
- CLI Reference: Complete CLI Commands
- Examples: Practical Examples
Last Updated: 2025-10-29