Every chmonitor dashboard query now says who sent it

52 minutes ago

Version 0.3.9 of chmonitor, the ops dashboard for ClickHouse, makes every query it sends say who sent it. Around that come a Dashboard Usage page, alerts that thread, and an optimization plan that leaves the changes to you. And opted-in webhook bodies rename two keys.

Ask about this presentation

Chapters

  1. 0:00Every query says who sent it
  2. 0:19The attribution record
  3. 0:41Dashboard Usage and the users page
  4. 1:01Alerts thread on Matrix and Telegram
  5. 1:19A structured alert block for agents
  6. 1:41An optimization plan that recommends
  7. 2:03Replica drift, findings over MCP, quieter replication
  8. 2:22Agent errors redact secrets
  9. 2:40Webhook bodies: details becomes alert
  10. 2:59Upgrade
Show transcript
  1. Version 0.3.9 of chmonitor, the ops dashboard for ClickHouse, makes every query it sends say who sent it. Around that come a Dashboard Usage page, alerts that thread, and an optimization plan that leaves the changes to you. And opted-in webhook bodies rename two keys.

    Slide text
    chmonitor v0.3.9
    2026-10-24

    Every dashboard query now says who sent it

    Plus a Dashboard Usage page, threaded alerts on Matrix and Telegram, and an optimization plan that only recommends.

  2. Every query the dashboard sends now opens with a one-line JSON comment: the app version, the signed-in user, the host, and the source, such as a chart, the console or the agent. The same record goes into the log comment setting, so the query log can be grouped by user. It's on by default, and email stays out unless you opt in.

    Slide text
    chmonitor v0.3.9
    feat(clickhouse)

    Each query opens with a record of who ran it, and from where

    Leading SQL comment
    /* {"client":"clickhouse-monitoring","app":"chmonitor","v":1,
        "version":…,"user":…,"source":…,"host":…,"label":… } */
    SELECT …
    Same JSON in the log_comment setting
    JSONExtractString(log_comment, 'user')
    CHM_QUERY_ATTRIBUTION=true (default) CHM_QUERY_ATTRIBUTION_INCLUDE_EMAIL=false
  3. A new Dashboard Usage page reads that record back: queries, users, error rate, p95 duration and bytes read, with top ten lists by user, source and page. Click a user for the same view of just that person. And the users page now marks each account active, idle or inactive, with its last login.

    Slide text
    chmonitor v0.3.9
    feat(queries) · feat(users)

    Dashboard Usage reads that record back

    Queries
    Users
    Error rate
    p95 duration
    Bytes read

    Top 10 by user, source, page, version, label · over 1, 7 or 30 days

    Click a user
    The same view for one person: their top sources and pages, recent queries and errors.
    Users page: active · idle · inactive
    Queries over 24 hours and 7 days, errors, last query, last login.
  4. On Matrix and Telegram, the first message of an alert now starts a thread. Reminders, escalations and the recovery reply under it, so one problem stays in one thread. The thread roots live in the metadata database. Without one, alerts go out top-level, as before.

    Slide text
    chmonitor v0.3.9
    feat(alerts)

    Repeat alerts reply under the first message

    On Matrix and Telegram. One thread per host, rule and destination, from first alert to recovery.

    Without a metadata database, alerts go out top-level as before.

    First alert thread root
    Reminderreply
    Escalationreply
    Recoveryreply, thread ends
  5. Webhooks with details turned on now get one alert object: the rule, metric, threshold, value, trend, and when it was first seen. Text from the cluster sits under an untrusted key, redacted and capped, so an agent can treat it as data. Firing alerts also list up to five top contributors, the biggest tables or the heaviest running queries.

    Slide text
    chmonitor v0.3.9
    feat(alerts)

    Webhooks with details on get an alert block built for agents

    Cluster text sits under untrusted, redacted, each string capped at 200 characters.

    Firing alerts list up to 5 top contributors: tables by size or parts, queries by memory or elapsed time.

    Raw JSON body
    "alert": {
      "ruleId", "metric",
      "threshold", "value",
      "previousValue", "trend",
      "firstSeenAt", "repeatCount",
      "untrusted": {
        "affected": [ … ],
        "topContributors": [ … ]
      }
    }
  6. The advisor has a new Optimization plan tab. It ranks the findings the advisors already stored, like unread tables and detached parts, by measured gain against the hours to apply. Risky items stay listed, marked for owner approval. The DDL is copy only, there is no apply button, and the plan exports to Markdown or JSON.

    Slide text
    chmonitor v0.3.9
    feat(advisor)

    The advisor ranks one optimization plan, and you run it

    NOT APPLIED: copy and review; chmonitor never runs these statements.
    Gain ÷ hours
    Measured savings first, against the time to apply.
    Risky stays listed
    High-risk items are marked as needing owner approval.
    Export
    Markdown or JSON. DDL is copy only.
  7. The access matrix gets a Compare replicas switch, off by default, that marks where effective access differs between replicas. The MCP server gains a read-only tool for current health findings. And hosts without replicated tables now show replication as not used, and skip queue alerts.

    Slide text
    chmonitor v0.3.9
    feat(security) · feat(mcp) · fix(replication)

    Replica drift, findings over MCP, and quieter replication checks

    Compare replicas
    An access matrix switch, off by default. Reads grants on every replica and marks where effective access differs. Unreachable replicas show as skipped.
    get_current_findings
    A read-only MCP tool that returns the current health findings.
    Replication not used
    Hosts without replicated tables say so on the queue page, health checks, insights and the agent tool, and skip queue alerts.
  8. Agent errors are now scrubbed before the agent sees them. Credentials in table functions like s3 and mysql are redacted, along with secret URL parameters, email addresses and IP addresses. The lockfiles are also patched for the zod and astro advisories.

    Slide text
    chmonitor v0.3.9
    fix(agent) · fix(deps)

    Agent errors now redact credentials, emails and IP addresses

    Error text before
    SELECT * FROM s3('https://b.s3.amazonaws.com/x.csv', 'AKIAIOSFODNN7EXAMPLE',
      'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY', 'CSV', 'a UInt8')
    What the agent sees in 0.3.9
    SELECT * FROM s3('https://b.s3.amazonaws.com/x.csv', '[redacted]', '[redacted]', 'CSV', 'a UInt8')

    Also: lockfiles patched for the zod and astro advisories.

  9. One change can break a receiver. On a custom webhook target with details set to true, the JSON body used to carry a details object. In 0.3.9 that key is alert, and first fired at becomes first seen at. Targets without details get the same body as before.

    Slide text
    chmonitor v0.3.9
    if you parse webhook bodies

    Opted-in webhook bodies now say alert instead of details

    0.3.8
    { …,
      "details": {
        "trend": …,
        "repeatCount": …,
        "firstFiredAt": …
      }
    }
    0.3.9
    { …,
      "alert": {
        "trend": …,
        "repeatCount": …,
        "firstSeenAt": …, …
      }
    }
  10. To upgrade, pull the 0.3.9 image, or pin it in your Dockerfile. On Kubernetes, the Helm values file has a query attribution block; set enabled to false if you don't want queries tagged. The one reason to wait is a receiver that still reads details. Update it, and every chmonitor query says who sent it.

    Slide text
    chmonitor v0.3.9
    upgrade

    Pull 0.3.9, and update webhook receivers first

    Docker
    docker pull ghcr.io/chmonitor/chmonitor:0.3.9
    Helm values.yaml
    queryAttribution:
      enabled: true      # CHM_QUERY_ATTRIBUTION
      includeEmail: false

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built in New York with ❤️