@@ -412,6 +412,77 @@ BEOTEL_CENTREON_AGENT_CHECK_NATIVE_CPU
412
412
Should Be True ${result } resources table not updated
413
413
414
414
415
+ BEOTEL_CENTREON_AGENT_CHECK_NATIVE_STORAGE
416
+ [Documentation] agent check service with native check storage and we expect to get it in check result
417
+ [Tags] broker engine opentelemetry MON-147936
418
+
419
+ ${run_env } Ctn Run Env
420
+ Pass Execution If "${run_env } " != "WSL" "This test is only for WSL"
421
+
422
+ Ctn Config Engine ${1 } ${2 } ${2 }
423
+ Ctn Add Otl ServerModule
424
+ ... 0
425
+ ... {"otel_server":{"host": "0.0.0.0","port": 4317},"max_length_grpc_log":0,"centreon_agent":{"check_interval":10, "export_period":15}}
426
+ Ctn Config Add Otl Connector
427
+ ... 0
428
+ ... OTEL connector
429
+ ... opentelemetry --processor=centreon_agent --extractor=attributes --host_path=resource_metrics.resource.attributes.host.name --service_path=resource_metrics.resource.attributes.service.name
430
+ Ctn Engine Config Replace Value In Services ${0 } service_1 check_command otel_check
431
+ Ctn Set Services Passive 0 service_1
432
+
433
+ Ctn Engine Config Add Command ${0 } otel_check {"check": "storage", "args": { "free": true, "unit": "%"}} OTEL connector
434
+
435
+ Ctn Engine Config Set Value 0 log_level_checks trace
436
+
437
+ Ctn Clear Db metrics
438
+
439
+ Ctn Config Broker central
440
+ Ctn Config Broker module
441
+ Ctn Config Broker rrd
442
+ Ctn Config Centreon Agent
443
+
444
+ Ctn Config BBDO3 1
445
+ Ctn Clear Retention
446
+
447
+ ${start } Ctn Get Round Current Date
448
+ Ctn Start Broker
449
+ Ctn Start Engine
450
+ Ctn Start Agent
451
+
452
+ # Let's wait for the otel server start
453
+ ${content } Create List unencrypted server listening on 0.0.0.0:4317
454
+ ${result } Ctn Find In Log With Timeout ${engineLog0 } ${start } ${content } 10
455
+ Should Be True ${result } "unencrypted server listening on 0.0.0.0:4317" should be available.
456
+
457
+ ${result } Ctn Check Service Resource Status With Timeout host_1 service_1 0 120 HARD
458
+ Should Be True ${result } resources table not updated
459
+
460
+ ${expected_perfdata } Ctn Get Drive Statistics
461
+ ${result } Ctn Check Service Perfdata host_1 service_1 60 0.1 ${expected_perfdata }
462
+ Should be True ${result } data_bin not updated
463
+
464
+
465
+ #a small threshold to make service_1 warning
466
+ Ctn Engine Config Replace Value In Services ${0 } service_1 check_command otel_check2
467
+
468
+ Ctn Engine Config Add Command ${0 } otel_check2 {"check": "storage", "args": {"warning" : "99.99"}} OTEL connector
469
+
470
+ Ctn Reload Engine
471
+ ${result } Ctn Check Service Resource Status With Timeout host_1 service_1 1 60 ANY
472
+ Should Be True ${result } resources table not updated
473
+
474
+ #a small threshold to make service_1 critical
475
+ Ctn Engine Config Replace Value In Services ${0 } service_1 check_command otel_check3
476
+
477
+ Ctn Engine Config Add Command ${0 } otel_check3 {"check": "storage", "args": {"critical" : "99.99"}} OTEL connector
478
+
479
+ Ctn Reload Engine
480
+ ${result } Ctn Check Service Resource Status With Timeout host_1 service_1 2 60 ANY
481
+ Should Be True ${result } resources table not updated
482
+
483
+
484
+
485
+
415
486
*** Keywords ***
416
487
Ctn Create Cert And Init
417
488
[Documentation] create key and certificates used by agent and engine on linux side
0 commit comments