Skip to content

Configuration

InfraSigns is configured via a single YAML file. Pass the path with --config (default: config/config.yaml).

Full example

server:
  port: 8080                    # reserved for future web UI

database:
  dsn: "postgres://infrasigns:password@localhost:5432/infrasigns?sslmode=disable"

sources:
  - name: production
    url: http://prometheus:9090
  - name: staging
    url: http://staging-prometheus:9090

llm:
  provider: openai              # openai | anthropic
  api_key: sk-...
  model: gpt-4o-mini

notify:
  telegram:
    token: "123456:ABC-..."
    chat_id: "-100123456789"
  slack:
    webhook_url: ""             # coming in v0.3

digest:
  schedule: "0 8 * * *"        # cron expression, UTC

Sources

sources:
  - name: production            # display name in digests and logs
    url: http://localhost:9090  # Prometheus HTTP API base URL
  • Multiple sources are supported — each produces an independent digest
  • InfraSigns is read-only — it calls only GET /api/v1/alerts and GET /api/v1/query
  • No changes to your Prometheus configuration are required

LLM

llm:
  provider: openai   # openai | anthropic
  api_key: sk-...
  model: gpt-4o-mini

See LLM Providers for model recommendations and cost estimates.

Notifications

notify:
  telegram:
    token: "..."     # bot token from @BotFather
    chat_id: "..."   # group, channel, or user chat ID

See Notifications for setup instructions.

Digest schedule

digest:
  schedule: "0 8 * * *"

Standard 5-field cron expression in UTC. Examples:

Schedule Meaning
0 8 * * * Every day at 08:00 UTC
0 8 * * 1-5 Weekdays at 08:00 UTC
0 8,20 * * * Twice a day at 08:00 and 20:00 UTC

Metrics collected

InfraSigns queries these node_exporter metrics:

Metric PromQL
CPU usage % (1 - avg(rate(node_cpu_seconds_total{mode="idle"}[5m]))) * 100
Memory usage % (1 - sum(node_memory_MemAvailable_bytes) / sum(node_memory_MemTotal_bytes)) * 100
Disk usage % (1 - sum by (instance)(avail) / sum by (instance)(size)) * 100

If node_exporter is not present, metric queries return empty results (logged as warnings) and the digest is generated from active alerts only.