Environment variables
Every InfraSage service is configured with environment variables. Set them in your .env file (Docker Compose), a Kubernetes Secret, or your deployment's environment configuration.
Core / shared
| Variable | Default | Required | Description |
|---|---|---|---|
ENVIRONMENT | development | No | Deployment environment: development, staging, production |
LOG_LEVEL | info | No | Log verbosity: debug, info, warn, error |
ClickHouse
| Variable | Default | Required | Description |
|---|---|---|---|
CLICKHOUSE_ADDR | localhost:9000 | Yes | ClickHouse native protocol address |
CLICKHOUSE_DB | infrasage | Yes | Database name |
CLICKHOUSE_USER | infrasage | Yes | Database username |
CLICKHOUSE_PASSWORD | infrasage-dev | Yes | Database password. Change in production. |
Kafka / Redpanda
| Variable | Default | Required | Description |
|---|---|---|---|
REDPANDA_BROKERS | localhost:9092 | Yes | Comma-separated broker addresses |
KAFKA_TOPIC | raw-telemetry | No | Telemetry topic name |
KAFKA_PARTITIONS | 3 | No | Number of topic partitions |
Ingestion Gateway
| Variable | Default | Required | Description |
|---|---|---|---|
GATEWAY_HTTP_PORT | 8080 | No | HTTP listener port |
GATEWAY_METRICS_PORT | 9090 | No | Prometheus metrics port |
INGESTION_WORKER_COUNT | 4 | No | Parallel publish workers |
BATCH_FIREHOSE_SIZE | 10000 | No | Max records per storage batch write |
BATCH_FIREHOSE_TIMEOUT_MS | 5000 | No | Max wait time before flushing a batch (ms) |
BATCH_EXEMPLAR_SIZE | 2000 | No | Max exemplar records per batch |
BATCH_EXEMPLAR_TIMEOUT_MS | 10000 | No | Max wait time for exemplar batch flush (ms) |
Telemetry Operator
| Variable | Default | Required | Description |
|---|---|---|---|
OPERATOR_HTTP_PORT | 8081 | No | HTTP listener port |
OPERATOR_METRICS_PORT | 9091 | No | Prometheus metrics port |
OPERATOR_WORKER_COUNT | 2 | No | Number of stream consumer workers |
AIops Engine
Detection tuning is not configured through environment variables: InfraSage calibrates it per service from each service's own history, and the defaults are what we measure against. If a service alerts too much or too little, contact support.
| Variable | Default | Required | Description |
|---|---|---|---|
AIOPS_HTTP_PORT | 8080 | No | HTTP listener port |
AIOPS_METRICS_PORT | 9092 | No | Prometheus metrics port |
ALERTMANAGER_WEBHOOK_PORT | 9093 | No | Port for Prometheus Alertmanager webhook |
WATCHDOG_INTERVAL_SECONDS | 60 | No | How often detection evaluates (seconds) |
ALERT_DEDUP_MAX_AGE_MINUTES | 60 | No | A firing alert older than this stops absorbing repeat signals; new ones get a new alert |
Log anomaly detection (AIops Engine)
| Variable | Default | Description |
|---|---|---|
LOG_GRACE_PERIOD_MINUTES | 60 | Minutes of log-pattern history a service needs before novel-pattern alerts fire. Prevents floods on new deployments. |
LOG_SEMANTIC_AUTO_DETECT | true | Flag log lines that announce trouble (breaker open, pool exhausted, failover, degraded state), with no application changes. |
LOG_SEMANTIC_ENRICH | true | AI classification and summaries of novel log patterns, with near-duplicates suppressed. Requires an AI provider key. |
Log rate limiting (Ingestion Gateway)
| Variable | Default | Description |
|---|---|---|
LOG_MAX_RAW_PER_SECOND | 1000 | Per-service cap on stored raw log lines. Pattern detection still sees every line. Set to 0 to disable. |
Saturation detector (AIops Engine)
| Variable | Default | Description |
|---|---|---|
SATURATION_DETECTOR_ENABLED | false | Limit-aware rules for bounded metrics (disk, memory, pools, quotas): time to exhaustion, headroom, resources that live high. See Saturation. |
SATURATION_TTE_CRIT_MINUTES | 60 | Projected exhaustion inside this horizon fires high |
SATURATION_TTE_WARN_MINUTES | 360 | … inside this horizon fires medium |
SATURATION_TTE_LOW_MINUTES | 1440 | Slow steady fills landing inside this horizon fire low |
Reliability & rules (AIops Engine)
| Variable | Default | Description |
|---|---|---|
DEADMAN_HEARTBEAT_URL | — | External heartbeat endpoint pinged every time detection finishes evaluating (healthchecks.io, a PagerDuty heartbeat integration, any URL that alerts on missing pings). This is how "InfraSage itself is down" reaches you. See Dead-man's switch. Unset = disabled. |
ALERT_RULES_ENABLED | false | Evaluate operator-defined alert rules once a minute. |
ALERT_RULES_INTERVAL_SECONDS | 60 | Rule evaluation cadence |
ALERT_RULES_MAX_RULES | 500 | Safety ceiling on rules evaluated per tick |
OTEL_TEMPORALITY_NORMALIZE | true | Convert cumulative OTLP counters/histograms to per-interval deltas at ingest. Set false only to reproduce pre-v0.5.0 raw-counter behavior. |
Paging (AIops Engine)
| Variable | Default | Description |
|---|---|---|
PAGERDUTY_ROUTING_KEY | — | PagerDuty Events API v2 integration key. Unset = the PagerDuty channel doesn't exist. |
OPSGENIE_API_KEY | — | Opsgenie Alerts API key. Unset = the Opsgenie channel doesn't exist. |
PAGER_MIN_SEVERITY | high | Minimum alert severity that pages (low|medium|high|critical). Lower tiers reach dashboards and chat channels, not the pager. |
Code Intelligence (AIops Engine)
| Variable | Default | Description |
|---|---|---|
GITHUB_CODEINTEL_TOKEN | — | Read-only GitHub token for indexing deploy diff packs. Unset = code context is dark; change events still record. |
In-cluster runner (runs in your cluster)
| Variable | Default | Description |
|---|---|---|
INFRASAGE_BASE_URL | — | The InfraSage control plane, e.g. https://api.infrasage.dev |
INFRASAGE_API_TOKEN | — | Tenant API token the runner enrolls and polls with |
RUNNER_CLUSTER | — | This cluster's name; must match runbook steps' cluster selectors |
RUNNER_NAMESPACES | — | Optional comma-separated namespaces, informational for the target map |
AI provider
Root cause analysis, the copilot and log-pattern summaries use an AI model. Detection and alerting don't need one.
| Variable | Default | Required | Description |
|---|---|---|---|
LLM_PROVIDER | anthropic | No | anthropic, gemini, bedrock, or local (a model you host behind an OpenAI-compatible API) |
ANTHROPIC_API_KEY | — | For anthropic | Anthropic API key. Get one at console.anthropic.com. |
ANTHROPIC_MODEL | — | No | Model to use, if not the default |
GEMINI_API_KEY | — | For gemini | Google Gemini API key |
GEMINI_MODEL | — | No | Gemini model to use, if not the default |
BEDROCK_MODEL / BEDROCK_INFERENCE_PROFILE | — | For bedrock | A model or inference-profile id your AWS account can invoke |
BEDROCK_HAIKU_MODEL | — | No | Optional faster, cheaper model for simple copilot turns. Unset sends every turn to the main model. |
LOCAL_LLM_ENDPOINT | — | For local | OpenAI-compatible endpoint, e.g. http://ollama.internal:11434/v1 |
LOCAL_LLM_MODEL | — | No | Model name on that endpoint |
LOCAL_LLM_API_KEY | — | No | Key, if your endpoint needs one |
REDACT_PROMPTS_ENABLED | true | No | Mask secrets and personal data in everything sent to the model. See data redaction. |
tip
With no provider key set, anomaly detection and alerting work as usual and root cause analysis falls back to a rule-based analysis. See data residency.
Integrations
Slack
| Variable | Default | Description |
|---|---|---|
SLACK_WEBHOOK_URL | — | Incoming webhook URL for alert notifications |
SLACK_BOT_TOKEN | — | Bot token for interactive approval flows (optional) |
SLACK_CHANNEL | #alerts | Default alert channel |
PagerDuty
| Variable | Default | Description |
|---|---|---|
PAGERDUTY_API_TOKEN | — | PagerDuty API token |
PAGERDUTY_SERVICE_KEY | — | Integration key for incident creation |
Jira
| Variable | Default | Description |
|---|---|---|
JIRA_API_TOKEN | — | Jira API token |
JIRA_DOMAIN | — | Your Jira domain (e.g. mycompany.atlassian.net) |
JIRA_PROJECT_KEY | OPS | Project key for auto-created tickets |
JIRA_USERNAME | — | Jira account email/username |
Microsoft Teams
| Variable | Default | Description |
|---|---|---|
TEAMS_WEBHOOK_URL | — | Teams incoming webhook URL |
AWS CloudWatch
| Variable | Default | Description |
|---|---|---|
AWS_REGION | — | AWS region (e.g. us-east-1) |
AWS_ACCESS_KEY_ID | — | AWS access key (or use IAM role) |
AWS_SECRET_ACCESS_KEY | — | AWS secret key (or use IAM role) |
CLOUDWATCH_POLL_INTERVAL_SECONDS | 60 | How often to poll CloudWatch metrics |
Grafana
| Variable | Default | Description |
|---|---|---|
GF_SECURITY_ADMIN_PASSWORD | admin | Grafana admin password. Change in production. |
GF_SECURITY_ADMIN_USER | admin | Grafana admin username |
Complete .env example
# Core
ENVIRONMENT=production
LOG_LEVEL=info
# ClickHouse
CLICKHOUSE_ADDR=clickhouse:9000
CLICKHOUSE_DB=infrasage
CLICKHOUSE_USER=infrasage
CLICKHOUSE_PASSWORD=CHANGE_ME_SECURE_PASSWORD
# Kafka
REDPANDA_BROKERS=redpanda:29092
# Ingestion tuning (medium scale: 50-500 services)
INGESTION_WORKER_COUNT=16
BATCH_FIREHOSE_SIZE=50000
BATCH_FIREHOSE_TIMEOUT_MS=5000
BATCH_EXEMPLAR_SIZE=10000
# AIops Engine
WATCHDOG_INTERVAL_SECONDS=60
DEADMAN_HEARTBEAT_URL=https://hc-ping.com/YOUR-UUID
# AI
LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-YOUR_KEY_HERE
# Integrations
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK
PAGERDUTY_API_TOKEN=your-pd-token
JIRA_API_TOKEN=your-jira-token
JIRA_DOMAIN=mycompany.atlassian.net
# Grafana
GF_SECURITY_ADMIN_PASSWORD=CHANGE_ME_SECURE_PASSWORD