What metrics is CockroachDB dashboard actually measuring?

For example, in SQL Dashboard, it looks the SQL Connections chart is measuring sql_conns metrics. But for other charts what metrics are they measuring?

Here is the list of available metrics: https://www.cockroachlabs.com/docs/stable/admin-ui-custom-chart-debug-page.html#available-metrics

Hi @derek.z,

While the documentation for the CockroachDB Dashboards is comprehensive, it may not specify the exact metric being charted.

The metrics that the charts on the dashboard pages are using are specified in the corresponding *.tsx files in GitHub in the dashboards directory.

You can search for:
in the *.tsx files to get the metrics used by the charts in that particular dashboard page.

You can also run: grep "name="cr\." <dashboard>.tsx
For example, grep "name="cr\." sql.tsx
to see that the SQL Dashboard charts the following metrics:

        <Metric name="cr.node.sql.bytesin" title="Bytes In" nonNegativeRate />
        <Metric name="cr.node.sql.bytesout" title="Bytes Out" nonNegativeRate />
        <Metric name="cr.node.sql.select.count" title="Selects" nonNegativeRate />
        <Metric name="cr.node.sql.update.count" title="Updates" nonNegativeRate />
        <Metric name="cr.node.sql.insert.count" title="Inserts" nonNegativeRate />
        <Metric name="cr.node.sql.delete.count" title="Deletes" nonNegativeRate />
        <Metric name="cr.node.sql.failure.count" title="Errors" nonNegativeRate />
        <Metric name="cr.node.sql.distsql.queries.active" title="Active Queries" />
        <Metric name="cr.node.sql.txn.begin.count" title="Begin" nonNegativeRate />
        <Metric name="cr.node.sql.txn.commit.count" title="Commits" nonNegativeRate />
        <Metric name="cr.node.sql.txn.rollback.count" title="Rollbacks" nonNegativeRate />
        <Metric name="cr.node.sql.txn.abort.count" title="Aborts" nonNegativeRate />
        <Metric name="cr.node.sql.ddl.count" title="DDL Statements" nonNegativeRate />

As you mentioned, many, but not all, of the metrics are described here.

Please let me know if this answers your question.

Technical Support Engineer

1 Like

@florence-crl Great answer. But I have additional questions.

I saw the metrics start with “cr.node.”, e.g., “cr.node.sql.conns” in sql.tsx. However, I did not see it in https://www.cockroachlabs.com/docs/stable/admin-ui-custom-chart-debug-page.html#available-metrics. I only saw “sql.conns” on the available-metrics page. Are “cr.node.sql.conns” and “sql.conns” actually the same metrics?

There are some metrics that do not start with “cr.node”, e.g., “cr.store.capacity.used” in overview.tsx. Is it also actually “capacity.used” on the available-metrics page? Why do you categorize them into “cr.store” and “cr.node”? What is the difference? Do you have more categories of metrics?

As you mentioned, the available-metrics page does not show all the metrics. Does the Custom Chart page (https://localhost:8080/#/debug/chart) show all the metrics when you add metrics in the drop-down list?


Hi @derek.z,

You are correct that the following are actually the same metrics:
cr.node.sql.conns and sql.conns
cr.store.capacity.used and capacity.used

The only categories of metrics are cr.store.* and cr.node.*. The difference between the two categories is that:
cr.store.* metrics refer to storage of data to the cluster and are found on the corresponding dashboards: queues, replication, requests, storage; while
cr.node.* metrics refer to usage of data on the cluster and are found on the corresponding dashboards: changefeeds, distributed, hardware, runtime, sql.

The Custom Chart page shows all the metrics in the “METRIC NAME” drop-down list without the category qualifiers (cr.store. and cr.node.).


@florence-crl Your answer is awesome. Thank you very much.

@derek.z You are very welcome. Happy to help!