|
20 | 20 | from cmk.graphing.v1 import translations as translations_api |
21 | 21 | from cmk.gui.graphing_main import _load_graphing_plugins |
22 | 22 | from cmk.utils.paths import omd_root |
| 23 | +from tests.testlib.common.repo import is_non_free_repo |
23 | 24 |
|
24 | 25 |
|
25 | 26 | def test_load_graphing_plugins() -> None: |
@@ -288,6 +289,7 @@ def _metric_names_by_module( |
288 | 289 | return metric_names_by_module |
289 | 290 |
|
290 | 291 |
|
| 292 | +@pytest.mark.skip_if_edition("community") |
291 | 293 | def test_bundles() -> None: |
292 | 294 | offenders = [ |
293 | 295 | (module, metric_names) |
@@ -326,14 +328,14 @@ def test_bundles() -> None: |
326 | 328 |
|
327 | 329 |
|
328 | 330 | _ALLOWED_BUNDLE_VIOLATIONS = ( |
329 | | - set() |
330 | | - if edition(omd_root) is Edition.COMMUNITY |
331 | | - else { |
| 331 | + { |
332 | 332 | # we cannot have sub-modules below the cee folder, so we have to allow the following violations |
333 | 333 | # in cmk.nonfree.pro.robotmk, the module layout of the metric etc. defintions is correct |
334 | 334 | "cmk.plugins.robotmk.graphing.nonfree", |
335 | 335 | "cmk.plugins.azure_v2.graphing.nonfree.ultimate", |
336 | 336 | } |
| 337 | + if is_non_free_repo() |
| 338 | + else set() |
337 | 339 | ) |
338 | 340 |
|
339 | 341 |
|
@@ -467,6 +469,41 @@ def test_bundles() -> None: |
467 | 469 | "Utilization": {"cisco_sma_queue_utilization", "generic_util"}, |
468 | 470 | "Write latency": {"write_latency", "db_write_latency_s"}, |
469 | 471 | "Write operations": {"write_ops_s", "disk_write_ios"}, |
| 472 | + "Failed requests (404)": { |
| 473 | + "azure_cosmosdb_database_failed_requests", |
| 474 | + "azure_cosmosdb_database_container_failed_requests", |
| 475 | + "azure_cosmosdb_failed_requests", |
| 476 | + }, |
| 477 | + "Throttled requests ratio": { |
| 478 | + "azure_cosmosdb_throttled_ratio", |
| 479 | + "azure_cosmosdb_database_throttled_ratio", |
| 480 | + "azure_cosmosdb_database_container_throttled_ratio", |
| 481 | + }, |
| 482 | + "Throttled requests (429)": { |
| 483 | + "azure_cosmosdb_database_container_throttled_requests", |
| 484 | + "azure_cosmosdb_database_throttled_requests", |
| 485 | + "azure_cosmosdb_throttled_requests", |
| 486 | + }, |
| 487 | + "Total requests": { |
| 488 | + "azure_cosmosdb_database_container_total_requests", |
| 489 | + "azure_cosmosdb_database_total_requests", |
| 490 | + "azure_cosmosdb_totalrequests", |
| 491 | + }, |
| 492 | + "Normalized RU consumption": { |
| 493 | + "azure_cosmosdb_normalized_ru_consumption", |
| 494 | + "azure_cosmosdb_database_normalized_ru_consumption", |
| 495 | + "azure_cosmosdb_database_container_normalized_ru_consumption", |
| 496 | + }, |
| 497 | + "Total RUs": { |
| 498 | + "azure_cosmosdb_database_total_rus", |
| 499 | + "azure_cosmosdb_total_rus", |
| 500 | + "azure_cosmosdb_database_container_total_rus", |
| 501 | + }, |
| 502 | + "Data usage": {"data_usage", "azure_cosmosdb_data_usage"}, |
| 503 | + "Cache hits": {"azure_redis_cache_hits", "varnish_cache_hit_rate"}, |
| 504 | + "Cache misses": {"varnish_cache_miss_rate", "azure_redis_cache_misses"}, |
| 505 | + "Cache hit ratio": {"azure_redis_cache_hit_ratio", "cache_hit_ratio"}, |
| 506 | + "Memory utilization": {"memory_util", "azure_redis_memory_utilization"}, |
470 | 507 | } |
471 | 508 |
|
472 | 509 |
|
@@ -520,18 +557,23 @@ def test_duplicate_metric_titles_fixed() -> None: |
520 | 557 |
|
521 | 558 |
|
522 | 559 | _ALLOWED_DUPLICATE_GRAPH_TITLES = { |
523 | | - "Huge pages": {"huge_pages_2", "huge_pages"}, |
524 | | - "Bandwidth": {"bandwidth_translated", "bandwidth"}, |
525 | | - # 'Traffic' is commented out b/c it *appears* fixed to this test (if you run via bazel). |
526 | | - # This is caused by the netapp family being moved into the cmk-plugins package. |
527 | | - # We may have to move this test to integration/cmk/plugins_consistency. |
528 | | - # See also CMK-27183 |
529 | | - # "Traffic": {"read_write_data", "traffic"}, |
530 | | - "Disk latency": {"disk_latency", "disk_rw_latency"}, |
531 | 560 | "Access point statistics": {"access_point_statistics2", "access_point_statistics"}, |
532 | | - "VMalloc address space": {"vmalloc_address_space_2", "vmalloc_address_space_1"}, |
| 561 | + "Bandwidth": {"bandwidth_translated", "bandwidth"}, |
533 | 562 | "Capacity usage": {"capacity_usage_2", "capacity_usage"}, |
| 563 | + "Disk latency": {"disk_latency", "disk_rw_latency"}, |
| 564 | + "Huge pages": {"huge_pages_2", "huge_pages"}, |
534 | 565 | "Packets": {"packets_1", "packets_2", "packets_3"}, |
| 566 | + "Requests (Azure, CosmosDB)": { |
| 567 | + "azure_cosmosdb_database_container_requests", |
| 568 | + "azure_cosmosdb_database_requests", |
| 569 | + }, |
| 570 | + "Throttled Requests Ratio": { |
| 571 | + "azure_cosmosdb_database_throttled_ratio", |
| 572 | + "azure_cosmosdb_database_container_throttled_ratio", |
| 573 | + }, |
| 574 | + "Throughput": {"azure_natgateways_throughput_in_out", "azure_redis_throughput"}, |
| 575 | + "Traffic": {"traffic", "read_write_data"}, |
| 576 | + "VMalloc address space": {"vmalloc_address_space_2", "vmalloc_address_space_1"}, |
535 | 577 | } |
536 | 578 |
|
537 | 579 |
|
|
0 commit comments