Brume · Docs
Maintenance

Monitor your instance

Monitor the instance in Grafana and Tower, centralize its logs, and define their retention.

In brief

Grafana brings metrics and logs together, Tower controls the instance, and Ntfy pushes alerts. You centralize technical traces, choose their retention, and prepare their export off-instance.

On this page, <instance> is global.instanceName or, when that value is empty, the Helm release name; <namespace> is the configured namespace, whose chart default is misty.

Review metrics and logs

Brume installs kube-prometheus-stack on the cluster, complements collection with Loki and Promtail, and exposes a dedicated control console.

Web consoles can be protected by your upstream access control. Cloudflare Access is one example, not a product prerequisite; any equivalent upstream access control works.

ComponentRoleAccess
PrometheusCollects system, database, and application metricsInternal to the cluster
PromtailAggregates pod outputInternal to the cluster
LokiIndexes logs by service, level, and time windowGrafana Explore
GrafanaReal-time dashboardsgrafana.<your-domain>, behind your upstream access control
AlertmanagerRoutes alerts to NtfyInternal, mobile push through Ntfy
TowerControl console (pod state, backups, scale)tower.<your-domain>, optional upstream protection

critical alerts repeat every 30 min and warning alerts every 4 h. CloudNativePG's PodMonitor collects PostgreSQL metrics.

Mandatory Grafana setting

With multiple replicas, the Grafana IngressRoute must preserve a sticky session or the browser loops after sign-in. The chart configures the grafana_sticky cookie on grafana.<your-domain>; verify it after changing the monitoring ingress.

Quick diagnostics

Four commands provide the overall health state in less than a minute.

CheckCommand
Application pod statekubectl get pods -n <namespace>
PostgreSQL cluster statekubectl get cluster -n <namespace>
PostgreSQL details (primary, replication lag)kubectl cnpg status <instance>-pg -n <namespace>
CPU/memory loadkubectl top nodes then kubectl top pods -n <namespace>

To go further on a component:

# Service logs
kubectl logs deployment/<instance>-backend -n <namespace> --tail=100

# Recent namespace events
kubectl get events -n <namespace> --sort-by='.lastTimestamp' | tail -20

# Active Alertmanager alerts
kubectl port-forward svc/monitoring-alertmanager -n monitoring 9093:9093
curl -s http://localhost:9093/api/v2/alerts | jq

Track file indexing

Indexing uses Procrastinate tasks stored in PostgreSQL. If it slows down, review their state in SQL.

-- Active or pending tasks
SELECT id, task_name, status, attempts, queue_name, scheduled_at
FROM procrastinate_jobs
WHERE status IN ('todo', 'doing')
ORDER BY id DESC
LIMIT 50;

-- Failed tasks in the last 24 hours
SELECT id, task_name, attempts, args
FROM procrastinate_jobs
WHERE status = 'failed' AND scheduled_at > now() - interval '1 day'
ORDER BY id DESC;

Backlog in processing indicates insufficient compute; in embedding, check the provider and its key. For repeated failures, read task_name and attempts.

Centralize audit logs

ChannelCollectionScope
Application auditTamper-evident append-only PostgreSQL log and brume.audit.v1 stdout projectionAuthentication, members, workspaces, settings, and instrumented HTTP egress
PostgreSQL accesspgAudit in the PostgreSQL logSeparate operator channel to ship off-host
Kubernetes accessAPI server audit logEnable on dedicated infrastructure; disabled by default in shared mode
Hardened egressSmokescreen decisions normalized as network.egress eventsPods covered by the NetworkPolicy

The in-application console is covered under Review the audit log. To process fields, use the audit event contract.

Export logs to a SIEM

Enterprise transports carry the canonical brume.audit.export.v1 document through a signed webhook, Splunk HEC, or TLS syslog. The pull API and S3 export also cover replay and batch archives. Apply the SIEM recipes without changing the schema by transport.

Define log retention

DataRetention
Visible application audit-log window30 days; this window is not a promise of physical deletion at day 30
Application logs in LokiSliding window configurable by environment
Resolved alerts in Tower30 days, automatic purge
Tower snapshots7 days, automatic purge

Set retention, access rights, alerts, and reviews for your context. These traces contribute evidence for NIS2, ANSSI PA-022, ISO/IEC 27001 A.8.15, and SOC 2 CC7.x controls; they do not certify your organization.

Control the instance in Tower

Tower (tower.<your-domain>) shows pods, CNPG backups, and deployments. You can protect this access with the upstream access control of your choice.

Monitor. A CronJob checks the instance every 2 minutes and alerts through Ntfy.

Purge. A daily CronJob keeps 7 days of metrics and 30 days of resolved alerts.

Act. The service account reads cluster state; its writes are limited to scaling and backups.

Three channels for the same state

Grafana analyzes history, Tower acts on the instance, and Ntfy notifies. To find the cause, open Troubleshooting.

On this page