From 9d0c37c3f6353c0d0799dd764abed3468b52d59b Mon Sep 17 00:00:00 2001 From: NSAmelchev Date: Fri, 4 Sep 2026 17:51:48 +0300 Subject: [PATCH 1/3] IGNITE-29039 Fix metrics documentation: align the metrics reference with the code --- .../new-metrics-system.adoc | 180 +++--- .../_docs/monitoring-metrics/new-metrics.adoc | 514 +++++++++++++----- .../metric/IoStatisticsHolderCache.java | 6 +- .../metric/IoStatisticsHolderIndex.java | 6 +- .../persistence/DataRegionMetricsImpl.java | 15 +- .../snapshot/IgniteSnapshotManager.java | 2 +- .../query/GridCacheQueryMetricsAdapter.java | 12 +- .../processors/metric/GridMetricManager.java | 34 +- .../query/QueryParserMetricsHolder.java | 5 +- 9 files changed, 496 insertions(+), 278 deletions(-) diff --git a/docs/_docs/monitoring-metrics/new-metrics-system.adoc b/docs/_docs/monitoring-metrics/new-metrics-system.adoc index 5adcbfa25f1d9..cb245655445c3 100644 --- a/docs/_docs/monitoring-metrics/new-metrics-system.adoc +++ b/docs/_docs/monitoring-metrics/new-metrics-system.adoc @@ -15,7 +15,6 @@ = Metrics System :javaFile: {javaCodeDir}/ConfiguringMetrics.java -:table_opts: cols="2,1,4,1",opts="header" == Overview @@ -41,7 +40,6 @@ Ignite includes the following exporters: You can create a custom exporter by implementing the javadoc:org.apache.ignite.spi.metric.MetricExporterSpi[] interface. - == Metric Registries [[registry]] Metrics are grouped into categories (called _registries_). @@ -79,7 +77,6 @@ tab:C++[unsupported] The following sections describe the exporters available in Ignite by default. - === JMX `org.apache.ignite.spi.metric.jmx.JmxMetricExporterSpi` exposes metrics via JMX beans. @@ -131,7 +128,6 @@ JVM_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=${J -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" ---- - // link:monitoring-metrics/configuring-metrics[Configuring Metrics] ==== Understanding MBean's ObjectName @@ -191,7 +187,6 @@ tab:XML[] include::code-snippets/xml/metrics.xml[tags=!*;ignite-config;log-exporter, indent=0] ---- - tab:Java[] If you use programmatic configuration, you can change the print frequency as follows: @@ -215,7 +210,6 @@ To use the OpenCensus exporter: . Add `org.apache.ignite.spi.metric.opencensus.OpenCensusMetricExporterSpi` to the list of exporters in the node configuration. . Configure OpenCensus StatsCollector to export to a specific system. See link:{githubUrl}/examples/src/main/java/org/apache/ignite/examples/opencensus/OpenCensusMetricsExporterExample.java[OpenCensusMetricsExporterExample.java] for an example and OpenCensus documentation for additional information. - Configuration parameters: * `filter` - predicate that filters metrics. @@ -224,9 +218,6 @@ Configuration parameters: * `sendNodeId` - if enabled, a tag with the Ignite node id is added to each metric. * `sendConsistentId` - if enabled, a tag with the Ignite node consistent id is added to each metric. - - - == Histograms Histogram metrics are available through every exporter, but the format differs. @@ -244,7 +235,6 @@ where * `{low_bound}` - start of the bound. `0` for the first bound. * `{high_bound}` - end of the bound. `inf` for the last bound. - Example of the bucket names if the bounds are [10,100]: * `histogram_0_10` - less than 10. @@ -255,7 +245,6 @@ The `SYS.METRICS` system view and the log exporter report the whole histogram as counters, for example `[3, 15, 2]`. Bucket bounds are not exposed there yet, so to see them read the same metric through JMX, the OpenCensus exporter, or `control.sh --metric`, where every bucket name carries its bounds. - == Common Monitoring Tasks === Monitoring the Amount of Data @@ -268,7 +257,6 @@ The size of the data loaded into a node is available at different levels of aggr * The size of a specific link:memory-configuration/data-regions[data region] on that node. The data region size is the sum of the sizes of all cache groups. * The size of a specific cache/cache group on that node, including the backup partitions. - ==== Allocated Space vs. Actual Size of Data There is no way to get the exact size of the data (neither in RAM nor on disk). Instead, there are two ways to estimate it. @@ -288,21 +276,17 @@ Use `SizeUsedByData` when you need a more direct estimate of how much data is st Add up the estimated size of all data regions to get the estimated total amount of data on the node. - :allocsize_note: Note that when Native persistence is disabled, this metric shows the total size of the allocated space in RAM. ==== Monitoring RAM Memory Usage The amount of data in RAM can be monitored for each data region through the following metrics: -[{table_opts}] -|=== -| Attribute | Type | Description | Scope +* `PagesFillFactor` - The average size of data in pages as a ratio of the page size. When Native persistence is enabled, this metric is applicable only to the persistent storage (i.e. pages on disk). +* `TotalUsedPages` - The number of data pages that are currently in use. When Native persistence is enabled, this metric is applicable only to the persistent storage (i.e. pages on disk). +* `PhysicalMemoryPages` - The number of the allocated pages in RAM. +* `PhysicalMemorySize` - The size of the allocated space in RAM in bytes. -| PagesFillFactor| float | The average size of data in pages as a ratio of the page size. When Native persistence is enabled, this metric is applicable only to the persistent storage (i.e. pages on disk). | Node -| TotalUsedPages | long | The number of data pages that are currently in use. When Native persistence is enabled, this metric is applicable only to the persistent storage (i.e. pages on disk).| Node -| PhysicalMemoryPages |long | The number of the allocated pages in RAM. | Node -| PhysicalMemorySize |long |The size of the allocated space in RAM in bytes. | Node -|=== +The metrics belong to the `io.dataregion.{data_region_name}` register, see link:monitoring-metrics/new-metrics#data-region-io[Data Region IO]. If you have multiple data regions, add up the sizes of all data regions to get the total size of the data on the node. @@ -314,13 +298,11 @@ The total amount of data each node keeps on disk consists of the persistent stor ===== Persistent Storage Size To monitor the size of the persistent storage on disk, use the following metrics: -[{table_opts}] -|=== -| Attribute | Type | Description | Scope -| TotalAllocatedSize | long | The size of the space allocated on disk for the entire data storage (in bytes). {allocsize_note} | Node -| WalTotalSize | long | Total size of the WAL files in bytes, including the WAL archive files. | Node -| WalArchiveSegments | int | The number of WAL segments in the archive. | Node -|=== +* `TotalAllocatedSize` - The size of the space allocated on disk for the entire data storage (in bytes). {allocsize_note}. +* `WalTotalSize` - Total size of the WAL files in bytes, including the WAL archive files. +* `WalArchiveSegments` - The number of WAL segments in the archive. + +The metrics belong to the `io.datastorage` register, see link:monitoring-metrics/new-metrics#data-storage[Data Storage]. ===== Data Region Size @@ -328,27 +310,22 @@ Metrics collection for data regions is disabled by default. You can link:monitor The size of the data region on a node comprises the size of all partitions (including backup partitions) that this node owns for all caches in that data region. -[{table_opts}] -|=== -| Attribute | Type | Description | Scope +* `TotalAllocatedSize` - The size of the space allocated for this data region (in bytes). {allocsize_note}. +* `SizeUsedByData` - The estimated number of bytes occupied by data in this data region, taking into account free space inside non-empty pages. +* `PagesFillFactor` - The average amount of data in non-empty pages as a ratio of the page size. +* `TotalUsedPages` - The number of data pages that are currently in use. +* `PhysicalMemoryPages` - The number of data pages in this data region held in RAM. +* `PhysicalMemorySize` - The size of the allocated space in RAM in bytes. -| TotalAllocatedSize | long | The size of the space allocated for this data region (in bytes). {allocsize_note} | Node -| SizeUsedByData | long | The estimated number of bytes occupied by data in this data region, taking into account free space inside non-empty pages. | Node -| PagesFillFactor| float | The average amount of data in non-empty pages as a ratio of the page size. | Node -| TotalUsedPages | long | The number of data pages that are currently in use. | Node -| PhysicalMemoryPages |long |The number of data pages in this data region held in RAM. | Node -| PhysicalMemorySize | long |The size of the allocated space in RAM in bytes.| Node -|=== +The metrics belong to the `io.dataregion.{data_region_name}` register, see link:monitoring-metrics/new-metrics#data-region-io[Data Region IO]. ===== Cache Group Size If you don't use link:configuring-caches/cache-groups[cache groups], each cache will be its own group. -[{table_opts}] -|=== -| Attribute | Type | Description | Scope -|TotalAllocatedSize |long | The amount of space allocated for the cache group on this node. | Node -|=== +* `TotalAllocatedSize` - The amount of space allocated for the cache group on this node. + +The metrics belong to the `cacheGroups.{group_name}` register, see link:monitoring-metrics/new-metrics#cache-groups[Cache Groups]. === Monitoring Checkpointing Operations Checkpointing may slow down cluster operations. @@ -357,13 +334,11 @@ You may also want to monitor the disk performance to see if the slow-down is cau See link:persistence/persistence-tuning#pages-writes-throttling[Pages Writes Throttling] and link:persistence/persistence-tuning#adjusting-checkpointing-buffer-size[Checkpointing Buffer Size] for performance tips. -[{table_opts}] -|=== -| Attribute | Type | Description | Scope -| DirtyPages | long | The number of pages in memory that have been changed but not yet synchronized to disk. Those will be written to disk during next checkpoint. | Node -|LastCheckpointDuration | long | The time in milliseconds it took to create the last checkpoint. | Node -|CheckpointBufferSize | long | The size of the checkpointing buffer. | Global -|=== +* `DirtyPages` - The number of pages in memory that have been changed but not yet synchronized to disk. Those will be written to disk during next checkpoint. +* `LastCheckpointDuration` - The time in milliseconds it took to create the last checkpoint. +* `CheckpointBufferSize` - The size of the checkpointing buffer. + +The metrics belong to the `io.datastorage` register, see link:monitoring-metrics/new-metrics#data-storage[Data Storage]. === Monitoring Rebalancing link:data-rebalancing[Rebalancing] is the process of moving partitions between the cluster nodes so that the data is always distributed in a balanced manner. Rebalancing is triggered when a new node joins, or an existing node leaves the cluster. @@ -372,32 +347,25 @@ If you have multiple caches, they will be rebalanced sequentially. There are several metrics that you can use to monitor the progress of the rebalancing process for a specific cache. In the metric system, link:monitoring-metrics/new-metrics#caches[Cache metrics]: -[{table_opts}] -|=== -| Attribute | Type | Description | Scope -|RebalancingStartTime | long | This metric shows the time when rebalancing of local partitions started for the cache. This metric will return 0 if the local partitions do not participate in the rebalancing. The time is returned in milliseconds. | Node -| EstimatedRebalancingFinishTime | long | Expected time of completion of the rebalancing process. | Node -| KeysToRebalanceLeft | long | The number of keys on the node that remain to be rebalanced. You can monitor this metric to learn when the rebalancing process finishes.| Node -|=== +* `RebalancingStartTime` - This metric shows the time when rebalancing of local partitions started for the cache. This metric will return 0 if the local partitions do not participate in the rebalancing. The time is returned in milliseconds. +* `EstimatedRebalancingFinishTime` - Expected time of completion of the rebalancing process. Attribute of the `CacheMetricsMXBean` MBean, not available in the metric registers. +* `KeysToRebalanceLeft` - The number of keys on the node that remain to be rebalanced. You can monitor this metric to learn when the rebalancing process finishes. Attribute of the `CacheMetricsMXBean` MBean, not available in the metric registers. + +The metrics belong to the `cache.{cache_name}.{near}` register, see link:monitoring-metrics/new-metrics#caches[Caches]. === Monitoring Topology Topology refers to the set of nodes in a cluster. There are a number of metrics that expose the information about the topology of the cluster. If the topology changes too frequently or has a size that is different from what you expect, you may want to look into whether there are network problems. -[{table_opts}] -|=== -| Attribute | Type | Description | Scope -| TotalServerNodes| long |The number of server nodes in the cluster.| Global -| TotalClientNodes| long |The number of client nodes in the cluster. | Global -| TotalBaselineNodes | long | The number of nodes that are registered in the link:clustering/baseline-topology[baseline topology]. When a node goes down, it remains registered in the baseline topology and you need to remove it manually. | Global -| ActiveBaselineNodes | long | The number of nodes that are currently active in the baseline topology. | Global -|=== - -[{table_opts}] -|=== -| Attribute | Type | Description | Scope -| Coordinator | String | The node ID of the current coordinator node.| Global -| CoordinatorNodeFormatted|String a| -Detailed information about the coordinator node. +* `TotalServerNodes` - The number of server nodes in the cluster. +* `TotalClientNodes` - The number of client nodes in the cluster. +* `TotalBaselineNodes` - The number of nodes that are registered in the link:clustering/baseline-topology[baseline topology]. When a node goes down, it remains registered in the baseline topology and you need to remove it manually. +* `ActiveBaselineNodes` - The number of nodes that are currently active in the baseline topology. + +The metrics belong to the `cluster` register, see link:monitoring-metrics/new-metrics#cluster[Cluster]. + +* `Coordinator` - The node ID of the current coordinator node (`io.discovery` register, see link:monitoring-metrics/new-metrics#discovery-io[Discovery IO]). +* `currentCoordinatorFormatted` - Detailed information about the coordinator node (`ignite` register, see link:monitoring-metrics/new-metrics#node[Node]), for example: + .... TcpDiscoveryNode [id=e07ad289-ff5b-4a73-b3d4-d323a661b6d4, consistentId=fa65ff2b-e7e2-4367-96d9-fd0915529c25, @@ -408,9 +376,6 @@ order=2, intOrder=2, lastExchangeTime=1568187777249, loc=false, ver=8.7.5#20190520-sha1:d159cd7a, isClient=false] .... -| Global -|=== - === Monitoring Caches See the new metric system, link:monitoring-metrics/new-metrics#caches[Cache metrics]. @@ -425,48 +390,45 @@ To get an estimate on how long it takes to rebuild cache indexes, you can use on Note that the `IndexBuildCountPartitionsLeft` metric allows to estimate only an approximate number of indexes left to rebuild. For a more accurate estimate, use the `IndexRebuildKeyProcessed` cache metric: -* Use `isIndexRebuildInProgress` to know whether the indexes are being rebuilt for the cache. +* Use `IsIndexRebuildInProgress` to know whether the indexes are being rebuilt for the cache. -* Use `IndexRebuildKeysProcessed` to know the number of keys with rebuilt indexes. If the rebuilding is in progress, it gives a number of keys with indexes being rebuilt at the current moment. Otherwise, it gives a total number of the of keys with rebuilt indexes. The values are reset before the start of each rebuilding. +* Use `IndexRebuildKeyProcessed` to know the number of keys with rebuilt indexes. If the rebuilding is in progress, it gives a number of keys with indexes being rebuilt at the current moment. Otherwise, it gives a total number of the of keys with rebuilt indexes. The values are reset before the start of each rebuilding. === Monitoring Transactions Note that if a transaction spans multiple nodes (i.e., if the keys that are changed as a result of the transaction execution are located on multiple nodes), the counters will increase on each node. For example, the 'TransactionsCommittedNumber' counter will increase on each node where the keys affected by the transaction are stored. -[{table_opts}] -|=== -| Attribute | Type | Description | Scope -| LockedKeysNumber | long | The number of keys locked on the node. | Node -| TransactionsCommittedNumber |long | The number of transactions that have been committed on the node | Node -| TransactionsRolledBackNumber | long | The number of transactions that were rolled back. | Node -| OwnerTransactionsNumber | long | The number of transactions initiated on the node. | Node -| TransactionsHoldingLockNumber | long | The number of open transactions that hold a lock on at least one key on the node.| Node -|=== +* `LockedKeysNumber` - The number of keys locked on the node. +* `TransactionsCommittedNumber` - The number of transactions that have been committed on the node. Attribute of the `TransactionMetricsMxBean` MBean, not available in the metric registers. +* `TransactionsRolledBackNumber` - The number of transactions that were rolled back. Attribute of the `TransactionMetricsMxBean` MBean, not available in the metric registers. +* `OwnerTransactionsNumber` - The number of transactions initiated on the node. +* `TransactionsHoldingLockNumber` - The number of open transactions that hold a lock on at least one key on the node. + +The metrics belong to the `tx` register, see link:monitoring-metrics/new-metrics#transactions[Transactions]. === Monitoring Snapshots -[{table_opts}] -|=== -| Attribute | Type | Description | Scope -| LastSnapshotOperation | | | -| LastSnapshotStartTime || | -| SnapshotInProgress | | | -|=== +* `LastSnapshotStartTime` - The system time of the last cluster snapshot request start time on this node. +* `LastSnapshotEndTime` - The system time of the last cluster snapshot request end time on this node. +* `LastSnapshotName` - The name of last started cluster snapshot request on this node. +* `LastSnapshotErrorMessage` - The error message of last started cluster snapshot request which fail with an error. This value will be empty if last snapshot request has been completed successfully. +* `LastRequestId` - The ID of the last started snapshot operation. +* `LocalSnapshotNames` - The list of names of all snapshots currently saved on the local node with respect to the configured via IgniteConfiguration snapshot working path. +* `CurrentSnapshotTotalSize` - Estimated size of current cluster snapshot in bytes on this node. The value may grow during snapshot creation. +* `CurrentSnapshotProcessedSize` - Processed size of current cluster snapshot in bytes on this node. + +The metrics belong to the `snapshot` register, see link:monitoring-metrics/new-metrics#snapshot[Snapshot]. === Monitoring Client Connections Metrics related to JDBC/ODBC or thin client connections. -[{table_opts}] -|=== -| Attribute | Type | Description | Scope -| Connections | java.util.List a| A list of strings, each string containing information about a connection: +* `ActiveSessionsCount`, `thin.ActiveSessions`, `jdbc.ActiveSessions`, `odbc.ActiveSessions` - The number of active connections, total and per client type (`client.connector` register, see link:monitoring-metrics/new-metrics#ignite-thin-client-connector[Ignite Thin Client Connector]). +* The link:monitoring-metrics/system-views#client_connections[CLIENT_CONNECTIONS] system view lists every connection with its user and addresses. +* `Connections` - Attribute of the `ClientProcessorMXBean` MBean, not available in the metric registers. A list of strings, each string containing information about a connection: .... JdbcClient [id=4294967297, user=, rmtAddr=127.0.0.1:39264, locAddr=127.0.0.1:10800] .... -| Node -|=== - === Monitoring Message Queues When thread pools queues' are growing, it means that the node cannot keep up with the load, or there was an error while processing messages in the queue. @@ -476,19 +438,15 @@ Continuous growth of the queue size can lead to OOM errors. The queue of outgoing communication messages contains communication messages that are waiting to be sent to other nodes. If the size is growing, it means there is a problem. -[{table_opts}] -|=== -| Attribute | Type | Description | Scope -| OutboundMessagesQueueSize | int | The size of the queue of outgoing communication messages. | Node -|=== +* `OutboundMessagesQueueSize` - The size of the queue of outgoing communication messages. + +The metrics belong to the `io.communication` register, see link:monitoring-metrics/new-metrics#communication-io[Communication IO]. ==== Discovery Messages Queue The queue of discovery messages. -[{table_opts}] -|=== -| Attribute | Type | Description | Scope -| MessageWorkerQueueSize | int | The size of the queue of discovery messages that are waiting to be sent to other nodes. | Node -|AvgMessageProcessingTime|long| Average message processing time. | Node -|=== +* `MessageWorkerQueueSize` - The size of the queue of discovery messages that are waiting to be sent to other nodes. +* `AvgMessageProcessingTime` - Average message processing time. Attribute of the `TcpDiscoverySpiMBean` MBean, not available in the metric registers. + +The metrics belong to the `io.discovery` register, see link:monitoring-metrics/new-metrics#discovery-io[Discovery IO]. diff --git a/docs/_docs/monitoring-metrics/new-metrics.adoc b/docs/_docs/monitoring-metrics/new-metrics.adoc index b07cb629b4c26..e20a3cab2331c 100644 --- a/docs/_docs/monitoring-metrics/new-metrics.adoc +++ b/docs/_docs/monitoring-metrics/new-metrics.adoc @@ -16,10 +16,8 @@ This page describes metrics registers (categories) and the metrics available in each register. - == System - System metrics such as JVM or CPU metrics. Register name: `sys` @@ -28,25 +26,72 @@ Register name: `sys` |=== |Name |Type| Description |CpuLoad| double| CPU load. -|CurrentThreadCpuTime | long| ThreadMXBean.getCurrentThreadCpuTime() -|CurrentThreadUserTime| long | ThreadMXBean.getCurrentThreadUserTime() -|DaemonThreadCount| integer| ThreadMXBean.getDaemonThreadCount() +|CurrentThreadCpuTime | long | Total CPU time of the current thread, in nanoseconds. +|CurrentThreadUserTime | long | User-mode CPU time of the current thread, in nanoseconds. +|DaemonThreadCount | integer | Current number of live daemon threads. |GcCpuLoad |double| GC CPU load. -|PeakThreadCount |integer| ThreadMXBean.getPeakThreadCount -|SystemLoadAverage| java.lang.Double| OperatingSystemMXBean.getSystemLoadAverage() -|ThreadCount |integer| ThreadMXBean.getThreadCount +|PeakThreadCount | integer | Peak live thread count since the JVM started. +|SystemLoadAverage | double | System load average for the last minute, or a negative value if not available. +|ThreadCount | integer | Current number of live threads, including daemon threads. |TotalExecutedTasks |long| Total executed tasks. -|TotalStartedThreadCount |long| ThreadMXBean.getTotalStartedThreadCount -|UpTime| long | RuntimeMxBean.getUptime() -|memory.heap.committed| long| MemoryUsage.getHeapMemoryUsage().getCommitted() -|memory.heap.init | long| MemoryUsage.getHeapMemoryUsage().getInit() -|memory.heap.used |long| MemoryUsage.getHeapMemoryUsage().getUsed() -|memory.nonheap.committed| long| MemoryUsage.getNonHeapMemoryUsage().getCommitted() -|memory.nonheap.init |long | MemoryUsage.getNonHeapMemoryUsage().getInit() -|memory.nonheap.max |long | MemoryUsage.getNonHeapMemoryUsage().getMax() -|memory.nonheap.used |long | MemoryUsage.getNonHeapMemoryUsage().getUsed() +|TotalStartedThreadCount | long | Total number of threads created and started since the JVM started. +|UpTime | long | JVM uptime, in milliseconds. +|memory.heap.committed | long | Amount of heap memory committed for the JVM to use, in bytes. +|memory.heap.init | long | Initial amount of heap memory requested by the JVM, in bytes; -1 if undefined. +|memory.heap.max | long | Maximum amount of heap memory that can be used, in bytes; -1 if undefined. +|memory.heap.used | long | Amount of used heap memory, in bytes. +|memory.nonheap.committed | long | Amount of non-heap memory committed for the JVM to use, in bytes. +|memory.nonheap.init | long | Initial amount of non-heap memory requested by the JVM, in bytes; -1 if undefined. +|memory.nonheap.max | long | Maximum amount of non-heap memory that can be used, in bytes; -1 if undefined. +|memory.nonheap.used | long | Amount of used non-heap memory, in bytes. |=== +== Node + +Node-level information: version, uptime, cluster state, configured SPIs. Most values are formatted strings intended for humans. + +Register name: `ignite` + +[cols="2,1,3",opts="header"] +|=== +|Name | Type | Description +|active | boolean | Checks Ignite grid is active or is not active. +|checkpointSpiFormatted | string | Formatted instance of configured checkpoint SPI implementation. +|clusterState | string | Checks cluster state. +|collisionSpiFormatted | string | Formatted instance of configured collision SPI implementations. +|communicationSpiFormatted | string | Formatted instance of fully configured SPI communication implementation. +|copyright | string | Copyright statement for Ignite product. +|currentCoordinatorFormatted | string | Formatted properties of current coordinator. +|deploymentSpiFormatted | string | Formatted instance of fully configured deployment SPI implementation. +|discoverySpiFormatted | string | Formatted instance of configured discovery SPI implementation. +|eventStorageSpiFormatted | string | Formatted instance of fully configured event SPI implementation. +|executorServiceFormatted | string | Formatted instance of fully configured thread pool that is used in grid. +|failoverSpiFormatted | string | Formatted instance of fully configured failover SPI implementations. +|fullVersion | string | String presentation of the Ignite version. +|gridLoggerFormatted | string | Formatted instance of logger that is in grid. +|igniteHome | string | Ignite installation home folder. +|instanceName | string | Optional kernal instance name. +|isNodeInBaseline | boolean | Baseline node flag. +|isPeerClassLoadingEnabled | boolean | Whether or not peer class loading (a.k.a. P2P class loading) is enabled. +|isRebalanceEnabled | boolean | Rebalance enabled flag. +|jdkInformation | string | JDK information. +|lastClusterStateChangeTime | long | Unix time of last cluster state change operation. +|lifecycleBeansFormatted | List | String representation of lifecycle beans. +|loadBalancingSpiFormatted | string | Formatted instance of fully configured load balancing SPI implementations. +|localNodeId | UUID | Unique identifier for this node within grid. +|longJVMPauseLastEvents | Map | Long JVM pause last events. +|longJVMPausesCount | long | Long JVM pauses count. +|longJVMPausesTotalDuration | long | Long JVM pauses total duration. +|mBeanServerFormatted | string | Formatted instance of MBean server instance. +|osInformation | string | OS information. +|osUser | string | OS user name. +|startTimestamp | long | Start timestamp of the kernal. +|startTimestampFormatted | string | String presentation of the kernal start timestamp. +|uptime | long | Up-time of the kernal. +|uptimeFormatted | string | String presentation of up-time for the kernal. +|userAttributesFormatted | List | Collection of formatted user-defined attributes added to this node. +|vmName | string | VM name. +|=== == Caches @@ -63,14 +108,14 @@ Register name: `cache.{cache_name}.{near}` |CacheMisses |long|A miss is a get request that is not satisfied. |CachePuts |long|The total number of puts to the cache. |CacheRemovals | long|The total number of removals from the cache. +|CacheSize|long|Local cache size. |CacheTxCommits | long|Total number of transaction commits. |CacheTxRollbacks |long|Total number of transaction rollbacks. -|CacheSize|long|Local cache size. |CommitTime |histogram | Commit time in nanoseconds. |CommitTimeTotal |long| The total time of commit, in nanoseconds. |ConflictResolverAcceptedCount|long|Conflict resolver accepted entries count. -|ConflictResolverRejectedCount|long|Conflict resolver rejected entries count. |ConflictResolverMergedCount|long|Conflict resolver merged entries count. +|ConflictResolverRejectedCount|long|Conflict resolver rejected entries count. |EntryProcessorHits | long|The total number of invocations on keys, which exist in cache. |EntryProcessorInvokeTimeNanos | long | The total time of cache invocations for which this node is the initiator, in nanoseconds. |EntryProcessorMaxInvocationTime |long | So far, the maximum time to execute cache invokes for which this node is the initiator, in nanoseconds. @@ -80,14 +125,16 @@ Register name: `cache.{cache_name}.{near}` |EntryProcessorReadOnlyInvocations |long|The total number of cache invocations, caused no updates. |EntryProcessorRemovals |long|The total number of cache invocations, caused removals. |EstimatedRebalancingKeys|long|Number estimated to rebalance keys. +|EvictingPartitionsLeft | long | The number of non-affinity partitions scheduled for eviction. |GetAllTime | histogram | GetAll time for which this node is the initiator, in nanoseconds. |GetTime | histogram | Get time for which this node is the initiator, in nanoseconds. |GetTimeTotal | long | The total time of cache gets for which this node is the initiator, in nanoseconds. |HeapEntriesCount|long|Onheap entries count. -|IndexRebuildKeysProcessed|long | The number of keys with rebuilt indexes. +|IndexBuildPartitionsLeftCount | integer | The number of local node partitions that remain to be processed to complete indexing. +|IndexRebuildKeyProcessed | long | Number of keys processed during the index rebuilding. |IsCacheAffinityConfigurationMdcSafe|boolean | True if cache affinity guarantees having a copy of each partition in each data center. |IsCachePartitionDistributionSafe|boolean | True if current cache partition distribution maintains the guarantee of one partition copy in each data center. -|IsIndexRebuildInProgress|boolean | True if index build or rebuild is in progress. +|IsIndexRebuildInProgress | boolean | True if index rebuild is in progress. |OffHeapBackupEntriesCount|long|Offheap backup entries count. |OffHeapEntriesCount|long|Offheap entries count. |OffHeapEvictions|long|The total number of evictions from the off-heap memory. @@ -101,54 +148,72 @@ Register name: `cache.{cache_name}.{near}` |PutAllTime | histogram | PutAll time for which this node is the initiator, in nanoseconds. |PutTime | histogram | Put time for which this node is the initiator, in nanoseconds. |PutTimeTotal | long | The total time of cache puts for which this node is the initiator, in nanoseconds. -|QueryCompleted |long|Count of completed queries. -|QueryExecuted |long|Count of executed queries. -|QueryFailed |long|Count of failed queries. -|QueryMaximumTime |long| Maximum query execution time, in milliseconds. -|QueryMinimalTime |long| Minimum query execution time, in milliseconds. -|QuerySumTime |long| Query summary time, in milliseconds. -|RebalanceClearingPartitionsLeft |long| Number of partitions need to be cleared before actual rebalance start. +|QueryCompleted | long | Number of completed queries. +|QueryExecuted | long | Number of executed queries. +|QueryFailed | long | Number of failed queries. +|QueryMaximumTime | long | Maximum execution time of queries, in milliseconds. +|QueryMinimalTime | long | Minimum execution time of queries, in milliseconds. +|QuerySumTime | long | Total execution time of queries, in milliseconds. +|RebalanceClearingPartitionsLeft | long | The number of partitions need to be cleared before actual rebalance start. |RebalanceStartTime |long| Rebalance start time. |RebalancedKeys |long| Number of already rebalanced keys. -|RebalancingBytesRate|long|Estimated rebalancing speed in bytes. -|RebalancingKeysRate |long|Estimated rebalancing speed in keys. +|RebalancingBytesRate | hitrate | Estimated rebalancing speed in bytes. +|RebalancingKeysRate | hitrate | Estimated rebalancing speed in keys. |RemoveAllConflictTime | histogram | RemoveAllConflict time for which this node is the initiator, in nanoseconds. |RemoveAllTime | histogram | RemoveAll time for which this node is the initiator, in nanoseconds. |RemoveTime | histogram | Remove time for which this node is the initiator, in nanoseconds. -|RemoveTimeTotal | long | The total time of cache removal, in nanoseconds. +|RemoveTimeTotal | long | The total time of cache removal for which this node is the initiator, in nanoseconds. |RollbackTime|histogram| Rollback time in nanoseconds. |RollbackTimeTotal |long|The total time of rollback, in nanoseconds. |TotalRebalancedBytes|long|Number of already rebalanced bytes. +|TxKeyCollisions | string | Tx key collisions. Show keys and collisions queue size. Due transactional payload some keys become hot. Metric shows corresponding keys. |=== -== Cache Groups +NOTE: `ConflictResolver*` metrics are registered only when a conflict resolver is configured for the cache. `IsCacheAffinityConfigurationMdcSafe` and `IsCachePartitionDistributionSafe` are registered on server nodes only, and only when the node has a data center ID. +== Cache Groups Register name: `cacheGroups.{group_name}` [cols="2,1,3",opts="header"] |=== |Name | Type | Description -|AffinityPartitionsAssignmentMap |java.util.Map| Affinity partitions assignment map. -|Caches |java.util.ArrayList| List of caches +|AffinityPartitionsAssignmentMap | Map | Affinity partitions assignment map. +|Caches | List | List of caches. +|ClusterMovingPartitionsCount | integer | Count of partitions for this cache group in the entire cluster with state MOVING. +|ClusterOwningPartitionsCount | integer | Count of partitions for this cache group in the entire cluster with state OWNING. +|InMemoryIndexPages | long | Amount of index pages loaded into memory. |IndexBuildCountPartitionsLeft | long| Number of partitions need processed for finished indexes create or rebuilding. +|InitializedLocalPartitionsNumber | long | Number of local partitions initialized on current node. |LocalNodeMovingPartitionsCount |integer| Count of partitions with state MOVING for this cache group located on this node. |LocalNodeOwningPartitionsCount |integer| Count of partitions with state OWNING for this cache group located on this node. |LocalNodeRentingEntriesCount | long| Count of entries remains to evict in RENTING partitions located on this node for this cache group. |LocalNodeRentingPartitionsCount |integer| Count of partitions with state RENTING for this cache group located on this node. |MaximumNumberOfPartitionCopies | integer| Maximum number of partition copies for all partitions of this cache group. |MinimumNumberOfPartitionCopies |integer| Minimum number of partition copies for all partitions of this cache group. -|MovingPartitionsAllocationMap |java.util.Map| Allocation map of partitions with state MOVING in the cluster. -|OwningPartitionsAllocationMap |java.util.Map | Allocation map of partitions with state OWNING in the cluster. -|PartitionIds |java.util.ArrayList| Local partition ids. +|MovingPartitionsAllocationMap | Map | Allocation map of partitions with state MOVING in the cluster. +|OwningPartitionsAllocationMap | Map | Allocation map of partitions with state OWNING in the cluster. +|PartitionIds | List | Local partition ids. +|RebalancingEndTime | long | The time the rebalancing was completed. If the rebalancing completed with an error, was cancelled, or the start time was undefined, the rebalancing end time will be undefined. +|RebalancingFullReceivedBytes | Map | Currently received bytes for full rebalance by supplier. +|RebalancingFullReceivedKeys | Map | Currently received keys for full rebalance by supplier. +|RebalancingHistReceivedBytes | Map | Currently received bytes for historical rebalance by supplier. +|RebalancingHistReceivedKeys | Map | Currently received keys for historical rebalance by supplier. +|RebalancingLastCancelledTime | long | The time the rebalancing was completed with an error or was cancelled. If there were several such cases, the metric stores the last time. The metric displays the value even if there is no rebalancing process. +|RebalancingPartitionsLeft | long | The number of cache group partitions left to be rebalanced. +|RebalancingPartitionsTotal | integer | The total number of cache group partitions to be rebalanced. +|RebalancingReceivedBytes | long | The number of currently rebalanced bytes of this cache group. +|RebalancingReceivedKeys | long | The number of currently rebalanced keys for the whole cache group. +|RebalancingStartTime | long | The time the first partition demand message was sent. If there are no messages to send, the rebalancing time will be undefined. +|ReencryptionBytesLeft |long| The number of bytes left for re-encryption. +|ReencryptionFinished |boolean| The flag indicates whether re-encryption is finished or not. |SparseStorageSize | long| Storage space allocated for group adjusted for possible sparsity, in bytes. |StorageSize |long| Storage space allocated for group, in bytes. -|TotalAllocatedPages |long| Cache group total allocated pages. +|TotalAllocatedPages | long | Total allocated pages. |TotalAllocatedSize |long| Total size of memory allocated for group, in bytes. -|ReencryptionBytesLeft |long| The number of bytes left for re-encryption. -|ReencryptionFinished |boolean| The flag indicates whether re-encryption is finished or not. |=== +NOTE: `ReencryptionBytesLeft` and `ReencryptionFinished` are registered only when cache encryption is enabled. == Transactions @@ -159,22 +224,21 @@ Register name: `tx` [cols="2,1,3",opts="header"] |=== |Name | Type | Description -|AllOwnerTransactions| java.util.HashMap| Map of local node owning transactions. +|AllOwnerTransactions | Map | Map of local node owning transactions. |LockedKeysNumber | long| The number of keys locked on the node. |OwnerTransactionsNumber |long| The number of active transactions for which this node is the initiator. |TransactionsHoldingLockNumber | long| The number of active transactions holding at least one key lock. -|LastCommitTime |long| Last commit time. +|commitTime | long | Last commit time. |nodeSystemTimeHistogram| histogram| Transactions system times on node represented as histogram, in milliseconds. |nodeUserTimeHistogram| histogram| Transactions user times on node represented as histogram, in milliseconds. -|LastRollbackTime| long| Last rollback time. +|rollbackTime | long | Last rollback time. |totalNodeSystemTime |long| Total transactions system time on node, in milliseconds. |totalNodeUserTime |long| Total transactions user time on node, in milliseconds. |txCommits |integer| Number of transaction commits. -|txRollbacks |integer| Number of transaction rollbacks. |txDeadlocks |integer| Number of transaction deadlocks. +|txRollbacks |integer| Number of transaction rollbacks. |=== - == Partition Map Exchange Partition map exchange metrics. @@ -190,7 +254,6 @@ Register name: `pme` |DurationHistogram | histogram | Histogram of PME durations in milliseconds. |=== - == Compute Jobs Register name: `compute.jobs` @@ -198,14 +261,14 @@ Register name: `compute.jobs` [cols="2,1,3",opts="header"] |=== |Name| Type| Description -|compute.jobs.Active |long| Number of active jobs currently executing. -|compute.jobs.Canceled |long| Number of cancelled jobs that are still running. -|compute.jobs.ExecutionTime |long| Total execution time of jobs, in milliseconds. -|compute.jobs.Finished |long| Number of finished jobs. -|compute.jobs.Rejected |long| Number of jobs rejected after more recent collision resolution operation. -|compute.jobs.Started |long| Number of started jobs. -|compute.jobs.Waiting |long| Number of currently queued jobs waiting to be executed. -|compute.jobs.WaitingTime |long| Total time jobs spent on waiting queue, in milliseconds. +|Active | long | Number of active jobs currently executing. +|Canceled | long | Number of cancelled jobs that are still running. +|ExecutionTime | long | Total execution time of jobs, in milliseconds. +|Finished | long | Number of finished jobs. +|Rejected | long | Number of jobs rejected after more recent collision resolution operation. +|Started | long | Number of started jobs. +|Waiting | long | Number of currently queued jobs waiting to be executed. +|WaitingTime | long | Total time jobs spent on waiting queue, in milliseconds. |=== == Thread Pools @@ -215,42 +278,57 @@ Register name: `threadPools.{thread_pool_name}` [cols="2,1,3",opts="header"] |=== |Name | Type | Description -|ActiveCount |long | Approximate number of threads that are actively executing tasks. +|ActiveCount | integer | Approximate number of threads that are actively executing tasks. |CompletedTaskCount| long | Approximate total number of tasks that have completed execution. -|CorePoolSize |long | The core number of threads. +|CorePoolSize | integer | The core number of threads. |KeepAliveTime| long | Thread keep-alive time, which is the amount of time which threads in excess of the core pool size may remain idle before being terminated. -|LargestPoolSize| long | Largest number of threads that have ever simultaneously been in the pool. -|MaximumPoolSize |long | The maximum allowed number of threads. -|PoolSize |long| Current number of threads in the pool. -|QueueSize |long | Current size of the execution queue. +|LargestPoolSize | integer | Largest number of threads that have ever simultaneously been in the pool. +|MaximumPoolSize | integer | The maximum allowed number of threads. +|PoolSize | integer | Current number of threads in the pool. +|QueueSize | integer | Current size of the execution queue. |RejectedExecutionHandlerClass| string | Class name of current rejection handler. |Shutdown | boolean| True if this executor has been shut down. |TaskCount | long | Approximate total number of tasks that have been scheduled for execution. -|TaskExecutionTime | histogram | Task execution time, in milliseconds. +|TaskExecutionTime | histogram | Tasks execution times as histogram (milliseconds). |Terminated |boolean| True if all tasks have completed following shut down. -|Terminating |long| True if terminating but not yet terminated. +|Terminating | boolean | True if terminating but not yet terminated. |ThreadFactoryClass| string| Class name of thread factory used to create new threads. |=== +Striped executors (`StripedExecutor`, `GridDataStreamExecutor`) expose a different set of metrics: + +[cols="2,1,3",opts="header"] +|=== +|Name | Type | Description +|ActiveCount | integer | Number of active tasks of all stripes. +|DetectStarvation | boolean | True if possible starvation in striped pool is detected. +|Shutdown | boolean | True if this executor has been shut down. +|StripesActiveStatuses | boolean[] | Number of active tasks per stripe. +|StripesCompletedTasksCounts | long[] | Number of completed tasks per stripe. +|StripesCount | integer | Stripes count. +|StripesQueueSizes | int[] | Size of queue per stripe. +|TaskExecutionTime | histogram | Tasks execution times as histogram (milliseconds). +|Terminated | boolean | True if all tasks have completed following shut down. +|TotalCompletedTasksCount | long | Completed tasks count of all stripes. +|TotalQueueSize | integer | Total queue size of all stripes. +|=== == Cache Group IO Register name: `io.statistics.cacheGroups.{group_name}` - [cols="2,1,3",opts="header"] |=== |Name | Type | Description -|LOGICAL_READS | long | Number of logical reads -|PHYSICAL_READS | long | Number of physical reads -|grpId | integer | Group id -|name | string | Name of the index -|startTime | long | Statistics collect start time +|LOGICAL_READS | long | Count of logical page reads. +|PHYSICAL_READS | long | Count of physical page reads. +|grpId | integer | Cache group ID. |insertedBytes | long | Count of inserted to store bytes +|name | string | Cache group name. |removedBytes | long | Count of removed from store bytes +|startTime | long | Statistics collection start time, in milliseconds. |=== - == Sorted Indexes I/O Statistics Register name: `io.statistics.sortedIndexes.{cache_name}.{index_name}` @@ -262,30 +340,28 @@ Register name: `io.statistics.sortedIndexes.{cache_name}.{index_name}` |LOGICAL_READS_LEAF | long | Number of logical reads for leaf tree node |PHYSICAL_READS_INNER| long| Number of physical reads for inner tree node |PHYSICAL_READS_LEAF| long| Number of physical reads for leaf tree node -|indexName| string| Name of the index -|name| string| Name of the cache -|startTime| long| Statistics collection start time +|indexName | string | Index name. +|name | string | Cache group name. +|startTime | long | Statistics collection start time, in milliseconds. |=== == Sorted Indexes Operations -Contains metrics about low-level operations (such as `Insert`, `Search`, etc.) on pages of sorted secondary indexes. +Contains metrics about low-level operations on pages of sorted secondary indexes. `{opType}` is one of: `AskNeighbor`, `Insert`, `LockBackAndRmvFromLeaf`, `LockBackAndTail`, `LockTail`, `LockTailExact`, `LockTailForward`, `RemoveFromLeaf`, `RemoveRangeFromLeaf`, `Replace`, `Search`. Register name: `index.{schema_name}.{table_name}.{index_name}` [cols="2,1,3",opts="header"] |=== |Name | Type | Description -|{opType}Count| long| Count of {opType} operations on index. -|{opType}Time| long| Total duration (nanoseconds) of {opType} operations on index. +|{opType}Count | long | Count of {opType} operations. +|{opType}Time | long | Total time of {opType} operations (nanoseconds) |=== - == Hash Indexes I/O Statistics Register name: `io.statistics.hashIndexes.{cache_name}.{index_name}` - [cols="2,1,3",opts="header"] |=== |Name | Type| Description @@ -293,97 +369,165 @@ Register name: `io.statistics.hashIndexes.{cache_name}.{index_name}` |LOGICAL_READS_LEAF| long| Number of logical reads for leaf tree node |PHYSICAL_READS_INNER| long| Number of physical reads for inner tree node |PHYSICAL_READS_LEAF| long| Number of physical reads for leaf tree node -|indexName| string| Name of the index -|name| string| Name of the cache -|startTime| long| Statistics collection start time +|indexName | string | Index name. +|name | string | Cache group name. +|startTime | long | Statistics collection start time, in milliseconds. |=== - == Communication IO Register name: `io.communication` - [cols="2,1,3",opts="header"] |=== |Name| Type| Description -|ActiveSessionsCount| integer| Active TCP sessions count. |OutboundMessagesQueueSize| integer| Outbound messages queue size. -|SentMessagesCount | integer| Sent messages count. -|SentBytesCount | long | Sent bytes count. |ReceivedBytesCount| long| Received bytes count. |ReceivedMessagesCount| integer| Received messages count. -|RejectedSslSessionsCount| integer| TCP sessions count that were rejected due to the SSL errors (metric is exported only if SSL is enabled). -|SslEnabled| boolean| Indicates whether SSL is enabled. -|SslHandshakeDurationHistogram| histogram| Histogram of SSL handshake duration in milliseconds (metric is exported only if SSL is enabled). +|SentBytesCount | long | Sent bytes count. +|SentMessagesCount | integer| Sent messages count. +|=== + +== Communication SPI + +Metrics of the TCP communication SPI. `{message_type}` is the numeric direct type of an Ignite message; a pair of counters exists for every message type the node has sent or received. + +Register name: `communication.tcp` + +[cols="2,1,3",opts="header"] +|=== +|Name | Type | Description +|ActiveSessionsCount | integer | Active TCP sessions count. +|RejectedSslSessionsCount | integer | TCP sessions count that were rejected due to SSL errors. +|SslEnabled | boolean | Whether SSL is enabled. +|SslHandshakeDurationHistogram | histogram | SSL handshake duration in milliseconds. +|maxOutboundMessagesQueueSize | max value | Maximum number of messages waiting to be sent. +|outboundMessagesQueueSize | long | Total number of messages waiting to be sent over all connections. +|receivedBytes | long | Total number of bytes received by current node. +|receivedMessagesByType.{message_type} | long | Total number of messages with given type received by current node. +|receivedMessagesCount | long | Total number of messages received by current node. +|sentBytes | long | Total number of bytes sent by current node. +|sentMessagesByType.{message_type} | long | Total number of messages with given type sent by current node. +|sentMessagesCount | long | Total number of messages sent by current node. +|=== + +NOTE: `RejectedSslSessionsCount` and `SslHandshakeDurationHistogram` are registered only when SSL is enabled. + +A separate register is created for every remote node the local node has exchanged messages with: + +Register name: `communication.tcp.{node_consistent_id}` + +[cols="2,1,3",opts="header"] +|=== +|Name | Type | Description +|receivedMessagesFromNode | long | Total number of messages received by current node from the given node. +|sentMessagesToNode | long | Total number of messages sent by current node to the given node. +|=== + +== Communication Connection Pool + +Register name: `communication.tcp.connectionPool` + +[cols="2,1,3",opts="header"] +|=== +|Name | Type | Description +|isAsync | boolean | Asynchronous flag. If TRUE, connections put data in a queue (with some preprocessing) instead of immediate sending. +|isPaired | boolean | Paired connections flag. +|maxConnectionsCnt | integer | Maximal connections number to a remote node. |=== +Per remote node: + +Register name: `communication.tcp.connectionPool.{node_id}` + +[cols="2,1,3",opts="header"] +|=== +|Name | Type | Description +|acquiringThreadsCnt | integer | Number of threads currently acquiring a connection. +|avgConnectionLifetime | long | Average connection lifetime in milliseconds. +|consistentId | string | Consistent id of the remote node as string. +|currentConnectionsCnt | integer | Number of current connections to the remote node. +|maxNetworkIdleTime | long | Maximal idle time of physical sending or receiving data in milliseconds. +|outboundMessagesQueueSize | integer | Overall number of pending messages to the remote node. +|removedConnectionsCnt | long | Total number of removed connections. +|=== == Ignite Thin Client Connector Register name: `client.connector` - [cols="2,1,3",opts="header"] |=== |Name| Type| Description |ActiveSessionsCount| integer| Active TCP sessions count. -|ReceivedBytesCount| long| Received bytes count. -|RejectedSslSessionsCount| integer| TCP sessions count that were rejected due to the SSL errors (metric is exported only if SSL is enabled). -|RejectedSessionsTimeout| integer| TCP sessions count that were rejected due to handshake timeout. -|RejectedSessionsAuthenticationFailed| integer| TCP sessions count that were rejected due to failed authentication. -|RejectedSessionsTotal| integer| Total number of rejected TCP connections. -|{clientType}.AcceptedSessions| integer| Number of successfully established sessions for the client type. -|{clientType}.ActiveSessions| integer| Number of active sessions for the client type. -|SentBytesCount| long| Sent bytes count. -|SslEnabled| boolean| Indicates whether SSL is enabled. -|SslHandshakeDurationHistogram| histogram| Histogram of SSL handshake duration in milliseconds (metric is exported only if SSL is enabled). |AffinityKeyRequestsHits| long| The number of affinity-aware cache key requests that were sent to the primary node. |AffinityKeyRequestsMisses| long| The number of affinity-aware cache key requests that were sent not to the primary node. |AffinityQueryRequestsHits| long| The number of affinity-aware query requests that were sent to the primary node. |AffinityQueryRequestsMisses| long| The number of affinity-aware query requests that were sent not to the primary node. -|=== - +|RejectedSessionsAuthenticationFailed| integer| TCP sessions count that were rejected due to failed authentication. +|RejectedSessionsTimeout| integer| TCP sessions count that were rejected due to handshake timeout. +|RejectedSessionsTotal| integer| Total number of rejected TCP connections. +|RejectedSslSessionsCount | integer | TCP sessions count that were rejected due to SSL errors. +|SslEnabled | boolean | Whether SSL is enabled. +|SslHandshakeDurationHistogram | histogram | SSL handshake duration in milliseconds. +|jdbc.AcceptedSessions | integer | Number of successfully established sessions for the client type. +|jdbc.ActiveSessions | integer | Number of active sessions for the jdbc client. +|maxOutboundMessagesQueueSize | max value | Maximum number of messages waiting to be sent. +|odbc.AcceptedSessions | integer | Number of successfully established sessions for the client type. +|odbc.ActiveSessions | integer | Number of active sessions for the odbc client. +|outboundMessagesQueueSize | long | Total number of messages waiting to be sent over all connections. +|receivedBytes | long | Total number of bytes received by current node. +|sentBytes | long | Total number of bytes sent by current node. +|thin.AcceptedSessions | integer | Number of successfully established sessions for the client type. +|thin.ActiveSessions | integer | Number of active sessions for the thin client. +|=== + +NOTE: `RejectedSslSessionsCount` and `SslHandshakeDurationHistogram` are registered only when SSL is enabled. == Ignite REST Client Connector Register name: `rest.client` - [cols="2,1,3",opts="header"] |=== |Name| Type| Description |ActiveSessionsCount| integer| Active TCP sessions count. -|ReceivedBytesCount| long| Received bytes count. -|RejectedSslSessionsCount| integer| TCP sessions count that were rejected due to the SSL errors (metric is exported only if SSL is enabled). -|SentBytesCount| long| Sent bytes count. -|SslEnabled| boolean| Indicates whether SSL is enabled. -|SslHandshakeDurationHistogram| histogram| Histogram of SSL handshake duration in milliseconds (metric is exported only if SSL is enabled). +|RejectedSslSessionsCount | integer | TCP sessions count that were rejected due to SSL errors. +|SslEnabled | boolean | Whether SSL is enabled. +|SslHandshakeDurationHistogram | histogram | SSL handshake duration in milliseconds. +|maxOutboundMessagesQueueSize | max value | Maximum number of messages waiting to be sent. +|outboundMessagesQueueSize | long | Total number of messages waiting to be sent over all connections. +|receivedBytes | long | Total number of bytes received by current node. +|sentBytes | long | Total number of bytes sent by current node. |=== +NOTE: `RejectedSslSessionsCount` and `SslHandshakeDurationHistogram` are registered only when SSL is enabled. == Discovery IO Register name: `io.discovery` - [cols="2,1,3",opts="header"] |=== |Name| Type| Description -|ClientRouterNodeId| String| Client router node ID (metric is exported only from client nodes). -|CoordinatorSince| long| Timestamp since which the local node became the coordinator (metric is exported only from server nodes). -|Coordinator| UUID| Coordinator ID (metric is exported only from server nodes). +|ClientRouterNodeId | string | Client router node ID. +|Coordinator | UUID | Coordinator ID. +|CoordinatorSince | long | Coordinator since timestamp. |CurrentTopologyVersion| long| Current topology version. +|FailedNodes | integer | Failed nodes count. |JoinedNodes| integer| Joined nodes count. |LeftNodes| integer| Left nodes count. -|MessageWorkerQueueSize| integer| Current message worker queue size. -|PendingMessagesRegistered| integer| Pending registered messages count. -|RejectedSslConnectionsCount| integer| TCP discovery connections count that were rejected due to the SSL errors. -|SslEnabled| boolean| Indicates whether SSL is enabled. +|MaxMsgQueueSize | max value | Max message queue size. +|MessageWorkerQueueSize | integer | Message worker queue current size. +|Next | UUID | Next in the ring node ID. +|PendingMessagesRegistered | integer | Pending messages registered count. +|RejectedSslConnectionsCount | integer | TCP discovery connections count that were rejected due to SSL errors. +|SslEnabled | boolean | Whether SSL is enabled. |TotalProcessedMessages| integer| Total processed messages count. |TotalReceivedMessages| integer| Total received messages count. |=== +NOTE: `Coordinator`, `CoordinatorSince`, `MaxMsgQueueSize` and `Next` are registered on server nodes only; `ClientRouterNodeId` is registered on client nodes only. == Data Region IO @@ -398,26 +542,32 @@ Register name: `io.dataregion.{data_region_name}` |EmptyDataPages| long| Calculates empty data pages count for region. It counts only totally free pages that can be reused (e. g. pages that are contained in reuse bucket of free list). |EvictionRate| hitrate| Eviction rate (pages per second). |EvictionsStarted | boolean | True if page eviction was triggered due to data region memory pressure. -|LargeEntriesPagesCount| long| Count of pages that fully occupied by large entries that go beyond page size +|InMemoryIndexPages | long | Amount of index pages loaded into memory. +|InitialSize | long | Initial memory region size in bytes defined by its data region. +|LargeEntriesPagesCount | long | Number of pages fully occupied by large entries that go beyond the page size. +|MaxSize | long | Maximum memory region size in bytes defined by its data region. |OffHeapSize| long| Offheap size in bytes. |OffheapUsedSize| long| Offheap used size in bytes. -|PagesFillFactor| double| The average amount of data in non-empty pages as a ratio of the page size. +|PageTimestampHistogram | histogram | Histogram of pages last access time. +|PagesFillFactor | double | The ratio of space occupied by user and system data to the size of all pages that contain this data. |PagesRead| long| Number of pages read from last restart. +|PagesReadTime | long | Total pages read time in nanoseconds since last restart. |PagesReplaceAge| hitrate| Average age at which pages in memory are replaced with pages from persistent storage (milliseconds). |PagesReplaceRate| hitrate| Rate at which pages in memory are replaced with pages from persistent storage (pages per second). +|PagesReplaceTime | long | Total pages replace time in nanoseconds since last restart. |PagesReplaced| long| Number of pages replaced from last restart. |PagesWritten| long| Number of pages written from last restart. |PhysicalMemoryPages| long| Number of pages residing in physical RAM. |PhysicalMemorySize | long| Gets total size of pages loaded to the RAM, in bytes -|SizeUsedByData| long| Estimated number of bytes occupied by data in the region, taking into account free space inside non-empty pages. -|TotalAllocatedPages |long| Total number of allocated pages. -|TotalAllocatedSize| long | Gets a total size of memory allocated in the data region, in bytes +|SizeUsedByData | long | The number of bytes occupied by data. Similar to TotalUsedSize, but also takes into account the empty space in non-empty pages. +|TotalAllocatedPages | long | Total allocated pages. +|TotalAllocatedSize | long | Total size of memory allocated in the data region, in bytes. |TotalThrottlingTime| long| Total throttling threads time in milliseconds. The Ignite throttles threads that generate dirty pages during the ongoing checkpoint. +|TotalUsedPages | long | The number of non-empty pages allocated in the data region. +|TotalUsedSize | long | The number of bytes occupied by non-empty pages allocated in the data region. |UsedCheckpointBufferSize | long| Gets used checkpoint buffer size in bytes - |=== - == Data Storage Data Storage metrics. @@ -428,6 +578,7 @@ Register name: `io.datastorage` |=== |Name | Type | Description |CheckpointBeforeLockHistogram| histogram | Histogram of checkpoint action before taken write lock duration in milliseconds. +|CheckpointBufferSize | long | Checkpoint buffer size in bytes. |CheckpointFsyncHistogram| histogram | Histogram of checkpoint fsync duration in milliseconds. |CheckpointHistogram| histogram | Histogram of checkpoint duration in milliseconds. |CheckpointListenersExecuteHistogram| histogram | Histogram of checkpoint execution listeners under write lock duration in milliseconds. @@ -435,10 +586,12 @@ Register name: `io.datastorage` |CheckpointLockWaitHistogram| histogram | Histogram of checkpoint lock wait duration in milliseconds. |CheckpointMarkHistogram| histogram | Histogram of checkpoint mark duration in milliseconds. |CheckpointPagesWriteHistogram| histogram | Histogram of checkpoint pages write duration in milliseconds. +|CheckpointRecoveryDataWriteHistogram | histogram | Histogram of checkpoint recovery data write duration in milliseconds. |CheckpointSplitAndSortPagesHistogram| histogram | Histogram of splitting and sorting checkpoint pages duration in milliseconds. |CheckpointTotalTime| long | Total duration of checkpoint |CheckpointWalRecordFsyncHistogram| histogram | Histogram of the WAL fsync after logging CheckpointRecord on begin of checkpoint duration in milliseconds. |CheckpointWriteEntryHistogram| histogram | Histogram of entry buffer writing to file duration in milliseconds. +|DirtyPages | long | Total dirty pages for the next checkpoint. |LastArchivedSegment | long | Last archived segment index. |LastCheckpointBeforeLockDuration| long | Duration of the checkpoint action before taken write lock in milliseconds. |LastCheckpointCopiedOnWritePagesNumber| long | Number of pages copied to a temporary checkpoint buffer during the last checkpoint. @@ -450,23 +603,106 @@ Register name: `io.datastorage` |LastCheckpointLockWaitDuration| long| Duration of the checkpoint lock wait in milliseconds. |LastCheckpointMarkDuration | long | Duration of the checkpoint mark in milliseconds. |LastCheckpointPagesWriteDuration| long| Duration of the checkpoint pages write in milliseconds. -|LastCheckpointTotalPagesNumber| long| Total number of pages written during the last checkpoint. +|LastCheckpointRecoveryDataSize | long | Size of checkpoint recovery data in bytes. +|LastCheckpointRecoveryDataWriteDuration | long | Duration of checkpoint recovery data write in milliseconds. |LastCheckpointSplitAndSortPagesDuration| long| Duration of splitting and sorting checkpoint pages of the last checkpoint in milliseconds. |LastCheckpointStart| long| Start timestamp of the last checkpoint. +|LastCheckpointTotalPagesNumber| long| Total number of pages written during the last checkpoint. |LastCheckpointWalRecordFsyncDuration| long| Duration of the WAL fsync after logging CheckpointRecord on the start of the last checkpoint in milliseconds. |LastCheckpointWriteEntryDuration| long| Duration of entry buffer writing to file of the last checkpoint in milliseconds. +|OffHeapSize | long | Total offheap size in bytes. +|OffheapUsedSize | long | Total used offheap size in bytes. +|PagesRead | long | The number of read pages from last restart. +|PagesReplaced | long | The number of replaced pages from last restart. +|PagesWritten | long | The number of written pages from last restart. |SparseStorageSize | long| Storage space allocated adjusted for possible sparsity, in bytes. |StorageSize | long| Storage space allocated, in bytes. +|TotalAllocatedSize | long | Total size of memory allocated in bytes. +|UsedCheckpointBufferPages | long | Used checkpoint buffer size in pages. +|UsedCheckpointBufferSize | long | Used checkpoint buffer size in bytes. |WalArchiveSegments | integer| Current number of WAL segments in the WAL archive. |WalBuffPollSpinsRate| hitrate | WAL buffer poll spins number over the last time interval. +|WalCompressedBytes | long | Total size of the compressed segments in bytes. |WalFsyncTimeDuration | hitrate | Total duration of fsync |WalFsyncTimeNum |hitrate | Total count of fsync |WalLastRollOverTime |long | Time of the last WAL segment rollover. |WalLoggingRate | hitrate| Average number of WAL records per second written during the last time interval. |WalTotalSize| long | Total size in bytes for storage wal files. |WalWritingRate| hitrate | Average number of bytes per second written during the last time interval. +|WalWrittenBytes | long | Total number of logged bytes into the WAL. +|walFsyncTimeAverage | double | Average WAL fsync duration in microseconds over the last time interval. |=== +== Snapshot + +Register name: `snapshot` + +[cols="2,1,3",opts="header"] +|=== +|Name | Type | Description +|CurrentSnapshotProcessedSize | long | Processed size of current cluster snapshot in bytes on this node. +|CurrentSnapshotTotalSize | long | Estimated size of current cluster snapshot in bytes on this node. The value may grow during snapshot creation. +|LastRequestId | string | The ID of the last started snapshot operation. +|LastSnapshotEndTime | long | The system time of the last cluster snapshot request end time on this node. +|LastSnapshotErrorMessage | string | The error message of last started cluster snapshot request which fail with an error. This value will be empty if last snapshot request has been completed successfully. +|LastSnapshotName | string | The name of last started cluster snapshot request on this node. +|LastSnapshotStartTime | long | The system time of the last cluster snapshot request start time on this node. +|LocalSnapshotNames | List | The list of names of all snapshots currently saved on the local node with respect to the configured via IgniteConfiguration snapshot working path. +|=== + +== Incremental Snapshot + +Register name: `snapshot.incremental` + +[cols="2,1,3",opts="header"] +|=== +|Name | Type | Description +|endTime | long | The system time of the last incremental snapshot creation end time on this node. +|error | string | The error message of last started incremental snapshot on this node. +|incrementIndex | integer | The index of the last incremental snapshot created on this node. +|snapshotName | string | The name of full snapshot for which the last incremental snapshot created on this node. +|startTime | long | The system time of the last incremental snapshot creation start time on this node. +|=== + +== Snapshot Restore + +Register name: `snapshot-restore` + +[cols="2,1,3",opts="header"] +|=== +|Name | Type | Description +|endTime | long | The system time when the restore operation of a cluster snapshot on this node ended. +|error | string | Error message of the last running cluster snapshot restore operation on this node. +|incrementIndex | integer | The index of incremental snapshot of the last snapshot restore operation on this node. +|processedPartitions | integer | The number of processed partitions on this node. +|processedWalEntries | long | The number of processed entries from incremental snapshot on this node. +|processedWalSegments | integer | The number of processed WAL segments in the incremental snapshot on this node. +|requestId | string | The request ID of the last running cluster snapshot restore operation on this node. +|snapshotName | string | The snapshot name of the last running cluster snapshot restore operation on this node. +|startTime | long | The system time of the start of the cluster snapshot restore operation on this node. +|totalPartitions | integer | The total number of partitions to be restored on this node. +|totalWalSegments | integer | The total number of WAL segments in the incremental snapshot to be restored on this node. +|=== + +== Snapshot Check + +The register exists only while a snapshot check operation is running and is removed when it completes. `incrementIndex`, `totalWalSegments` and `processedWalSegments` are registered for incremental snapshots; the remaining metrics except `startTime` are registered for full snapshots. + +Register name: `snapshot-check.{snapshot_name}` + +[cols="2,1,3",opts="header"] +|=== +|Name | Type | Description +|checkPartitions | boolean | Shows whether full validation of snapshot partitions is enabled. +|incrementIndex | integer | The index of incremental snapshot of the snapshot check operation. +|processedPartitions | integer | The number of checked partitions on current node. +|processedSnapshotParts | integer | Number of checked snapshot parts (nodes data) on current node. +|processedWalSegments | integer | The number of checked WAL segments in the incremental snapshot on current node. +|snapshotPartsToProcess | integer | Number of parts (nodes data) of snapshot to check on current node. +|startTime | long | The system time of the start of the cluster snapshot check operation on current node. +|totalPartitions | integer | The total number of partitions to check on current node. +|totalWalSegments | integer | The total number of WAL segments in the incremental snapshot to check on current node. +|=== == Cluster @@ -474,7 +710,6 @@ Cluster metrics. Register name: `cluster` - [cols="2,1,3",opts="header"] |=== |Name| Type| Description @@ -491,12 +726,11 @@ Cache processor metrics. Register name: `cache` - [cols="2,1,3",opts="header"] |=== |Name| Type| Description -|LastDataVer| long | The latest data version on the node. |DataVersionClusterId| integer | Data version cluster id. +|LastDataVersion | long | The latest data version on the node. |=== == SQL Parser Metrics @@ -506,7 +740,7 @@ Register name: `sql.parser.cache` [cols="2,1,3",opts="header"] |=== |Name| Type| Description -|hits| long | The number of SQL queries that were found in the parsers cache (doesn't require to be parsed and planned before execution). +|hits | long | The number of SQL queries found in the parser cache, which do not require parsing and planning before execution. |misses| long | The number of SQL queries that were parsed and planned. |=== @@ -517,9 +751,25 @@ Register name: `sql.queries.user` [cols="2,1,3",opts="header"] |=== |Name| Type| Description -|success| long | The number of successfully executed SQL queries. -|failed| long | The number of failed SQL queries (including canceled). -|canceled| long | The number of canceled SQL queries. -|resultSetSizeHistogram| histogram | Histogram of fetched result set sizes for SQL queries. -|maxResultSetSize| max value | Maximum fetched result set size for SQL queries. +|canceled | long | Number of canceled queries that have been started on this node. This metric number included in the general 'failed' metric. +|failed | long | Total number of failed by any reason (cancel, etc) queries that have been started on this node. +|maxResultSetSize | max value | Maximum result set size for SQL queries. +|resultSetSizeHistogram | histogram | Histogram of result set sizes for SQL queries. +|success | long | Number of successfully executed user queries that have been started on this node. |=== + +== Services + +Invocation histograms of a deployed service. The register is created on the nodes where the service instance is deployed, and only if `ServiceConfiguration.setStatisticsEnabled(true)` is set. One histogram is registered per public method of the service interfaces; the bounds are 1, 10, 50, 200 and 1000 milliseconds. + +Register name: `Services.{service_name}` + +[cols="2,1,3",opts="header"] +|=== +|Name | Type | Description +|{method_name} | histogram | Duration in milliseconds of '{method_name}()'. +|=== + +== Custom Metrics + +Registers created by the application through `Ignite.metrics()`. Their names start with `custom.`, see link:monitoring-metrics/custom-metrics[Custom Metrics]. diff --git a/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderCache.java b/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderCache.java index c8d290c656f88..e89bf860a7e7b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderCache.java @@ -75,9 +75,9 @@ public IoStatisticsHolderCache(String grpName, int grpId, GridMetricManager mmgr MetricRegistryImpl mreg = mmgr.registry(metricRegistryName()); - mreg.longMetric("startTime", null).value(U.currentTimeMillis()); - mreg.objectMetric("name", String.class, null).value(grpName); - mreg.intMetric("grpId", null).value(grpId); + mreg.longMetric("startTime", "Statistics collection start time, in milliseconds.").value(U.currentTimeMillis()); + mreg.objectMetric("name", String.class, "Cache group name.").value(grpName); + mreg.intMetric("grpId", "Cache group ID.").value(grpId); logicalReadCtr = mreg.longAdderMetric(LOGICAL_READS, "Count of logical page reads"); physicalReadCtr = mreg.longAdderMetric(PHYSICAL_READS, "Count of physical page reads"); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderIndex.java b/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderIndex.java index 1bce5e4add787..d7d8f4418e284 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderIndex.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderIndex.java @@ -86,9 +86,9 @@ public IoStatisticsHolderIndex( MetricRegistryImpl mreg = mmgr.registry(metricRegistryName()); - mreg.longMetric("startTime", null).value(U.currentTimeMillis()); - mreg.objectMetric("name", String.class, null).value(grpName); - mreg.objectMetric("indexName", String.class, null).value(idxName); + mreg.longMetric("startTime", "Statistics collection start time, in milliseconds.").value(U.currentTimeMillis()); + mreg.objectMetric("name", String.class, "Cache group name.").value(grpName); + mreg.objectMetric("indexName", String.class, "Index name.").value(idxName); logicalReadLeafCtr = mreg.longAdderMetric(LOGICAL_READS_LEAF, null); logicalReadInnerCtr = mreg.longAdderMetric(LOGICAL_READS_INNER, null); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java index 101e3da13ca88..117cbacd6c54a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java @@ -244,7 +244,7 @@ public DataRegionMetricsImpl( 5); largeEntriesPages = mreg.longAdderMetric("LargeEntriesPagesCount", - "Count of pages that fully ocupied by large entries that go beyond page size"); + "Number of pages fully occupied by large entries that go beyond the page size."); dirtyPages = mreg.longAdderMetric("DirtyPages", "Number of pages in memory not yet synchronized with persistent storage."); @@ -727,13 +727,12 @@ public void pageMemory(PageMemory pageMem) { mreg.register("PagesFillFactor", this::getPagesFillFactor, - "Returns the ratio of space occupied by user and system data to the size of all pages that contain " + - "this data"); + "The ratio of space occupied by user and system data to the size of all pages that contain this data."); mreg.register("SizeUsedByData", this::getSizeUsedByData, - "Returns the number of bytes, occupied by data. Similar to TotalUsedSize, but it also takes into " + - "account the empty space in non-empty pages"); + "The number of bytes occupied by data. Similar to TotalUsedSize, but also takes into account " + + "the empty space in non-empty pages."); mreg.register("PhysicalMemoryPages", this::getPhysicalMemoryPages, @@ -747,15 +746,15 @@ public void pageMemory(PageMemory pageMem) { mreg.register("TotalAllocatedSize", this::getTotalAllocatedSize, - "Gets a total size of memory allocated in the data region, in bytes"); + "Total size of memory allocated in the data region, in bytes."); mreg.register("TotalUsedPages", this::getTotalUsedPages, - "Gets an amount of non-empty pages allocated in the data region"); + "The number of non-empty pages allocated in the data region."); mreg.register("TotalUsedSize", this::getTotalUsedSize, - "Gets an amount of bytes, occupied by non-empty pages allocated in the data region"); + "The number of bytes occupied by non-empty pages allocated in the data region."); mreg.register("PhysicalMemorySize", this::getPhysicalMemorySize, diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java index c6e25c2baa3ca..4d32bc1d38c09 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java @@ -544,7 +544,7 @@ public IgniteSnapshotManager(GridKernalContext ctx) { "The name of full snapshot for which the last incremental snapshot created on this node."); incSnpMReg.register("incrementIndex", () -> Optional.ofNullable(lastSeenIncSnpFut).map(f -> f.incIdx).orElse(0), - "Ihe index of the last incremental snapshot created on this node."); + "The index of the last incremental snapshot created on this node."); incSnpMReg.register("startTime", () -> Optional.ofNullable(lastSeenIncSnpFut).map(f -> f.startTime).orElse(0L), "The system time of the last incremental snapshot creation start time on this node."); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java index 769a6510fffb5..ada3bccdd83ea 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java @@ -59,14 +59,14 @@ public class GridCacheQueryMetricsAdapter implements QueryMetrics { public GridCacheQueryMetricsAdapter(GridMetricManager mmgr, String cacheName, boolean isNear) { MetricRegistryImpl mreg = mmgr.registry(MetricUtils.cacheMetricsRegistryName(cacheName, isNear)); - minTime = mreg.longMetric("QueryMinimalTime", null); + minTime = mreg.longMetric("QueryMinimalTime", "Minimum execution time of queries, in milliseconds."); minTime.value(Long.MAX_VALUE); - maxTime = mreg.longMetric("QueryMaximumTime", null); - sumTime = mreg.longAdderMetric("QuerySumTime", null); - execs = mreg.longAdderMetric("QueryExecuted", null); - completed = mreg.longAdderMetric("QueryCompleted", null); - fails = mreg.longAdderMetric("QueryFailed", null); + maxTime = mreg.longMetric("QueryMaximumTime", "Maximum execution time of queries, in milliseconds."); + sumTime = mreg.longAdderMetric("QuerySumTime", "Total execution time of queries, in milliseconds."); + execs = mreg.longAdderMetric("QueryExecuted", "Number of executed queries."); + completed = mreg.longAdderMetric("QueryCompleted", "Number of completed queries."); + fails = mreg.longAdderMetric("QueryFailed", "Number of failed queries."); } /** {@inheritDoc} */ diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/metric/GridMetricManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/metric/GridMetricManager.java index b7d5d0fd54771..f4a60d5569ff8 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/metric/GridMetricManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/metric/GridMetricManager.java @@ -235,14 +235,18 @@ public GridMetricManager(GridKernalContext ctx) { gcCpuLoad = sysreg.doubleMetric(GC_CPU_LOAD, GC_CPU_LOAD_DESCRIPTION); cpuLoad = sysreg.doubleMetric(CPU_LOAD, CPU_LOAD_DESCRIPTION); - sysreg.register("SystemLoadAverage", os::getSystemLoadAverage, Double.class, null); - sysreg.register(UP_TIME, rt::getUptime, null); - sysreg.register(THREAD_CNT, threads::getThreadCount, null); - sysreg.register(PEAK_THREAD_CNT, threads::getPeakThreadCount, null); - sysreg.register(TOTAL_STARTED_THREAD_CNT, threads::getTotalStartedThreadCount, null); - sysreg.register(DAEMON_THREAD_CNT, threads::getDaemonThreadCount, null); - sysreg.register("CurrentThreadCpuTime", threads::getCurrentThreadCpuTime, null); - sysreg.register("CurrentThreadUserTime", threads::getCurrentThreadUserTime, null); + sysreg.register("SystemLoadAverage", os::getSystemLoadAverage, Double.class, + "System load average for the last minute, or a negative value if not available."); + sysreg.register(UP_TIME, rt::getUptime, "JVM uptime, in milliseconds."); + sysreg.register(THREAD_CNT, threads::getThreadCount, "Current number of live threads, including daemon threads."); + sysreg.register(PEAK_THREAD_CNT, threads::getPeakThreadCount, "Peak live thread count since the JVM started."); + sysreg.register(TOTAL_STARTED_THREAD_CNT, threads::getTotalStartedThreadCount, + "Total number of threads created and started since the JVM started."); + sysreg.register(DAEMON_THREAD_CNT, threads::getDaemonThreadCount, "Current number of live daemon threads."); + sysreg.register("CurrentThreadCpuTime", threads::getCurrentThreadCpuTime, + "Total CPU time of the current thread, in nanoseconds."); + sysreg.register("CurrentThreadUserTime", threads::getCurrentThreadUserTime, + "User-mode CPU time of the current thread, in nanoseconds."); MetricRegistryImpl pmeReg = registry(PME_METRICS); @@ -764,10 +768,16 @@ public class MemoryUsageMetrics { public MemoryUsageMetrics(String grp, String metricNamePrefix) { MetricRegistryImpl mreg = registry(grp); - this.init = mreg.longMetric(metricName(metricNamePrefix, "init"), null); - this.used = mreg.longMetric(metricName(metricNamePrefix, "used"), null); - this.committed = mreg.longMetric(metricName(metricNamePrefix, "committed"), null); - this.max = mreg.longMetric(metricName(metricNamePrefix, "max"), null); + String kind = metricNamePrefix.endsWith("nonheap") ? "non-heap" : "heap"; + + this.init = mreg.longMetric(metricName(metricNamePrefix, "init"), + "Initial amount of " + kind + " memory requested by the JVM, in bytes; -1 if undefined."); + this.used = mreg.longMetric(metricName(metricNamePrefix, "used"), + "Amount of used " + kind + " memory, in bytes."); + this.committed = mreg.longMetric(metricName(metricNamePrefix, "committed"), + "Amount of " + kind + " memory committed for the JVM to use, in bytes."); + this.max = mreg.longMetric(metricName(metricNamePrefix, "max"), + "Maximum amount of " + kind + " memory that can be used, in bytes; -1 if undefined."); } /** Updates metric to the provided values. */ diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryParserMetricsHolder.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryParserMetricsHolder.java index 81841563ff127..e231fce82d473 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryParserMetricsHolder.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryParserMetricsHolder.java @@ -42,8 +42,9 @@ public class QueryParserMetricsHolder { public QueryParserMetricsHolder(GridMetricManager metricMgr) { MetricRegistryImpl registry = metricMgr.registry(QUERY_PARSER_METRIC_GROUP_NAME); - qryCacheHits = registry.longAdderMetric("hits", "Count of hits for queries cache"); - qryCacheMisses = registry.longAdderMetric("misses", "Count of misses for queries cache"); + qryCacheHits = registry.longAdderMetric("hits", + "The number of SQL queries found in the parser cache, which do not require parsing and planning before execution."); + qryCacheMisses = registry.longAdderMetric("misses", "The number of SQL queries that were parsed and planned."); } /** From d6073231fc7d19139f2172bdb039f7c1f8885c6a Mon Sep 17 00:00:00 2001 From: NSAmelchev Date: Fri, 4 Sep 2026 18:40:32 +0300 Subject: [PATCH 2/3] IGNITE-29039 Fix metrics documentation: align the metrics reference with the code --- .../new-metrics-system.adoc | 19 +++++----- .../_docs/monitoring-metrics/new-metrics.adoc | 36 ++++++++++--------- docs/_docs/services/services.adoc | 2 +- .../metric/IoStatisticsHolderCache.java | 2 +- .../metric/IoStatisticsHolderIndex.java | 10 +++--- .../cache/CacheGroupMetricsImpl.java | 4 +-- .../persistence/DataRegionMetricsImpl.java | 6 ++-- .../processors/metric/GridMetricManager.java | 4 +-- .../service/IgniteServiceProcessor.java | 2 +- .../thread/pool/IgniteStripedExecutor.java | 2 +- .../pool/IgniteStripedThreadPoolExecutor.java | 3 +- .../ignite/services/ServiceConfiguration.java | 2 +- 12 files changed, 46 insertions(+), 46 deletions(-) diff --git a/docs/_docs/monitoring-metrics/new-metrics-system.adoc b/docs/_docs/monitoring-metrics/new-metrics-system.adoc index cb245655445c3..54c1a0d6643af 100644 --- a/docs/_docs/monitoring-metrics/new-metrics-system.adoc +++ b/docs/_docs/monitoring-metrics/new-metrics-system.adoc @@ -298,7 +298,7 @@ The total amount of data each node keeps on disk consists of the persistent stor ===== Persistent Storage Size To monitor the size of the persistent storage on disk, use the following metrics: -* `TotalAllocatedSize` - The size of the space allocated on disk for the entire data storage (in bytes). {allocsize_note}. +* `TotalAllocatedSize` - The size of the space allocated on disk for the entire data storage (in bytes). {allocsize_note} * `WalTotalSize` - Total size of the WAL files in bytes, including the WAL archive files. * `WalArchiveSegments` - The number of WAL segments in the archive. @@ -310,7 +310,7 @@ Metrics collection for data regions is disabled by default. You can link:monitor The size of the data region on a node comprises the size of all partitions (including backup partitions) that this node owns for all caches in that data region. -* `TotalAllocatedSize` - The size of the space allocated for this data region (in bytes). {allocsize_note}. +* `TotalAllocatedSize` - The size of the space allocated for this data region (in bytes). {allocsize_note} * `SizeUsedByData` - The estimated number of bytes occupied by data in this data region, taking into account free space inside non-empty pages. * `PagesFillFactor` - The average amount of data in non-empty pages as a ratio of the page size. * `TotalUsedPages` - The number of data pages that are currently in use. @@ -346,12 +346,9 @@ link:data-rebalancing[Rebalancing] is the process of moving partitions between t If you have multiple caches, they will be rebalanced sequentially. There are several metrics that you can use to monitor the progress of the rebalancing process for a specific cache. -In the metric system, link:monitoring-metrics/new-metrics#caches[Cache metrics]: -* `RebalancingStartTime` - This metric shows the time when rebalancing of local partitions started for the cache. This metric will return 0 if the local partitions do not participate in the rebalancing. The time is returned in milliseconds. -* `EstimatedRebalancingFinishTime` - Expected time of completion of the rebalancing process. Attribute of the `CacheMetricsMXBean` MBean, not available in the metric registers. -* `KeysToRebalanceLeft` - The number of keys on the node that remain to be rebalanced. You can monitor this metric to learn when the rebalancing process finishes. Attribute of the `CacheMetricsMXBean` MBean, not available in the metric registers. - -The metrics belong to the `cache.{cache_name}.{near}` register, see link:monitoring-metrics/new-metrics#caches[Caches]. +* `RebalancingStartTime` - The time the first partition demand message was sent. If there are no messages to send, the rebalancing time will be undefined. Belongs to the `cacheGroups.{group_name}` register, see link:monitoring-metrics/new-metrics#cache-groups[Cache Groups]. +* `RebalancingKeysRate`, `RebalancingBytesRate`, `EstimatedRebalancingKeys`, `RebalancedKeys` - Rebalancing progress of a cache, see link:monitoring-metrics/new-metrics#caches[Caches]. +* `EstimatedRebalancingFinishTime` and `KeysToRebalanceLeft` - Available only through the `CacheMetrics` Java API (`IgniteCache.metrics()`); the latter equals `EstimatedRebalancingKeys - RebalancedKeys`. === Monitoring Topology Topology refers to the set of nodes in a cluster. There are a number of metrics that expose the information about the topology of the cluster. If the topology changes too frequently or has a size that is different from what you expect, you may want to look into whether there are network problems. @@ -384,7 +381,7 @@ See the new metric system, link:monitoring-metrics/new-metrics#caches[Cache metr To get an estimate on how long it takes to rebuild cache indexes, you can use one of the metrics listed below: -. `IsIndexRebuildInProgress` - tells whether indexes are being built or rebuilt at the moment; +. `IsIndexRebuildInProgress` - tells whether indexes are being rebuilt at the moment; . `IndexBuildCountPartitionsLeft` - gives the remaining number of partitions (by cache group) for indexes to rebuild. Note that the `IndexBuildCountPartitionsLeft` metric allows to estimate only an approximate number of indexes left to rebuild. @@ -398,8 +395,8 @@ For a more accurate estimate, use the `IndexRebuildKeyProcessed` cache metric: Note that if a transaction spans multiple nodes (i.e., if the keys that are changed as a result of the transaction execution are located on multiple nodes), the counters will increase on each node. For example, the 'TransactionsCommittedNumber' counter will increase on each node where the keys affected by the transaction are stored. * `LockedKeysNumber` - The number of keys locked on the node. -* `TransactionsCommittedNumber` - The number of transactions that have been committed on the node. Attribute of the `TransactionMetricsMxBean` MBean, not available in the metric registers. -* `TransactionsRolledBackNumber` - The number of transactions that were rolled back. Attribute of the `TransactionMetricsMxBean` MBean, not available in the metric registers. +* `TransactionsCommittedNumber` - The number of transactions that have been committed on the node. Exposed as `txCommits` in the `tx` register. +* `TransactionsRolledBackNumber` - The number of transactions that were rolled back. Exposed as `txRollbacks` in the `tx` register. * `OwnerTransactionsNumber` - The number of transactions initiated on the node. * `TransactionsHoldingLockNumber` - The number of open transactions that hold a lock on at least one key on the node. diff --git a/docs/_docs/monitoring-metrics/new-metrics.adoc b/docs/_docs/monitoring-metrics/new-metrics.adoc index e20a3cab2331c..c2bc162e4844f 100644 --- a/docs/_docs/monitoring-metrics/new-metrics.adoc +++ b/docs/_docs/monitoring-metrics/new-metrics.adoc @@ -26,8 +26,8 @@ Register name: `sys` |=== |Name |Type| Description |CpuLoad| double| CPU load. -|CurrentThreadCpuTime | long | Total CPU time of the current thread, in nanoseconds. -|CurrentThreadUserTime | long | User-mode CPU time of the current thread, in nanoseconds. +|CurrentThreadCpuTime | long | CPU time of the thread that reads the metric, in nanoseconds. +|CurrentThreadUserTime | long | User-mode CPU time of the thread that reads the metric, in nanoseconds. |DaemonThreadCount | integer | Current number of live daemon threads. |GcCpuLoad |double| GC CPU load. |PeakThreadCount | integer | Peak live thread count since the JVM started. @@ -133,7 +133,7 @@ Register name: `cache.{cache_name}.{near}` |IndexBuildPartitionsLeftCount | integer | The number of local node partitions that remain to be processed to complete indexing. |IndexRebuildKeyProcessed | long | Number of keys processed during the index rebuilding. |IsCacheAffinityConfigurationMdcSafe|boolean | True if cache affinity guarantees having a copy of each partition in each data center. -|IsCachePartitionDistributionSafe|boolean | True if current cache partition distribution maintains the guarantee of one partition copy in each data center. +|IsCachePartitionDistributionSafe | boolean | True if current cache partition distribution maintains guarantee 'one partition copy in each datacenter'. |IsIndexRebuildInProgress | boolean | True if index rebuild is in progress. |OffHeapBackupEntriesCount|long|Offheap backup entries count. |OffHeapEntriesCount|long|Offheap entries count. @@ -206,7 +206,7 @@ Register name: `cacheGroups.{group_name}` |RebalancingReceivedKeys | long | The number of currently rebalanced keys for the whole cache group. |RebalancingStartTime | long | The time the first partition demand message was sent. If there are no messages to send, the rebalancing time will be undefined. |ReencryptionBytesLeft |long| The number of bytes left for re-encryption. -|ReencryptionFinished |boolean| The flag indicates whether re-encryption is finished or not. +|ReencryptionFinished | boolean | The flag indicates whether reencryption is finished or not. |SparseStorageSize | long| Storage space allocated for group adjusted for possible sparsity, in bytes. |StorageSize |long| Storage space allocated for group, in bytes. |TotalAllocatedPages | long | Total allocated pages. @@ -324,7 +324,7 @@ Register name: `io.statistics.cacheGroups.{group_name}` |PHYSICAL_READS | long | Count of physical page reads. |grpId | integer | Cache group ID. |insertedBytes | long | Count of inserted to store bytes -|name | string | Cache group name. +|name | string | Cache or cache group name. |removedBytes | long | Count of removed from store bytes |startTime | long | Statistics collection start time, in milliseconds. |=== @@ -341,7 +341,7 @@ Register name: `io.statistics.sortedIndexes.{cache_name}.{index_name}` |PHYSICAL_READS_INNER| long| Number of physical reads for inner tree node |PHYSICAL_READS_LEAF| long| Number of physical reads for leaf tree node |indexName | string | Index name. -|name | string | Cache group name. +|name | string | Cache or cache group name. |startTime | long | Statistics collection start time, in milliseconds. |=== @@ -370,7 +370,7 @@ Register name: `io.statistics.hashIndexes.{cache_name}.{index_name}` |PHYSICAL_READS_INNER| long| Number of physical reads for inner tree node |PHYSICAL_READS_LEAF| long| Number of physical reads for leaf tree node |indexName | string | Index name. -|name | string | Cache group name. +|name | string | Cache or cache group name. |startTime | long | Statistics collection start time, in milliseconds. |=== @@ -401,7 +401,7 @@ Register name: `communication.tcp` |RejectedSslSessionsCount | integer | TCP sessions count that were rejected due to SSL errors. |SslEnabled | boolean | Whether SSL is enabled. |SslHandshakeDurationHistogram | histogram | SSL handshake duration in milliseconds. -|maxOutboundMessagesQueueSize | max value | Maximum number of messages waiting to be sent. +|maxOutboundMessagesQueueSize | long | Maximum number of messages waiting to be sent. |outboundMessagesQueueSize | long | Total number of messages waiting to be sent over all connections. |receivedBytes | long | Total number of bytes received by current node. |receivedMessagesByType.{message_type} | long | Total number of messages with given type received by current node. @@ -472,7 +472,7 @@ Register name: `client.connector` |SslHandshakeDurationHistogram | histogram | SSL handshake duration in milliseconds. |jdbc.AcceptedSessions | integer | Number of successfully established sessions for the client type. |jdbc.ActiveSessions | integer | Number of active sessions for the jdbc client. -|maxOutboundMessagesQueueSize | max value | Maximum number of messages waiting to be sent. +|maxOutboundMessagesQueueSize | long | Maximum number of messages waiting to be sent. |odbc.AcceptedSessions | integer | Number of successfully established sessions for the client type. |odbc.ActiveSessions | integer | Number of active sessions for the odbc client. |outboundMessagesQueueSize | long | Total number of messages waiting to be sent over all connections. @@ -495,7 +495,7 @@ Register name: `rest.client` |RejectedSslSessionsCount | integer | TCP sessions count that were rejected due to SSL errors. |SslEnabled | boolean | Whether SSL is enabled. |SslHandshakeDurationHistogram | histogram | SSL handshake duration in milliseconds. -|maxOutboundMessagesQueueSize | max value | Maximum number of messages waiting to be sent. +|maxOutboundMessagesQueueSize | long | Maximum number of messages waiting to be sent. |outboundMessagesQueueSize | long | Total number of messages waiting to be sent over all connections. |receivedBytes | long | Total number of bytes received by current node. |sentBytes | long | Total number of bytes sent by current node. @@ -517,7 +517,7 @@ Register name: `io.discovery` |FailedNodes | integer | Failed nodes count. |JoinedNodes| integer| Joined nodes count. |LeftNodes| integer| Left nodes count. -|MaxMsgQueueSize | max value | Max message queue size. +|MaxMsgQueueSize | long | Max message queue size. |MessageWorkerQueueSize | integer | Message worker queue current size. |Next | UUID | Next in the ring node ID. |PendingMessagesRegistered | integer | Pending messages registered count. @@ -558,16 +558,18 @@ Register name: `io.dataregion.{data_region_name}` |PagesReplaced| long| Number of pages replaced from last restart. |PagesWritten| long| Number of pages written from last restart. |PhysicalMemoryPages| long| Number of pages residing in physical RAM. -|PhysicalMemorySize | long| Gets total size of pages loaded to the RAM, in bytes -|SizeUsedByData | long | The number of bytes occupied by data. Similar to TotalUsedSize, but also takes into account the empty space in non-empty pages. +|PhysicalMemorySize | long | Total size of pages loaded to the RAM, in bytes. +|SizeUsedByData | long | Estimated number of bytes occupied by data. Similar to TotalUsedSize, but also takes into account the empty space in non-empty pages. |TotalAllocatedPages | long | Total allocated pages. |TotalAllocatedSize | long | Total size of memory allocated in the data region, in bytes. |TotalThrottlingTime| long| Total throttling threads time in milliseconds. The Ignite throttles threads that generate dirty pages during the ongoing checkpoint. |TotalUsedPages | long | The number of non-empty pages allocated in the data region. |TotalUsedSize | long | The number of bytes occupied by non-empty pages allocated in the data region. -|UsedCheckpointBufferSize | long| Gets used checkpoint buffer size in bytes +|UsedCheckpointBufferSize | long | Used checkpoint buffer size in bytes. |=== +NOTE: `PageTimestampHistogram` is registered only for data regions with persistence enabled. + == Data Storage Data Storage metrics. @@ -753,21 +755,21 @@ Register name: `sql.queries.user` |Name| Type| Description |canceled | long | Number of canceled queries that have been started on this node. This metric number included in the general 'failed' metric. |failed | long | Total number of failed by any reason (cancel, etc) queries that have been started on this node. -|maxResultSetSize | max value | Maximum result set size for SQL queries. +|maxResultSetSize | long | Maximum result set size for SQL queries. |resultSetSizeHistogram | histogram | Histogram of result set sizes for SQL queries. |success | long | Number of successfully executed user queries that have been started on this node. |=== == Services -Invocation histograms of a deployed service. The register is created on the nodes where the service instance is deployed, and only if `ServiceConfiguration.setStatisticsEnabled(true)` is set. One histogram is registered per public method of the service interfaces; the bounds are 1, 10, 50, 200 and 1000 milliseconds. +Invocation histograms of a deployed service. The register is created on the nodes where the service instance is deployed, and only if `ServiceConfiguration.setStatisticsEnabled(true)` is set. One histogram is registered per public method of the service interfaces; durations are measured in nanoseconds, the default bounds correspond to 1, 10, 50, 200 and 1000 milliseconds. Register name: `Services.{service_name}` [cols="2,1,3",opts="header"] |=== |Name | Type | Description -|{method_name} | histogram | Duration in milliseconds of '{method_name}()'. +|{method_name} | histogram | Duration in nanoseconds of '{method_name}()'. |=== == Custom Metrics diff --git a/docs/_docs/services/services.adoc b/docs/_docs/services/services.adoc index d59cdaece888f..f90fda7b1908b 100644 --- a/docs/_docs/services/services.adoc +++ b/docs/_docs/services/services.adoc @@ -286,7 +286,7 @@ In this way, you don't have to stop the server nodes, so you don't interrupt the You can measure durations of your service's methods. If you want this analytics, enable service statistics in the service configuration. Service statistics are collected under name "Services" in -link:monitoring-metrics/new-metrics-system.adoc[metrics], in +link:monitoring-metrics/new-metrics#services[metrics], in link:monitoring-metrics/system-views.adoc[system views], and in JMX. [tabs] diff --git a/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderCache.java b/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderCache.java index e89bf860a7e7b..ae65ae2779bb9 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderCache.java @@ -76,7 +76,7 @@ public IoStatisticsHolderCache(String grpName, int grpId, GridMetricManager mmgr MetricRegistryImpl mreg = mmgr.registry(metricRegistryName()); mreg.longMetric("startTime", "Statistics collection start time, in milliseconds.").value(U.currentTimeMillis()); - mreg.objectMetric("name", String.class, "Cache group name.").value(grpName); + mreg.objectMetric("name", String.class, "Cache or cache group name.").value(grpName); mreg.intMetric("grpId", "Cache group ID.").value(grpId); logicalReadCtr = mreg.longAdderMetric(LOGICAL_READS, "Count of logical page reads"); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderIndex.java b/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderIndex.java index d7d8f4418e284..a881a4c9f0364 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderIndex.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/metric/IoStatisticsHolderIndex.java @@ -87,13 +87,13 @@ public IoStatisticsHolderIndex( MetricRegistryImpl mreg = mmgr.registry(metricRegistryName()); mreg.longMetric("startTime", "Statistics collection start time, in milliseconds.").value(U.currentTimeMillis()); - mreg.objectMetric("name", String.class, "Cache group name.").value(grpName); + mreg.objectMetric("name", String.class, "Cache or cache group name.").value(grpName); mreg.objectMetric("indexName", String.class, "Index name.").value(idxName); - logicalReadLeafCtr = mreg.longAdderMetric(LOGICAL_READS_LEAF, null); - logicalReadInnerCtr = mreg.longAdderMetric(LOGICAL_READS_INNER, null); - physicalReadLeafCtr = mreg.longAdderMetric(PHYSICAL_READS_LEAF, null); - physicalReadInnerCtr = mreg.longAdderMetric(PHYSICAL_READS_INNER, null); + logicalReadLeafCtr = mreg.longAdderMetric(LOGICAL_READS_LEAF, "Number of logical reads for leaf tree node."); + logicalReadInnerCtr = mreg.longAdderMetric(LOGICAL_READS_INNER, "Number of logical reads for inner tree node."); + physicalReadLeafCtr = mreg.longAdderMetric(PHYSICAL_READS_LEAF, "Number of physical reads for leaf tree node."); + physicalReadInnerCtr = mreg.longAdderMetric(PHYSICAL_READS_INNER, "Number of physical reads for inner tree node."); } /** {@inheritDoc} */ diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsImpl.java index d5157063bff20..17ffd5a398607 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsImpl.java @@ -93,7 +93,7 @@ public CacheGroupMetricsImpl(CacheGroupContext ctx) { MetricRegistryImpl mreg = kernalCtx.metric().registry(metricGroupName()); - mreg.register("Caches", this::getCaches, List.class, null); + mreg.register("Caches", this::getCaches, List.class, "List of caches."); mreg.register("StorageSize", this::getStorageSize, "Storage space allocated for group, in bytes."); @@ -182,7 +182,7 @@ public void onTopologyInitialized() { mreg.register("ReencryptionBytesLeft", () -> ctx.shared().kernalContext().encryption().getBytesLeftForReencryption(ctx.groupId()), - "The number of bytes left for re-ecryption."); + "The number of bytes left for re-encryption."); } } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java index 117cbacd6c54a..3302e260808fa 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/DataRegionMetricsImpl.java @@ -731,7 +731,7 @@ public void pageMemory(PageMemory pageMem) { mreg.register("SizeUsedByData", this::getSizeUsedByData, - "The number of bytes occupied by data. Similar to TotalUsedSize, but also takes into account " + + "Estimated number of bytes occupied by data. Similar to TotalUsedSize, but also takes into account " + "the empty space in non-empty pages."); mreg.register("PhysicalMemoryPages", @@ -758,11 +758,11 @@ public void pageMemory(PageMemory pageMem) { mreg.register("PhysicalMemorySize", this::getPhysicalMemorySize, - "Gets total size of pages loaded to the RAM, in bytes"); + "Total size of pages loaded to the RAM, in bytes."); mreg.register("UsedCheckpointBufferSize", this::getUsedCheckpointBufferSize, - "Gets used checkpoint buffer size in bytes"); + "Used checkpoint buffer size in bytes."); } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/metric/GridMetricManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/metric/GridMetricManager.java index f4a60d5569ff8..ef80fbb924968 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/metric/GridMetricManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/metric/GridMetricManager.java @@ -244,9 +244,9 @@ public GridMetricManager(GridKernalContext ctx) { "Total number of threads created and started since the JVM started."); sysreg.register(DAEMON_THREAD_CNT, threads::getDaemonThreadCount, "Current number of live daemon threads."); sysreg.register("CurrentThreadCpuTime", threads::getCurrentThreadCpuTime, - "Total CPU time of the current thread, in nanoseconds."); + "CPU time of the thread that reads the metric, in nanoseconds."); sysreg.register("CurrentThreadUserTime", threads::getCurrentThreadUserTime, - "User-mode CPU time of the current thread, in nanoseconds."); + "User-mode CPU time of the thread that reads the metric, in nanoseconds."); MetricRegistryImpl pmeReg = registry(PME_METRICS); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/IgniteServiceProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/IgniteServiceProcessor.java index 274edbd795d74..2c6f7f9a466eb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/IgniteServiceProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/IgniteServiceProcessor.java @@ -133,7 +133,7 @@ public class IgniteServiceProcessor extends GridProcessorAdapter implements Igni private static final String SERVICE_METRIC_REGISTRY = "Services"; /** Description for the service method invocation metric. */ - private static final String DESCRIPTION_OF_INVOCATION_METRIC_PREF = "Duration in milliseconds of "; + private static final String DESCRIPTION_OF_INVOCATION_METRIC_PREF = "Duration in nanoseconds of "; /** Default bounds of invocation histogram in nanoseconds. */ public static final long[] DEFAULT_INVOCATION_BOUNDS = new long[] { diff --git a/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/IgniteStripedExecutor.java b/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/IgniteStripedExecutor.java index 2a89cbfab2254..117d5b919287a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/IgniteStripedExecutor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/IgniteStripedExecutor.java @@ -518,7 +518,7 @@ public void awaitComplete(int... stripes) throws InterruptedException { mreg.register("StripesActiveStatuses", this::stripesActiveStatuses, boolean[].class, - "Number of active tasks per stripe."); + "Active status of each stripe."); mreg.register("StripesQueueSizes", this::stripesQueueSizes, diff --git a/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/IgniteStripedThreadPoolExecutor.java b/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/IgniteStripedThreadPoolExecutor.java index 201403743d6b7..8d9765ac9d289 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/IgniteStripedThreadPoolExecutor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/IgniteStripedThreadPoolExecutor.java @@ -52,6 +52,7 @@ import static org.apache.ignite.internal.processors.pool.PoolProcessor.REJ_HND_DESC; import static org.apache.ignite.internal.processors.pool.PoolProcessor.TASK_COUNT_DESC; import static org.apache.ignite.internal.processors.pool.PoolProcessor.TASK_EXEC_TIME; +import static org.apache.ignite.internal.processors.pool.PoolProcessor.TASK_EXEC_TIME_DESC; import static org.apache.ignite.internal.processors.pool.PoolProcessor.TASK_EXEC_TIME_HISTOGRAM_BUCKETS; import static org.apache.ignite.internal.processors.pool.PoolProcessor.THRD_FACTORY_DESC; @@ -86,7 +87,7 @@ public IgniteStripedThreadPoolExecutor( boolean allowCoreThreadTimeOut, long keepAliveTime) { execs = new IgniteThreadPoolExecutor[concurrentLvl]; - execTime = new HistogramMetricImpl(TASK_EXEC_TIME, TASK_COUNT_DESC, TASK_EXEC_TIME_HISTOGRAM_BUCKETS); + execTime = new HistogramMetricImpl(TASK_EXEC_TIME, TASK_EXEC_TIME_DESC, TASK_EXEC_TIME_HISTOGRAM_BUCKETS); ThreadFactory factory = new IgniteThreadFactory(igniteInstanceName, threadNamePrefix, eHnd); diff --git a/modules/core/src/main/java/org/apache/ignite/services/ServiceConfiguration.java b/modules/core/src/main/java/org/apache/ignite/services/ServiceConfiguration.java index bd42651e91831..c8cfe099adac7 100644 --- a/modules/core/src/main/java/org/apache/ignite/services/ServiceConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/services/ServiceConfiguration.java @@ -284,7 +284,7 @@ public ServiceConfiguration setNodeFilter(IgnitePredicate nodeFilte /** * Enables or disables statistics for the service. If enabled, durations of the service's methods invocations are - * measured (in milliseconds) and stored in histograms of metric registry + * measured (in nanoseconds) and stored in histograms of metric registry * {@link IgniteServiceProcessor#SERVICE_METRIC_REGISTRY} by service name. *

* NOTE: Statistics are collected only with service proxies obtaining by methods like From babba999179da8943e5dd663b17a3216dd2e018e Mon Sep 17 00:00:00 2001 From: NSAmelchev Date: Fri, 4 Sep 2026 18:48:11 +0300 Subject: [PATCH 3/3] IGNITE-29039 Fix metrics documentation: align the metrics reference with the code --- .../_docs/monitoring-metrics/new-metrics.adoc | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/_docs/monitoring-metrics/new-metrics.adoc b/docs/_docs/monitoring-metrics/new-metrics.adoc index c2bc162e4844f..d15f7988abbe2 100644 --- a/docs/_docs/monitoring-metrics/new-metrics.adoc +++ b/docs/_docs/monitoring-metrics/new-metrics.adoc @@ -323,9 +323,9 @@ Register name: `io.statistics.cacheGroups.{group_name}` |LOGICAL_READS | long | Count of logical page reads. |PHYSICAL_READS | long | Count of physical page reads. |grpId | integer | Cache group ID. -|insertedBytes | long | Count of inserted to store bytes +|insertedBytes | long | Count of inserted to store bytes. |name | string | Cache or cache group name. -|removedBytes | long | Count of removed from store bytes +|removedBytes | long | Count of removed from store bytes. |startTime | long | Statistics collection start time, in milliseconds. |=== @@ -336,10 +336,10 @@ Register name: `io.statistics.sortedIndexes.{cache_name}.{index_name}` [cols="2,1,3",opts="header"] |=== |Name | Type | Description -|LOGICAL_READS_INNER |long| Number of logical reads for inner tree node -|LOGICAL_READS_LEAF | long | Number of logical reads for leaf tree node -|PHYSICAL_READS_INNER| long| Number of physical reads for inner tree node -|PHYSICAL_READS_LEAF| long| Number of physical reads for leaf tree node +|LOGICAL_READS_INNER | long | Number of logical reads for inner tree node. +|LOGICAL_READS_LEAF | long | Number of logical reads for leaf tree node. +|PHYSICAL_READS_INNER | long | Number of physical reads for inner tree node. +|PHYSICAL_READS_LEAF | long | Number of physical reads for leaf tree node. |indexName | string | Index name. |name | string | Cache or cache group name. |startTime | long | Statistics collection start time, in milliseconds. @@ -347,7 +347,7 @@ Register name: `io.statistics.sortedIndexes.{cache_name}.{index_name}` == Sorted Indexes Operations -Contains metrics about low-level operations on pages of sorted secondary indexes. `{opType}` is one of: `AskNeighbor`, `Insert`, `LockBackAndRmvFromLeaf`, `LockBackAndTail`, `LockTail`, `LockTailExact`, `LockTailForward`, `RemoveFromLeaf`, `RemoveRangeFromLeaf`, `Replace`, `Search`. +Contains metrics about low-level operations on pages of sorted secondary indexes. `{opType}` is the name of a B+ tree page operation such as `Insert`, `Search`, `Replace`, `RemoveFromLeaf` or `LockTail`; the exact set is defined by the index implementation and may change between versions. Register name: `index.{schema_name}.{table_name}.{index_name}` @@ -355,7 +355,7 @@ Register name: `index.{schema_name}.{table_name}.{index_name}` |=== |Name | Type | Description |{opType}Count | long | Count of {opType} operations. -|{opType}Time | long | Total time of {opType} operations (nanoseconds) +|{opType}Time | long | Total time of {opType} operations (nanoseconds). |=== == Hash Indexes I/O Statistics @@ -365,10 +365,10 @@ Register name: `io.statistics.hashIndexes.{cache_name}.{index_name}` [cols="2,1,3",opts="header"] |=== |Name | Type| Description -|LOGICAL_READS_INNER| long| Number of logical reads for inner tree node -|LOGICAL_READS_LEAF| long| Number of logical reads for leaf tree node -|PHYSICAL_READS_INNER| long| Number of physical reads for inner tree node -|PHYSICAL_READS_LEAF| long| Number of physical reads for leaf tree node +|LOGICAL_READS_INNER | long | Number of logical reads for inner tree node. +|LOGICAL_READS_LEAF | long | Number of logical reads for leaf tree node. +|PHYSICAL_READS_INNER | long | Number of physical reads for inner tree node. +|PHYSICAL_READS_LEAF | long | Number of physical reads for leaf tree node. |indexName | string | Index name. |name | string | Cache or cache group name. |startTime | long | Statistics collection start time, in milliseconds. @@ -390,7 +390,7 @@ Register name: `io.communication` == Communication SPI -Metrics of the TCP communication SPI. `{message_type}` is the numeric direct type of an Ignite message; a pair of counters exists for every message type the node has sent or received. +Metrics of the TCP communication SPI. `{message_type}` is the numeric direct type of an Ignite message; a pair of counters is registered at startup for every message type known to the node (several hundred in total). Register name: `communication.tcp` @@ -590,7 +590,7 @@ Register name: `io.datastorage` |CheckpointPagesWriteHistogram| histogram | Histogram of checkpoint pages write duration in milliseconds. |CheckpointRecoveryDataWriteHistogram | histogram | Histogram of checkpoint recovery data write duration in milliseconds. |CheckpointSplitAndSortPagesHistogram| histogram | Histogram of splitting and sorting checkpoint pages duration in milliseconds. -|CheckpointTotalTime| long | Total duration of checkpoint +|CheckpointTotalTime | long | Total duration of checkpoint. |CheckpointWalRecordFsyncHistogram| histogram | Histogram of the WAL fsync after logging CheckpointRecord on begin of checkpoint duration in milliseconds. |CheckpointWriteEntryHistogram| histogram | Histogram of entry buffer writing to file duration in milliseconds. |DirtyPages | long | Total dirty pages for the next checkpoint. @@ -625,8 +625,8 @@ Register name: `io.datastorage` |WalArchiveSegments | integer| Current number of WAL segments in the WAL archive. |WalBuffPollSpinsRate| hitrate | WAL buffer poll spins number over the last time interval. |WalCompressedBytes | long | Total size of the compressed segments in bytes. -|WalFsyncTimeDuration | hitrate | Total duration of fsync -|WalFsyncTimeNum |hitrate | Total count of fsync +|WalFsyncTimeDuration | hitrate | Total duration of fsync. +|WalFsyncTimeNum | hitrate | Total count of fsync. |WalLastRollOverTime |long | Time of the last WAL segment rollover. |WalLoggingRate | hitrate| Average number of WAL records per second written during the last time interval. |WalTotalSize| long | Total size in bytes for storage wal files.