| 1 |
*** Settings *** |
| 2 |
|
| 3 |
|
| 4 |
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource |
| 5 |
|
| 6 |
Suite Setup Start Mockoon ${MOCKOON_JSON} |
| 7 |
Suite Teardown Stop Mockoon |
| 8 |
Test Timeout 120s |
| 9 |
Test Setup Ctn Cleanup Cache |
| 10 |
|
| 11 |
*** Variables *** |
| 12 |
${MOCKOON_JSON} ${CURDIR}${/}vmware8-restapi.mockoon.json |
| 13 |
|
| 14 |
${CMD} ${CENTREON_PLUGINS} --plugin=apps::vmware::vsphere8::esx::plugin |
| 15 |
... --mode=cpu |
| 16 |
... --password=C3POR2P2 |
| 17 |
... --username=obi-wan |
| 18 |
... --hostname=127.0.0.1 |
| 19 |
... --proto=http |
| 20 |
... --port=3000 |
| 21 |
... --esx-id=host-22 |
| 22 |
|
| 23 |
*** Test Cases *** |
| 24 |
Cpu with curl ${tc} |
| 25 |
[Tags] apps api vmware vsphere8 esx |
| 26 |
${command} Catenate ${CMD} --http-backend=curl ${extraoptions} |
| 27 |
|
| 28 |
Ctn Run Command And Check Result As Strings ${command} ${expected_result} |
| 29 |
|
| 30 |
Examples: tc extraoptions expected_result -- |
| 31 |
... 1 ${EMPTY} OK: usage-percentage : skipped (no value(s)), usage-frequency : skipped (no value(s)) - no data for host host-22 counter cpu.capacity.provisioned.HOST at the moment. |
| 32 |
... 2 ${EMPTY} OK: CPU average usage is 9.16 %, used frequency is 4603.44 kHz | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 |
| 33 |
... 3 --add-contention OK: CPU average usage is 9.16 %, used frequency is 4603.44 kHz - CPU average contention is 0.55 % | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 'cpu.capacity.contention.percentage'=0.55%;;;0;100 |
| 34 |
... 4 --add-demand OK: CPU average usage is 9.16 %, used frequency is 4603.44 kHz - CPU average demand is 8.36 %, demand frequency is 4201 kHz | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 'cpu.capacity.demand.percentage'=8.3552108194113;;;; 'cpu.capacity.demand.hertz'=4201000Hz;;;;50280000 |
| 35 |
... 5 --add-corecount OK: CPU average usage is 9.16 %, used frequency is 4603.44 kHz - CPU cores used: 83 | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 'cpu.corecount.usage.count'=83;;;; |
| 36 |
... 6 --add-contention --add-demand --add-corecount OK: CPU average usage is 9.16 %, used frequency is 4603.44 kHz - CPU average contention is 0.55 % - CPU average demand is 8.36 %, demand frequency is 4201 kHz - CPU cores used: 83 | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 'cpu.capacity.contention.percentage'=0.55%;;;0;100 'cpu.capacity.demand.percentage'=8.3552108194113;;;; 'cpu.capacity.demand.hertz'=4201000Hz;;;;50280000 'cpu.corecount.usage.count'=83;;;; |
| 37 |
... 7 --warning-usage-percentage=5 WARNING: CPU average usage is 9.16 % | 'cpu.capacity.usage.percentage'=9.16%;0:5;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 |
| 38 |
... 8 --critical-usage-percentage=5 CRITICAL: CPU average usage is 9.16 % | 'cpu.capacity.usage.percentage'=9.16%;;0:5;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 |
| 39 |
... 9 --warning-usage-frequency=5 WARNING: used frequency is 4603.44 kHz | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;0:5;;;50280000 |
| 40 |
... 10 --critical-usage-frequency=5 CRITICAL: used frequency is 4603.44 kHz | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;0:5;;50280000 |
| 41 |
... 11 --warning-demand-percentage=5 WARNING: CPU average demand is 8.36 % | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 'cpu.capacity.demand.percentage'=8.3552108194113;0:5;;; 'cpu.capacity.demand.hertz'=4201000Hz;;;;50280000 |
| 42 |
... 12 --critical-demand-percentage=5 CRITICAL: CPU average demand is 8.36 % | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 'cpu.capacity.demand.percentage'=8.3552108194113;;0:5;; 'cpu.capacity.demand.hertz'=4201000Hz;;;;50280000 |
| 43 |
... 13 --warning-demand-frequency=5 WARNING: demand frequency is 4201 kHz | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 'cpu.capacity.demand.percentage'=8.3552108194113;;;; 'cpu.capacity.demand.hertz'=4201000Hz;0:5;;;50280000 |
| 44 |
... 14 --critical-demand-frequency=5 CRITICAL: demand frequency is 4201 kHz | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 'cpu.capacity.demand.percentage'=8.3552108194113;;;; 'cpu.capacity.demand.hertz'=4201000Hz;;0:5;;50280000 |
| 45 |
... 15 --warning-contention-percentage=5: WARNING: CPU average contention is 0.55 % | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 'cpu.capacity.contention.percentage'=0.55%;5:;;0;100 |
| 46 |
... 16 --critical-contention-percentage=5: CRITICAL: CPU average contention is 0.55 % | 'cpu.capacity.usage.percentage'=9.16%;;;0;100 'cpu.capacity.usage.hertz'=4603440Hz;;;;50280000 'cpu.capacity.contention.percentage'=0.55%;;5:;0;100 |