github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ui/src/views/cluster/containers/nodeGraphs/dashboards/distributed.tsx (about)

     1  // Copyright 2018 The Cockroach Authors.
     2  //
     3  // Use of this software is governed by the Business Source License
     4  // included in the file licenses/BSL.txt.
     5  //
     6  // As of the Change Date specified in that file, in accordance with
     7  // the Business Source License, use of this software will be governed
     8  // by the Apache License, Version 2.0, included in the file
     9  // licenses/APL.txt.
    10  
    11  import React from "react";
    12  import _ from "lodash";
    13  
    14  import { LineGraph } from "src/views/cluster/components/linegraph";
    15  import { Metric, Axis, AxisUnits } from "src/views/shared/components/metricQuery";
    16  
    17  import { GraphDashboardProps, nodeDisplayName } from "./dashboardUtils";
    18  
    19  export default function (props: GraphDashboardProps) {
    20    const { nodeIDs, nodesSummary, nodeSources } = props;
    21  
    22    return [
    23      <LineGraph title="Batches" sources={nodeSources}>
    24        <Axis label="batches">
    25          <Metric name="cr.node.distsender.batches" title="Batches" nonNegativeRate />
    26          <Metric name="cr.node.distsender.batches.partial" title="Partial Batches" nonNegativeRate />
    27        </Axis>
    28      </LineGraph>,
    29  
    30      <LineGraph title="RPCs" sources={nodeSources}>
    31        <Axis label="rpcs">
    32          <Metric name="cr.node.distsender.rpc.sent" title="RPCs Sent" nonNegativeRate />
    33          <Metric name="cr.node.distsender.rpc.sent.local" title="Local Fast-path" nonNegativeRate />
    34        </Axis>
    35      </LineGraph>,
    36  
    37      <LineGraph title="RPC Errors" sources={nodeSources}>
    38        <Axis label="errors">
    39          <Metric name="cr.node.distsender.rpc.sent.sendnexttimeout" title="RPC Timeouts" nonNegativeRate />
    40          <Metric name="cr.node.distsender.rpc.sent.nextreplicaerror" title="Replica Errors" nonNegativeRate />
    41          <Metric name="cr.node.distsender.errors.notleaseholder" title="Not Leaseholder Errors" nonNegativeRate />
    42        </Axis>
    43      </LineGraph>,
    44  
    45      <LineGraph title="KV Transactions" sources={nodeSources}>
    46        <Axis label="transactions">
    47          <Metric name="cr.node.txn.commits" title="Committed" nonNegativeRate />
    48          <Metric name="cr.node.txn.commits1PC" title="Fast-path Committed" nonNegativeRate />
    49          <Metric name="cr.node.txn.aborts" title="Aborted" nonNegativeRate />
    50        </Axis>
    51      </LineGraph>,
    52  
    53      <LineGraph title="KV Transaction Restarts" sources={nodeSources}>
    54        <Axis label="restarts">
    55          <Metric name="cr.node.txn.restarts.writetooold" title="Write Too Old" nonNegativeRate />
    56          <Metric name="cr.node.txn.restarts.writetoooldmulti" title="Write Too Old (multiple)" nonNegativeRate />
    57          <Metric name="cr.node.txn.restarts.serializable" title="Forwarded Timestamp (iso=serializable)" nonNegativeRate />
    58          <Metric name="cr.node.txn.restarts.asyncwritefailure" title="Async Consensus Failure" nonNegativeRate />
    59          <Metric name="cr.node.txn.restarts.readwithinuncertainty" title="Read Within Uncertainty Interval" nonNegativeRate />
    60          <Metric name="cr.node.txn.restarts.txnaborted" title="Aborted" nonNegativeRate />
    61          <Metric name="cr.node.txn.restarts.txnpush" title="Push Failure" nonNegativeRate />
    62          <Metric name="cr.node.txn.restarts.unknown" title="Unknown" nonNegativeRate />
    63        </Axis>
    64      </LineGraph>,
    65  
    66      <LineGraph title="KV Transaction Durations: 99th percentile"
    67        tooltip={`The 99th percentile of transaction durations over a 1 minute period.
    68                                Values are displayed individually for each node.`}>
    69        <Axis units={AxisUnits.Duration} label="transaction duration">
    70          {
    71            _.map(nodeIDs, (node) => (
    72              <Metric
    73                key={node}
    74                name="cr.node.txn.durations-p99"
    75                title={nodeDisplayName(nodesSummary, node)}
    76                sources={[node]}
    77                downsampleMax
    78              />
    79            ))
    80          }
    81        </Axis>
    82      </LineGraph>,
    83  
    84      <LineGraph title="KV Transaction Durations: 90th percentile"
    85        tooltip={`The 90th percentile of transaction durations over a 1 minute period.
    86                                Values are displayed individually for each node.`}>
    87        <Axis units={AxisUnits.Duration} label="transaction duration">
    88          {
    89            _.map(nodeIDs, (node) => (
    90              <Metric
    91                key={node}
    92                name="cr.node.txn.durations-p90"
    93                title={nodeDisplayName(nodesSummary, node)}
    94                sources={[node]}
    95                downsampleMax
    96              />
    97            ))
    98          }
    99        </Axis>
   100      </LineGraph>,
   101  
   102      <LineGraph title="Node Heartbeat Latency: 99th percentile"
   103        tooltip={`The 99th percentile of latency to heartbeat a node's internal liveness record over a 1 minute period.
   104                                Values are displayed individually for each node.`}>
   105        <Axis units={AxisUnits.Duration} label="heartbeat latency">
   106          {
   107            _.map(nodeIDs, (node) => (
   108              <Metric
   109                key={node}
   110                name="cr.node.liveness.heartbeatlatency-p99"
   111                title={nodeDisplayName(nodesSummary, node)}
   112                sources={[node]}
   113                downsampleMax
   114              />
   115            ))
   116          }
   117        </Axis>
   118      </LineGraph>,
   119  
   120      <LineGraph title="Node Heartbeat Latency: 90th percentile"
   121        tooltip={`The 90th percentile of latency to heartbeat a node's internal liveness record over a 1 minute period.
   122                                Values are displayed individually for each node.`}>
   123        <Axis units={AxisUnits.Duration} label="heartbeat latency">
   124          {
   125            _.map(nodeIDs, (node) => (
   126              <Metric
   127                key={node}
   128                name="cr.node.liveness.heartbeatlatency-p90"
   129                title={nodeDisplayName(nodesSummary, node)}
   130                sources={[node]}
   131                downsampleMax
   132              />
   133            ))
   134          }
   135        </Axis>
   136      </LineGraph>,
   137  
   138    ];
   139  }