---
tags:
  - service
  - josiedot
  - irc-now
domain: stats.irc.now
status: active
stack:
  - Grafana
  - Prometheus
  - Keycloak OIDC
auth: Keycloak
---
# irc.now Stats (stats.irc.now)

Grafana dashboards for platform metrics. Prometheus scrapes all Axum services via ServiceMonitors.

## URLs
- https://stats.irc.now

## Stack
- Grafana 12.x via grafana-operator (grafana.integreatly.org CRDs)
- Prometheus (OCP user workload monitoring, Thanos Querier)
- Keycloak OIDC SSO via `stats` client

## Auth
Keycloak SSO with group-based role mapping:
- `stats-admin` group -> Grafana Admin (full access)
- all other users -> Grafana Viewer (public dashboard only)
- Login form disabled, auto-login via OIDC
- Button text: "log in with irc.now"

## Dashboards

### irc.now (public)
Visible to all authenticated users.
- User count, DAU, pastes, images (stat panels)
- Users and content over time (timeseries)

### irc.now Overview (Admin folder)
Visible only to stats-admin group members.
- All public panels plus:
- Logins (24h), users by plan (pie chart), bots running (gauge)
- Storage bytes (pastes + images), IRC bouncer stats
- HTTP request rate and p95 latency per service

## Prometheus
- User workload monitoring enabled via `cluster-monitoring-config` ConfigMap
- ServiceMonitors: web-api, txt, pics, bot (30s scrape interval, port `http`, path `/metrics`)
- Datasource: Thanos Querier via SA token auth (`grafana-sa` with `cluster-monitoring-view`)

## Deployment
- OCP namespace: irc-josie-cloud
- Grafana CR: `irc-now` (operator-managed)
- TLS: cert-manager Certificate `stats-irc-now-tls`, ClusterIssuer `letsencrypt-prod`
- Route: `stats.irc.now` with externalCertificate
- Manifests: `deploy/monitoring/`

## Secrets
- `oidc-stats` -- Keycloak client credentials
- `grafana-sa-token` -- SA token for Prometheus access
- `irc-now-admin-credentials` -- Grafana admin password (operator-managed)

## Source
- Manifests: ~/development/irc-now/deploy/monitoring/

## Related
- [[irc-now-portal]]
- [[irc-now-keycloak]]
- [[irc-now-txt]]
- [[irc-now-pics]]
- [[irc-now-bot]]
