Skip to main content

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​

VariableDefaultRequiredDescription
ENVIRONMENTdevelopmentNoDeployment environment: development, staging, production
LOG_LEVELinfoNoLog verbosity: debug, info, warn, error

ClickHouse​

VariableDefaultRequiredDescription
CLICKHOUSE_ADDRlocalhost:9000YesClickHouse native protocol address
CLICKHOUSE_DBinfrasageYesDatabase name
CLICKHOUSE_USERinfrasageYesDatabase username
CLICKHOUSE_PASSWORDinfrasage-devYesDatabase password. Change in production.

Kafka / Redpanda​

VariableDefaultRequiredDescription
REDPANDA_BROKERSlocalhost:9092YesComma-separated broker addresses
KAFKA_TOPICraw-telemetryNoTelemetry topic name
KAFKA_PARTITIONS3NoNumber of topic partitions

Ingestion Gateway​

VariableDefaultRequiredDescription
GATEWAY_HTTP_PORT8080NoHTTP listener port
GATEWAY_METRICS_PORT9090NoPrometheus metrics port
INGESTION_WORKER_COUNT4NoParallel publish workers
BATCH_FIREHOSE_SIZE10000NoMax records per storage batch write
BATCH_FIREHOSE_TIMEOUT_MS5000NoMax wait time before flushing a batch (ms)
BATCH_EXEMPLAR_SIZE2000NoMax exemplar records per batch
BATCH_EXEMPLAR_TIMEOUT_MS10000NoMax wait time for exemplar batch flush (ms)

Telemetry Operator​

VariableDefaultRequiredDescription
OPERATOR_HTTP_PORT8081NoHTTP listener port
OPERATOR_METRICS_PORT9091NoPrometheus metrics port
OPERATOR_WORKER_COUNT2NoNumber 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.

VariableDefaultRequiredDescription
AIOPS_HTTP_PORT8080NoHTTP listener port
AIOPS_METRICS_PORT9092NoPrometheus metrics port
ALERTMANAGER_WEBHOOK_PORT9093NoPort for Prometheus Alertmanager webhook
WATCHDOG_INTERVAL_SECONDS60NoHow often detection evaluates (seconds)
ALERT_DEDUP_MAX_AGE_MINUTES60NoA firing alert older than this stops absorbing repeat signals; new ones get a new alert

Log anomaly detection (AIops Engine)​

VariableDefaultDescription
LOG_GRACE_PERIOD_MINUTES60Minutes of log-pattern history a service needs before novel-pattern alerts fire. Prevents floods on new deployments.
LOG_SEMANTIC_AUTO_DETECTtrueFlag log lines that announce trouble (breaker open, pool exhausted, failover, degraded state), with no application changes.
LOG_SEMANTIC_ENRICHtrueAI classification and summaries of novel log patterns, with near-duplicates suppressed. Requires an AI provider key.

Log rate limiting (Ingestion Gateway)​

VariableDefaultDescription
LOG_MAX_RAW_PER_SECOND1000Per-service cap on stored raw log lines. Pattern detection still sees every line. Set to 0 to disable.

Saturation detector (AIops Engine)​

VariableDefaultDescription
SATURATION_DETECTOR_ENABLEDfalseLimit-aware rules for bounded metrics (disk, memory, pools, quotas): time to exhaustion, headroom, resources that live high. See Saturation.
SATURATION_TTE_CRIT_MINUTES60Projected exhaustion inside this horizon fires high
SATURATION_TTE_WARN_MINUTES360… inside this horizon fires medium
SATURATION_TTE_LOW_MINUTES1440Slow steady fills landing inside this horizon fire low

Reliability & rules (AIops Engine)​

VariableDefaultDescription
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_ENABLEDfalseEvaluate operator-defined alert rules once a minute.
ALERT_RULES_INTERVAL_SECONDS60Rule evaluation cadence
ALERT_RULES_MAX_RULES500Safety ceiling on rules evaluated per tick
OTEL_TEMPORALITY_NORMALIZEtrueConvert 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)​

VariableDefaultDescription
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_SEVERITYhighMinimum alert severity that pages (low|medium|high|critical). Lower tiers reach dashboards and chat channels, not the pager.

Code Intelligence (AIops Engine)​

VariableDefaultDescription
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)​

VariableDefaultDescription
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.

VariableDefaultRequiredDescription
LLM_PROVIDERanthropicNoanthropic, gemini, bedrock, or local (a model you host behind an OpenAI-compatible API)
ANTHROPIC_API_KEY—For anthropicAnthropic API key. Get one at console.anthropic.com.
ANTHROPIC_MODEL—NoModel to use, if not the default
GEMINI_API_KEY—For geminiGoogle Gemini API key
GEMINI_MODEL—NoGemini model to use, if not the default
BEDROCK_MODEL / BEDROCK_INFERENCE_PROFILE—For bedrockA model or inference-profile id your AWS account can invoke
BEDROCK_HAIKU_MODEL—NoOptional faster, cheaper model for simple copilot turns. Unset sends every turn to the main model.
LOCAL_LLM_ENDPOINT—For localOpenAI-compatible endpoint, e.g. http://ollama.internal:11434/v1
LOCAL_LLM_MODEL—NoModel name on that endpoint
LOCAL_LLM_API_KEY—NoKey, if your endpoint needs one
REDACT_PROMPTS_ENABLEDtrueNoMask 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​

VariableDefaultDescription
SLACK_WEBHOOK_URL—Incoming webhook URL for alert notifications
SLACK_BOT_TOKEN—Bot token for interactive approval flows (optional)
SLACK_CHANNEL#alertsDefault alert channel

PagerDuty​

VariableDefaultDescription
PAGERDUTY_API_TOKEN—PagerDuty API token
PAGERDUTY_SERVICE_KEY—Integration key for incident creation

Jira​

VariableDefaultDescription
JIRA_API_TOKEN—Jira API token
JIRA_DOMAIN—Your Jira domain (e.g. mycompany.atlassian.net)
JIRA_PROJECT_KEYOPSProject key for auto-created tickets
JIRA_USERNAME—Jira account email/username

Microsoft Teams​

VariableDefaultDescription
TEAMS_WEBHOOK_URL—Teams incoming webhook URL

AWS CloudWatch​

VariableDefaultDescription
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_SECONDS60How often to poll CloudWatch metrics

Grafana​

VariableDefaultDescription
GF_SECURITY_ADMIN_PASSWORDadminGrafana admin password. Change in production.
GF_SECURITY_ADMIN_USERadminGrafana 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
JIRA_USERNAME=[email protected]

# Grafana
GF_SECURITY_ADMIN_PASSWORD=CHANGE_ME_SECURE_PASSWORD