Skip to content

Configuration

Jarvis is configured entirely through environment variables. There is no config file. .env.example in the repository is a working template of everything on this page.

Values are read once at startup — a change means a restart.


Core

VariableDefaultDescription
JARVIS_PORT8080HTTP listen port
JARVIS_LOG_LEVELinfoLog verbosity: info or debug
JARVIS_LOG_REQUESTSfalseLog every HTTP request. Noisy — for debugging a proxy or auth problem, not for normal operation
JARVIS_POLL_INTERVAL15sHow often Alertmanager is polled (Go duration, e.g. 30s). Also scales the grace period to max(60s, 2 × interval) — see Alert lifecycle
JARVIS_ALLOWED_ORIGINS(same origin)Comma-separated origins allowed for CORS and the WebSocket upgrade, e.g. https://jarvis.example.com. Required whenever the browser reaches Jarvis under a different host than the backend itself — see Running behind a proxy. No wildcard is accepted
JARVIS_RUNBOOK_BASE_URLPrefix for runbook links. Prepended to the runbook label or annotation when its value is not already an absolute URL, e.g. https://wiki.example.com/runbooks/
JARVIS_PPROF_ADDROpt-in loopback-only pprof debug server (heap/allocs/goroutine profiles only), e.g. 127.0.0.1:6060. Empty (default) opens no port at all. Must be a literal loopback IP + port — see Troubleshooting

Clusters

At least one cluster is required. Repeat the variables with _2_, _3_, … for more clusters. The numbering must be contiguous. Setup examples, multi-cluster behavior, Alertmanager HA deduplication, member aliases, and silence writes are covered in Connect Alertmanager.

VariableDefaultDescription
JARVIS_CLUSTER_1_NAMEDisplay name, shown in the UI and used in metrics (required)
JARVIS_CLUSTER_1_ALERTMANAGER_URLAlertmanager URL as Jarvis reaches it (required). A comma-separated list makes this one HA cluster — see Connect Alertmanager
JARVIS_CLUSTER_1_PROMETHEUS_URLPrometheus URL, used for the "source" links on an alert
JARVIS_CLUSTER_1_HOST_ALIASThe Alertmanager URL as the browser reaches it, when that differs from the internal one. One value applies to every member; a comma-separated list matching the member count sets one alias per member, in the same order

Upstream authentication

For an Alertmanager behind an authentication proxy. All of these are per cluster and apply to every member alike.

VariableDescription
JARVIS_CLUSTER_1_OAUTH2_CLIENT_IDOAuth2 client ID (client_credentials grant, tokens refreshed automatically)
JARVIS_CLUSTER_1_OAUTH2_CLIENT_SECRETOAuth2 client secret — never logged. Required with OAUTH2_CLIENT_ID
JARVIS_CLUSTER_1_OAUTH2_TOKEN_URLToken endpoint. Required with OAUTH2_CLIENT_ID
JARVIS_CLUSTER_1_OAUTH2_SCOPESComma-separated scopes
JARVIS_CLUSTER_1_BEARER_TOKENStatic token, sent as Authorization: Bearer <token>
JARVIS_CLUSTER_1_BASIC_AUTH_USERHTTP basic auth user
JARVIS_CLUSTER_1_BASIC_AUTH_PASSWORDHTTP basic auth password — never logged
JARVIS_CLUSTER_1_HEADER_<name>Custom request header, repeat for several

Priority when more than one is set: OAuth2 → bearer token → basic auth → custom headers. OAuth2 is the recommended option because the token is refreshed for you. Provider setup, including a worked Keycloak example and the Helm chart's clusters[].auth values, is in Alertmanager authentication.


Database

VariableDefaultDescription
JARVIS_DB_DSN/data/jarvis.dbSelects the backend and the connection: a file path means SQLite, a postgres:// URL means PostgreSQL. Never logged in full — the password is redacted
JARVIS_DB_MAX_OPEN_CONNS10PostgreSQL connection pool cap. Ignored on SQLite, which is deliberately limited to a single writer
env
JARVIS_DB_DSN=/data/jarvis.db
# or
JARVIS_DB_DSN=postgres://jarvis:secret@postgres:5432/jarvis?sslmode=require

SQLite is the default and is meant for evaluation, homelabs and any single-replica deployment — it needs no setup at all. Use PostgreSQL for production, for high availability and whenever you want more than one replica.

Schema, migrations, TLS, multi-replica leader election and failover, and Kubernetes deployment including a CloudNativePG example are covered in PostgreSQL & HA.


User authentication

VariableDefaultDescription
JARVIS_AUTH_PROVIDERnonenone, internal or oidc
JARVIS_AUTH_MODEwrite_protectApplies when the provider is not none. write_protect lets anyone read and requires a login to change anything; full_protect requires a login for everything
JARVIS_SECRET_KEYSigning key for session tokens, at least 32 bytes. Required for internal and oidc
JARVIS_AUTH_OIDC_ISSUERIssuer URL (required for oidc)
JARVIS_AUTH_OIDC_CLIENT_IDClient ID (required for oidc)
JARVIS_AUTH_OIDC_CLIENT_SECRETClient secret (required for oidc)
JARVIS_AUTH_OIDC_REDIRECT_URLCallback URL, must match the provider's configuration (required for oidc)
JARVIS_AUTH_OIDC_SCOPESopenid,profile,emailComma-separated scopes
JARVIS_OIDC_GROUPS_CLAIMID-token claim that carries the user's groups, e.g. groups or cognito:groups. Jarvis stores them at each login and shows them in the Account panel of the user menu. Without it groups are not read
JARVIS_OIDC_ADMIN_VALUEThe group in that claim that makes a user an admin, e.g. jarvis-admins. Needs JARVIS_OIDC_GROUPS_CLAIM; without both every OIDC user gets the user role
env
JARVIS_AUTH_PROVIDER=internal
JARVIS_SECRET_KEY=<openssl rand -hex 32>

With internal, the first visit redirects to /setup to create the admin account; further users are managed under Administration in the user menu. Provider setup for Keycloak and Authentik, the OIDC flow, role mapping, session details and Kubernetes secrets are in User authentication.


Silence durations

The durations offered by the one-click Fast-Silence menu and the Extend silence menu are configurable — one list serves both. Set an instance-wide default here; every user can still change their own list in Settings → Silences — that list wins over this one. Without either, the built-in list applies.

VariableDefaultDescription
JARVIS_SILENCE_DURATIONS5m,10m,15m,30m,1h,4h,1d,1wSilence durations, comma-separated
env
JARVIS_SILENCE_DURATIONS=15m,1h,4h,1d,1w,30d

Each entry is a number plus a unit: m minutes, h hours, d days, w weeks, y years (365 days) — for example 30m, 4h, 1d, 1w, 30d, 1y. Every value must be between 1m and 365d, and a list holds at most 12 entries; order and duplicates are sorted out for you. An invalid value stops Jarvis from starting, with the variable named in the error. What the menus and the per-user override look like is described in Fast-Silence.


Data retention

Off by default: Jarvis keeps history forever unless you tell it otherwise.

VariableDefaultDescription
JARVIS_RETENTION_DAYSFallback age limit for every history type. 0 or unset disables the sweep entirely
JARVIS_RETENTION_EVENTS_DAYS(inherits)Alert lifecycle events
JARVIS_RETENTION_CLAIMS_DAYS(inherits)Released claims
JARVIS_RETENTION_SILENCE_EVENTS_DAYS(inherits)Silence events
JARVIS_RETENTION_COMMENTS_DAYS0 (kept forever)Comments — never inherits JARVIS_RETENTION_DAYS; only an explicit value here enables deletion
JARVIS_RETENTION_SWEEP_INTERVAL12hHow often the sweep runs

What exactly gets deleted, in which order, and how this affects per-cluster statistics is described in Data retention.

Released under the Apache 2.0 License. Jarvis is not affiliated with Prometheus or Alertmanager.