| 1 |
*** Settings *** |
| 2 |
Documentation Check Stormshield equipment |
| 3 |
|
| 4 |
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource |
| 5 |
|
| 6 |
Test Timeout 120s |
| 7 |
|
| 8 |
|
| 9 |
*** Variables *** |
| 10 |
${CMD} ${CENTREON_PLUGINS} --plugin=network::stormshield::snmp::plugin |
| 11 |
|
| 12 |
|
| 13 |
*** Test Cases *** |
| 14 |
hardware ${tc} |
| 15 |
[Tags] network Stormshield |
| 16 |
${command} Catenate |
| 17 |
... ${CMD} |
| 18 |
... --mode=hardware |
| 19 |
... --hostname=${HOSTNAME} |
| 20 |
... --snmp-version=${SNMPVERSION} |
| 21 |
... --snmp-port=${SNMPPORT} |
| 22 |
... --snmp-community=network/stormshield/snmp/stormshield-fake |
| 23 |
... --snmp-timeout=1 |
| 24 |
... ${extra_options} |
| 25 |
|
| 26 |
Ctn Run Command And Check Result As Strings ${command} ${expected_result} |
| 27 |
|
| 28 |
Examples: tc extra_options expected_result -- |
| 29 |
... 1 --critical='temperature,.*,50' CRITICAL: temperature 'cpu1' is 70 celsius | 'cpu1#hardware.temperature.celsius'=70C;;0:50;0; 'cpu2#hardware.temperature.celsius'=30C;;0:50;0; 'cpu3#hardware.temperature.celsius'=0C;;0:50;0; 'hardware.temperature.count'=3;;;; |
| 30 |
... 2 --threshold-overload='disk,WARNING,missing' OK: All 3 components are ok [3/3 temperatures]. | 'cpu1#hardware.temperature.celsius'=70C;;;0; 'cpu2#hardware.temperature.celsius'=30C;;;0; 'cpu3#hardware.temperature.celsius'=0C;;;0; 'hardware.temperature.count'=3;;;; |
| 31 |
... 3 --warning='temperature,.*,40' WARNING: temperature 'cpu1' is 70 celsius | 'cpu1#hardware.temperature.celsius'=70C;0:40;;0; 'cpu2#hardware.temperature.celsius'=30C;0:40;;0; 'cpu3#hardware.temperature.celsius'=0C;0:40;;0; 'hardware.temperature.count'=3;;;; |
| 32 |
... 4 --warning='temperature,cpu1,60' WARNING: temperature 'cpu1' is 70 celsius | 'cpu1#hardware.temperature.celsius'=70C;0:60;;0; 'cpu2#hardware.temperature.celsius'=30C;;;0; 'cpu3#hardware.temperature.celsius'=0C;;;0; 'hardware.temperature.count'=3;;;; |
| 33 |
... 5 --critical='temperature,cpu1,75' OK: All 3 components are ok [3/3 temperatures]. | 'cpu1#hardware.temperature.celsius'=70C;;0:75;0; 'cpu2#hardware.temperature.celsius'=30C;;;0; 'cpu3#hardware.temperature.celsius'=0C;;;0; 'hardware.temperature.count'=3;;;; |
| 34 |
... 6 --warning='temperature,cpu1,300' --critical='temperature,cpu1,17' CRITICAL: temperature 'cpu1' is 70 celsius | 'cpu1#hardware.temperature.celsius'=70C;0:300;0:17;0; 'cpu2#hardware.temperature.celsius'=30C;;;0; 'cpu3#hardware.temperature.celsius'=0C;;;0; 'hardware.temperature.count'=3;;;; |