|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * migrating_from_ocp_3_to_4/troubleshooting-3-4.adoc |
| 4 | +// * migration-toolkit-for-containers/troubleshooting-mtc.adoc |
| 5 | + |
| 6 | +[id="migration-performance-metrics_{context}"] |
| 7 | += Performance metrics |
| 8 | + |
| 9 | +The `MigrationController` custom resource (CR) records a set of metrics and pulls it into on-cluster monitoring storage. You can query the metrics by using Prometheus Query Language (PromQL) to diagnose migration performance issues. All metrics are reset when the Migration Controller pod restarts. |
| 10 | + |
| 11 | +[id="provided-metrics_{context}"] |
| 12 | +== Provided metrics |
| 13 | + |
| 14 | +[id="cam_app_workload_migrations-metric_{context}"] |
| 15 | +=== cam_app_workload_migrations |
| 16 | + |
| 17 | +This metric is a count of `MigMigration` CRs over time. It is useful for viewing alongside the `mtc_client_request_count` and `mtc_client_request_elapsed` metrics to collate API request information with migration status changes. This metric is included in Telemetry. |
| 18 | + |
| 19 | +.cam_app_workload_migrations metric |
| 20 | +[%header,cols="3,3,3"] |
| 21 | +|=== |
| 22 | +|Queryable label name |Sample label values |Label description |
| 23 | + |
| 24 | +|status |
| 25 | +|`running`, `idle`, `failed`, `completed` |
| 26 | +|Status of the `MigMigration` CR |
| 27 | + |
| 28 | +|type |
| 29 | +|stage, final |
| 30 | +|Type of the `MigMigration` CR |
| 31 | +|=== |
| 32 | + |
| 33 | +[id="mtc_client_request_count-metric_{context}"] |
| 34 | +=== mtc_client_request_count |
| 35 | + |
| 36 | +This metric is a cumulative count of Kubernetes API requests that `MigrationController` issued. It is not included in Telemetry. |
| 37 | + |
| 38 | +.mtc_client_request_count metric |
| 39 | +[%header,cols="3,3,3"] |
| 40 | +|=== |
| 41 | +|Queryable label name |Sample label values |Label description |
| 42 | + |
| 43 | +|cluster |
| 44 | +|`\https://migcluster-url:443` |
| 45 | +|Cluster that the request was issued against |
| 46 | + |
| 47 | +|component |
| 48 | +|`MigPlan`, `MigCluster` |
| 49 | +|Sub-controller API that issued request |
| 50 | + |
| 51 | +|function |
| 52 | +|`(*ReconcileMigPlan).Reconcile` |
| 53 | +|Function that the request was issued from |
| 54 | + |
| 55 | +|kind |
| 56 | +|`SecretList`, `Deployment` |
| 57 | +|Kubernetes kind the request was issued for |
| 58 | +|=== |
| 59 | + |
| 60 | +[id="mtc_client_request_elapsed-metric_{context}"] |
| 61 | +=== mtc_client_request_elapsed |
| 62 | + |
| 63 | +This metric is a cumulative latency, in milliseconds, of Kubernetes API requests that `MigrationController` issued. It is not included in Telemetry. |
| 64 | + |
| 65 | +.mtc_client_request_elapsed metric |
| 66 | +[%header,cols="3,3,3"] |
| 67 | +|=== |
| 68 | +|Queryable label name |Sample label values |Label description |
| 69 | + |
| 70 | +|cluster |
| 71 | +|`\https://cluster-url.com:443` |
| 72 | +|Cluster that the request was issued against |
| 73 | + |
| 74 | +|component |
| 75 | +|`migplan`, `migcluster` |
| 76 | +|Sub-controller API that issued request |
| 77 | + |
| 78 | +|function |
| 79 | +|`(*ReconcileMigPlan).Reconcile` |
| 80 | +|Function that the request was issued from |
| 81 | + |
| 82 | +|kind |
| 83 | +|`SecretList`, `Deployment` |
| 84 | +|Kubernetes resource that the request was issued for |
| 85 | +|=== |
| 86 | + |
| 87 | +[id="useful-queries_{context}"] |
| 88 | +== Useful queries |
| 89 | + |
| 90 | +The table lists some helpful queries that can be used for monitoring performance. |
| 91 | + |
| 92 | +.Useful queries |
| 93 | + |
| 94 | +[%header,cols="3,3"] |
| 95 | +|=== |
| 96 | +|Query |Description |
| 97 | + |
| 98 | +|`mtc_client_request_count` |
| 99 | +|Number of API requests issued, sorted by request type |
| 100 | + |
| 101 | +|`sum(mtc_client_request_count)` |
| 102 | +|Total number of API requests issued |
| 103 | + |
| 104 | +|`mtc_client_request_elapsed` |
| 105 | +|API request latency, sorted by request type |
| 106 | + |
| 107 | +|`sum(mtc_client_request_elapsed)` |
| 108 | +|Total latency of API requests |
| 109 | + |
| 110 | +|`sum(mtc_client_request_elapsed) / sum(mtc_client_request_count)` |
| 111 | +|Average latency of API requests |
| 112 | + |
| 113 | +|`mtc_client_request_elapsed / mtc_client_request_count` |
| 114 | +|Average latency of API requests, sorted by request type |
| 115 | + |
| 116 | +|`cam_app_workload_migrations{status="running"} * 100` |
| 117 | +|Count of running migrations, multiplied by 100 for easier viewing alongside request counts |
| 118 | +|=== |
0 commit comments