Set up recurring cost-reduction
log10x_setup_recurringConfigure a recurring autonomous log cost-reduction agent by answering seven setup questions. Generates policy.yaml and a scheduler manifest for Kubernetes, GitHub Actions, or crontab.
Instructions
Conversational wizard that configures a recurring autonomous cost-reduction agent. Walks the user through seven decisions — target services, savings target (%), tick schedule, scheduler runtime, gitops config repo, exception services, and final confirm — then emits two ready-to-commit artifacts: policy.yaml (the declarative policy the tick CLI consumes) and a scheduler manifest (Kubernetes CronJob YAML, GitHub Actions workflow, or crontab entry + wrapper script depending on the chosen scheduler). Each call merges the latest answer into the wizard session and either asks the next missing question or emits the artifacts once all answers are present. Re-invoke with the same session_id on every subsequent turn; sessions live 30 minutes. To skip interactive Q&A, supply all fields (target_services, target_percent, schedule, scheduler, config_plane, confirm: true) in a single call. Optional overrides: exceptions (services never touched), min_delta_pp (minimum savings delta before committing a new CSV, default 2pp), env_id, namespace, secret_name. Apply instructions for the chosen scheduler are in data.apply_instructions. After the first tick runs, call log10x_commitment_report to verify realized savings. REQUIRES nothing deployed to ASK: it renders manifests from your answers and writes to no account. The emitted tick needs a scheduler runtime (k8s CronJob, GitHub Actions, crontab, EventBridge, Container Apps job) and a policy repo or S3 prefix you control before it runs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env_id | No | Log10x environment ID. Auto-detected from LOG10X_ENV_ID when absent. | |
| confirm | No | Set to true to confirm the configuration and emit the artifacts. The wizard asks for confirmation interactively when omitted. | |
| schedule | No | Tick schedule. Presets: daily-03utc (default), every-6h, every-12h, every-24h-localtz. Or pass a raw 5-field cron expression (e.g. "0 5 * * 1"). | |
| namespace | No | Kubernetes namespace for the CronJob. Default: log10x. Only used when scheduler=k8s_cron. | |
| scheduler | No | Where the recurring tick runs. k8s_cron = Kubernetes CronJob (default when kubectl reachable), github_actions = GHA workflow, crontab = crontab + wrapper script, eventbridge = AWS-native (EventBridge Scheduler + CodeBuild, S3 config plane — no cluster, no GitHub; the fit for AWS serverless estates), container_apps_job = Azure-native (Container Apps scheduled Job, git config plane; the fit for Azure serverless estates). | |
| exceptions | No | Service names the policy must never touch (audit / regulatory / executive). Optional — defaults to empty. Pass [] to explicitly clear all exceptions. | |
| session_id | No | Wizard session handle. Omit on the first call — a new session is minted and returned. Pass it back unchanged on every subsequent call. | |
| secret_name | No | Name of the Kubernetes Secret holding LOG10X_API_KEY. Default: log10x-secret. Only used when scheduler=k8s_cron. | |
| config_plane | No | Where the recurring CLI reads policy.yaml and writes updated cap CSVs: a gitops repo URL (e.g. https://github.com/acme/log10x-config), a local path, or — required when scheduler=eventbridge — an S3 prefix (e.g. s3://acme-logs/log10x-config). | |
| min_delta_pp | No | Minimum change in savings percentage points required before the tick commits a new CSV. Default: 2. Set to 0 to commit on every tick. | |
| target_percent | No | Desired savings target, as a percentage of current log volume (1-95). Default: 30. The CLI's per-pattern planner works backward from this target. | |
| target_services | No | Services the policy targets. Empty array = all services. Use service names from `log10x_services`. The wizard asks if omitted. | |
| budget_gb_monthly | No | VOLUME BUDGET: keep monthly ingest for the targeted services at or under this many GB/mo. A standing line, not a one-shot cut: each tick scales the budget to its lookback window and cuts only the overage — already under budget means every pattern passes. Replaces target_percent in policy.yaml (mutually exclusive). Dollar budgets are a one-shot answer via log10x_estimate_savings (budget_usd_monthly); the recurring tick is byte-denominated. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| tool | Yes | ||
| view | No | summary | |
| images | No | ||
| actions | No | ||
| summary | Yes | ||
| warnings | No | ||
| truncated | No | ||
| next_cursor | No | ||
| render_hint | No | ||
| generated_at | Yes | ||
| schema_epoch | Yes | ||
| schema_version | Yes |