Skip to content

Monitoring

The ɳSelf monitoring stack provides metrics, logs, traces, and alerting for your entire backend infrastructure.

Install with nself plugin install monitoring. Adds 10 services:

ServicePortPurpose
Prometheus9090Metrics collection and storage
Grafana(see nself urls)Dashboards and visualisation
Loki3100Log aggregation
PromtailnoneLog shipping agent
Tempo3200Distributed tracing
Alertmanager9093Alert routing
cAdvisor8081Container resource metrics
Node Exporter9100Host OS metrics
Postgres Exporter9187Database metrics
Redis Exporter9121Redis metrics
Terminal window
nself plugin install monitoring
nself build && nself restart
nself urls # get Grafana URL
DashboardData Source
Container ResourcescAdvisor
Host MetricsNode Exporter
PostgreSQLPostgres Exporter
NginxNginx logs via Promtail
ɳSelf OverviewCombined

All container stdout/stderr is shipped to Loki via Promtail. Query in Grafana:

{container=~"myproject_.*"} |= "error" | json

Pre-built alert rules in Alertmanager cover:

  • Container down
  • High CPU / memory
  • Disk space low
  • PostgreSQL connection pool exhausted

Configure notification channels (Slack, PagerDuty, email) in monitoring/alertmanager/config.yml.


Home | _Sidebar