Skip to content

Commit

Permalink
Add also mds
Browse files Browse the repository at this point in the history
Signed-off-by: see-quick <[email protected]>
  • Loading branch information
see-quick committed Jan 14, 2025
1 parent dc3bb94 commit 689d18f
Show file tree
Hide file tree
Showing 8 changed files with 294 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# JmxST

**Description:** This suite verifies JMX metrics behavior under various configurations and scenarios.

**Before tests execution steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Install the Cluster Operator and ensure environment readiness. | Cluster Operator is deployed and environment is ready. |

**Labels:**

* [kafka](labels/kafka.md)
* [metrics](labels/metrics.md)

<hr style="border:1px solid">

## testKafkaAndKafkaConnectWithJMX

**Description:** Test verifying Kafka and KafkaConnect with JMX authentication enabled and correct version reporting.

**Steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Deploy a Kafka cluster (ephemeral storage) with JMX authentication. | Kafka cluster is deployed with JMX enabled and authentication set. |
| 2. | Deploy a KafkaConnect cluster with JMX authentication. | KafkaConnect is deployed with JMX enabled and authentication set. |
| 3. | Create a Scraper Pod, install jmxterm, and collect JMX metrics from both Kafka and KafkaConnect. | JMX metrics are retrieved; Kafka version is reported correctly. |

**Labels:**

* [kafka](labels/kafka.md)
* [metrics](labels/metrics.md)

Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
# MetricsST

**Description:** This test suite is designed for testing metrics exposed by operators and operands.

**Before tests execution steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Create namespaces {@namespaceFirst} and {@namespaceSecond}. | Namespaces {@namespaceFirst} and {@namespaceSecond} are created. |
| 2. | Deploy Cluster Operator. | Cluster Operator is deployed. |
| 3. | Deploy Kafka {@kafkaClusterFirstName} with metrics and CruiseControl configured. | Kafka @{kafkaClusterFirstName} is deployed. |
| 4. | Deploy Kafka {@kafkaClusterSecondtName} with metrics configured. | Kafka @{kafkaClusterFirstName} is deployed. |
| 5. | Deploy scraper Pods in namespace {@namespaceFirst} and {@namespaceSecond} for collecting metrics from Strimzi pods. | Scraper Pods are deployed. |
| 6. | Create KafkaUsers and KafkaTopics. | All KafkaUsers and KafkaTopics are Ready. |
| 7. | Setup NetworkPolicies to grant access to Operator Pods and KafkaExporter. | NetworkPolicies created. |
| 8. | Create collectors for Cluster Operator, Kafka, and KafkaExporter. | Metrics collected in collectors structs. |

**After tests execution steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Common cleaning of all resources created by this test class. | All resources deleted. |

**Labels:**

* [metrics](labels/metrics.md)

<hr style="border:1px solid">

## testClusterOperatorMetrics

**Description:** This test case checks several random metrics exposed by Cluster Operator.

**Steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Check that specific metrics for Kafka reconciliation are available in metrics from Cluster Operator pod. | Metric is available with expected value. |
| 2. | Check that collected metrics contain data about Kafka resource. | Metric is available with expected value. |
| 3. | Check that collected metrics don't contain data about KafkaRebalance resource. | Metric is not exposed. |

**Labels:**

* [kafka](labels/kafka.md)
* [metrics](labels/metrics.md)


## testCruiseControlMetrics

**Description:** This test case checks several random metrics exposed by CruiseControl.

**Steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Check if specific metric is available in collected metrics from CruiseControl pods | Metric is available with expected value |

**Labels:**

* [kafka](labels/kafka.md)
* [metrics](labels/metrics.md)
* [cruise-control](labels/cruise-control.md)


## testKafkaBridgeMetrics

**Description:** This test case checks several metrics exposed by KafkaBridge.

**Steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Deploy KafkaBridge into namespaceFirst and ensure KafkaMirrorMaker2 is in Ready state | KafkaBridge is deployed and KafkaMirrorMaker2 is Ready |
| 2. | Attach producer and consumer clients to KafkaBridge | Clients are up and running |
| 3. | Collect metrics from KafkaBridge pod | Metrics are collected |
| 4. | Check that specific metric is available in collected metrics from KafkaBridge pods | Metric is available with expected value |
| 5. | Collect current metrics from Cluster Operator pod | Cluster Operator metrics are collected |
| 6. | Check that CO metrics contain data about KafkaBridge in namespace namespaceFirst | CO metrics contain expected data |

**Labels:**

* [kafka](labels/kafka.md)
* [metrics](labels/metrics.md)
* [bridge](labels/bridge.md)


## testKafkaConnectAndConnectorMetrics

**Description:** This test case checks several random metrics exposed by Kafka Connect.

**Steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Deploy KafkaConnect into {@namespaceFirst} with {@Annotations.STRIMZI_IO_USE_CONNECTOR_RESOURCES} set to true. | KafkaConnect is up and running. |
| 2. | Create KafkaConnector for KafkaConnect from step 1. | KafkaConnector is in Ready state. |
| 3. | Create metrics collector and collect metrics from KafkaConnect Pods. | Metrics are collected. |
| 4. | Check if specific metric is available in collected metrics from KafkaConnect Pods. | Metric is available with expected value. |
| 5. | Collect current metrics from Cluster Operator Pod. | Cluster Operator metrics are collected. |
| 6. | Check that CO metrics contain data about KafkaConnect and KafkaConnector in namespace {@namespaceFirst}. | CO metrics contain expected data. |
| 7. | Check that CO metrics don't contain data about KafkaConnect and KafkaConnector in namespace {@namespaceFirst}. | CO metrics don't contain expected data. |
| 8. | Check that CO metrics contain data about KafkaConnect state. | CO metrics contain expected data. |

**Labels:**

* [kafka](labels/kafka.md)
* [metrics](labels/metrics.md)
* [connect](labels/connect.md)


## testKafkaExporterDifferentSetting

**Description:** This test case checks several metrics exposed by KafkaExporter with different from default configuration. Rolling update is performed during the test case to change KafkaExporter configuration.

**Steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Get KafkaExporter run.sh script and check it has configured proper values. | Script has proper values set. |
| 2. | Check that KafkaExporter metrics contains info about consumer_offset topic. | Metrics contains proper data. |
| 3. | Change configuration of KafkaExporter in Kafka CR to match 'my-group.*' group regex and {@topicName} as topic name regex, than wait for KafkaExporter rolling update. | Rolling update finished. |
| 4. | Get KafkaExporter run.sh script and check it has configured proper values. | Script has proper values set. |
| 5. | Check that KafkaExporter metrics don't contain info about consumer_offset topic. | Metrics contains proper data (consumer_offset is not in the metrics). |
| 6. | Revert all changes in KafkaExporter configuration and wait for Rolling Update. | Rolling update finished. |

**Labels:**

* [kafka](labels/kafka.md)
* [metrics](labels/metrics.md)


## testKafkaExporterMetrics

**Description:** This test case checks several metrics exposed by KafkaExporter.

**Steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Create Kafka producer and consumer and exchange some messages. | Clients successfully exchange the messages. |
| 2. | Check if metric kafka_topic_partitions is available in collected metrics from KafkaExporter Pods. | Metric is available with expected value. |
| 3. | Check if metric kafka_broker_info is available in collected metrics from KafkaExporter pods for each Kafka Broker pod. | Metric is available with expected value. |

**Labels:**

* [kafka](labels/kafka.md)
* [metrics](labels/metrics.md)


## testKafkaMetrics

**Description:** This test case checks several random metrics exposed by Kafka.

**Steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Check if specific metric is available in collected metrics from Kafka Pods. | Metric is available with expected value. |

**Labels:**

* [kafka](labels/kafka.md)
* [metrics](labels/metrics.md)


## testKafkaMetricsSettings

**Description:** This test case checks that the Cluster Operator propagates changes from metrics configuration done in Kafka CR into corresponding config maps.

**Steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Create config map with external metrics configuration. | Config map created. |
| 2. | Set ConfigMap reference from step 1 into Kafka CR and wait for pod stabilization (CO shouldn't trigger rolling update). | Wait for Kafka pods stability (60 seconds without rolling update in the row). |
| 3. | Check that metrics config maps for each pod contains data from external metrics config map. | All config maps contains proper values. |
| 4. | Change config in external metrics config map. | Config map changed. |
| 5. | Wait for Kafka pods stabilization (CO shouldn't trigger rolling update). | Wait for Kafka pods stability (60 seconds without rolling update in the row). |
| 6. | Check that metrics config maps for each pod contains data from external metrics config map. | All config maps contains proper values. |

**Labels:**

* [kafka](labels/kafka.md)
* [metrics](labels/metrics.md)


## testMirrorMaker2Metrics

**Description:** This test case checks several metrics exposed by KafkaMirrorMaker2.

**Steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Deploy KafkaMirrorMaker2 into {@namespaceFirst}. | KafkaMirrorMaker2 is in Ready state. |
| 2. | Collect metrics from KafkaMirrorMaker2 pod. | Metrics are collected. |
| 3. | Check if specific metric is available in collected metrics from KafkaMirrorMaker2 pods. | Metric is available with expected value. |
| 4. | Collect current metrics from Cluster Operator pod. | Cluster Operator metrics are collected. |
| 5. | Check that CO metrics contain data about KafkaMirrorMaker2 in namespace {@namespaceFirst}. | CO metrics contain expected data. |

**Labels:**

* [kafka](labels/kafka.md)
* [metrics](labels/metrics.md)
* `mirror-maker` (description file doesn't exist)


## testUserOperatorMetrics

**Description:** This test case checks several metrics exposed by User Operator.

**Steps:**

| Step | Action | Result |
| - | - | - |
| 1. | Collect metrics from User Operator pod. | Metrics are collected. |
| 2. | Check that specific metrics about KafkaUser are available in collected metrics. | Metric is available with expected value. |

**Labels:**

* [kafka](labels/kafka.md)
* [metrics](labels/metrics.md)

4 changes: 0 additions & 4 deletions development-docs/systemtests/labels/bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ These tests ensure that the bridge behaves as expected under various configurati

<!-- generated part -->
**Tests:**
- [testReceiveSimpleMessageTlsScramSha](../io.strimzi.systemtest.bridge.HttpBridgeScramShaST.md)
- [testBridgeLogSetting](../io.strimzi.systemtest.log.LogSettingST.md)
- [testSendSimpleMessageTls](../io.strimzi.systemtest.bridge.HttpBridgeTlsST.md)
- [testCustomAndUpdatedValues](../io.strimzi.systemtest.bridge.HttpBridgeST.md)
- [testScaleBridgeSubresource](../io.strimzi.systemtest.bridge.HttpBridgeST.md)
- [testSendSimpleMessage](../io.strimzi.systemtest.bridge.HttpBridgeST.md)
- [testReceiveSimpleMessage](../io.strimzi.systemtest.bridge.HttpBridgeST.md)
Expand Down
1 change: 1 addition & 0 deletions development-docs/systemtests/labels/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ maintaining data consistency and availability in a streaming ecosystem.
- [testSecretsWithKafkaConnectWithTlsAndTlsClientAuthentication](../io.strimzi.systemtest.connect.ConnectST.md)
- [testScaleConnectAndConnectorSubresource](../io.strimzi.systemtest.connect.ConnectST.md)
- [testMountingSecretAndConfigMapAsVolumesAndEnvVars](../io.strimzi.systemtest.connect.ConnectST.md)
- [testKafkaConnectAndConnectorMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testKafkaConnectWithScramShaAuthenticationRolledAfterPasswordChanged](../io.strimzi.systemtest.connect.ConnectST.md)
- [testJvmAndResources](../io.strimzi.systemtest.connect.ConnectST.md)
- [testBuildOtherPluginTypeWithAndWithoutFileName](../io.strimzi.systemtest.connect.ConnectBuilderST.md)
Expand Down
1 change: 1 addition & 0 deletions development-docs/systemtests/labels/cruise-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Ensuring the correctness of Cruise Control behavior under different configuratio
- [testCruiseControlIntraBrokerBalancing](../io.strimzi.systemtest.cruisecontrol.CruiseControlST.md)
- [testDeployAndUnDeployCruiseControl](../io.strimzi.systemtest.cruisecontrol.CruiseControlConfigurationST.md)
- [testCruiseControlRemoveDisksMode](../io.strimzi.systemtest.cruisecontrol.CruiseControlST.md)
- [testCruiseControlMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testCruiseControlReplicaMovementStrategy](../io.strimzi.systemtest.cruisecontrol.CruiseControlST.md)
- [testCruiseControlLogChange](../io.strimzi.systemtest.log.LogSettingST.md)
- [testCruiseControlBasicAPIRequestsWithSecurityDisabled](../io.strimzi.systemtest.cruisecontrol.CruiseControlApiST.md)
Expand Down
11 changes: 11 additions & 0 deletions development-docs/systemtests/labels/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,22 @@ These tests are crucial to ensure that Kafka clusters can handle production work
- [testMixtureOfExternalListeners](../io.strimzi.systemtest.kafka.listeners.MultipleListenersST.md)
- [testMessagesTlsScramShaWithPredefinedPassword](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testCustomSoloCertificatesForLoadBalancer](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testKafkaAndKafkaConnectWithJMX](../io.strimzi.systemtest.metrics.JmxST.md)
- [testCustomChainCertificatesForRoute](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testCombinationOfInternalAndExternalListeners](../io.strimzi.systemtest.kafka.listeners.MultipleListenersST.md)
- [testClusterIp](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testCustomCertRouteAndTlsRollingUpdate](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testRegenerateCertExternalAddressChange](../io.strimzi.systemtest.kafka.KafkaST.md)
- [testJvmAndResources](../io.strimzi.systemtest.kafka.KafkaST.md)
- [testMultipleLoadBalancers](../io.strimzi.systemtest.kafka.listeners.MultipleListenersST.md)
- [testCruiseControlMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testClusterOperatorMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testUpdateToExternalListenerCausesRollingRestart](../io.strimzi.systemtest.kafka.dynamicconfiguration.DynamicConfST.md)
- [testUserOperatorMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testKafkaWithVersion](../io.strimzi.systemtest.kafka.KafkaVersionsST.md)
- [testClusterIpTls](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testDynamicallySetEOloggingLevels](../io.strimzi.systemtest.log.LoggingChangeST.md)
- [testKafkaExporterMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testMessagesAndConsumerOffsetFilesOnDisk](../io.strimzi.systemtest.kafka.KafkaST.md)
- [testDynamicallySetMM2LoggingLevels](../io.strimzi.systemtest.log.LoggingChangeST.md)
- [testDeployUnsupportedKafka](../io.strimzi.systemtest.kafka.KafkaST.md)
Expand All @@ -48,9 +53,11 @@ These tests are crucial to ensure that Kafka clusters can handle production work
- [testCustomChainCertificatesForNodePort](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testMultipleRoutes](../io.strimzi.systemtest.kafka.listeners.MultipleListenersST.md)
- [testSendMessagesPlainAnonymous](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testMirrorMaker2Metrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testOverrideNodePortConfiguration](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testNotExistingCMSetsDefaultLogging](../io.strimzi.systemtest.log.LoggingChangeST.md)
- [testTieredStorageWithAivenPlugin](../io.strimzi.systemtest.kafka.TieredStorageST.md)
- [testKafkaMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testLoadBalancerTls](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testNodePoolsRolesChanging](../io.strimzi.systemtest.kafka.KafkaNodePoolST.md)
- [testNodePort](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
Expand All @@ -64,17 +71,21 @@ These tests are crucial to ensure that Kafka clusters can handle production work
- [testNodePoolsAdditionAndRemoval](../io.strimzi.systemtest.kafka.KafkaNodePoolST.md)
- [testAdditionalVolumes](../io.strimzi.systemtest.kafka.KafkaST.md)
- [testDynamicallySetUnknownKafkaLogger](../io.strimzi.systemtest.log.LoggingChangeST.md)
- [testKafkaBridgeMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testMultipleNodePorts](../io.strimzi.systemtest.kafka.listeners.MultipleListenersST.md)
- [testCustomCertNodePortAndTlsRollingUpdate](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testChangingInternalToExternalLoggingTriggerRollingUpdate](../io.strimzi.systemtest.log.LoggingChangeST.md)
- [testKafkaQuotasPluginWithBandwidthLimitation](../io.strimzi.systemtest.kafka.QuotasST.md)
- [testLoggingHierarchy](../io.strimzi.systemtest.log.LoggingChangeST.md)
- [testKafkaNodePoolBrokerIdsManagementUsingAnnotations](../io.strimzi.systemtest.kafka.KafkaNodePoolST.md)
- [testKafkaExporterDifferentSetting](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testLoadBalancer](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testKafkaConnectAndConnectorMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testKafkaQuotasPluginIntegration](../io.strimzi.systemtest.kafka.QuotasST.md)
- [testCustomCertLoadBalancerAndTlsRollingUpdate](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testSimpleDynamicConfiguration](../io.strimzi.systemtest.kafka.dynamicconfiguration.DynamicConfST.md)
- [testMultipleInternal](../io.strimzi.systemtest.kafka.listeners.MultipleListenersST.md)
- [testCustomSoloCertificatesForNodePort](../io.strimzi.systemtest.kafka.listeners.ListenersST.md)
- [testConnectWithConnectorUsingConfigAndEnvProvider](../io.strimzi.systemtest.kafka.ConfigProviderST.md)
- [testDynamicallySetUnknownKafkaLoggerValue](../io.strimzi.systemtest.log.LoggingChangeST.md)
- [testKafkaMetricsSettings](../io.strimzi.systemtest.metrics.MetricsST.md)
22 changes: 22 additions & 0 deletions development-docs/systemtests/labels/metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# **Metrics**

## Description

These tests ensure that all metrics exposed by Strimzi components (including Kafka, Kafka Connect, Kafka Bridge, Kafka MirrorMaker2, and the Cluster Operator) adhere to expected behaviors and formats.
They validate data correctness, confirm that metrics are exposed under various configurations, and ensure integration with external monitoring systems.
Proper verification of metrics is crucial for observability, debugging, and performance tuning in production environments.


<!-- generated part -->
**Tests:**
- [testKafkaExporterDifferentSetting](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testKafkaExporterMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testKafkaMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testKafkaConnectAndConnectorMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testKafkaAndKafkaConnectWithJMX](../io.strimzi.systemtest.metrics.JmxST.md)
- [testKafkaBridgeMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testCruiseControlMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testClusterOperatorMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testUserOperatorMetrics](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testKafkaMetricsSettings](../io.strimzi.systemtest.metrics.MetricsST.md)
- [testMirrorMaker2Metrics](../io.strimzi.systemtest.metrics.MetricsST.md)
Loading

0 comments on commit 689d18f

Please sign in to comment.