| 1 |
*** Settings *** |
| 2 |
Documentation Storage Synology SNMP |
| 3 |
|
| 4 |
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource |
| 5 |
|
| 6 |
Test Timeout 120s |
| 7 |
|
| 8 |
|
| 9 |
*** Variables *** |
| 10 |
${CMD} ${CENTREON_PLUGINS} --plugin=storage::synology::snmp::plugin |
| 11 |
|
| 12 |
*** Test Cases *** |
| 13 |
Components ${tc} |
| 14 |
[Tags] storage synology snmp |
| 15 |
${command} Catenate |
| 16 |
... ${CMD} |
| 17 |
... --mode=components |
| 18 |
... --hostname=${HOSTNAME} |
| 19 |
... --snmp-version=${SNMPVERSION} |
| 20 |
... --snmp-port=${SNMPPORT} |
| 21 |
... --snmp-community=${snmpcommunity} |
| 22 |
|
| 23 |
Ctn Run Command And Check Result As Strings ${command} ${expected_result} |
| 24 |
|
| 25 |
Examples: tc snmpcommunity expected_result -- |
| 26 |
... 1 storage/synology/snmp/synology-disk-ok OK: All 8 components are ok [2/2 disk, 2/2 fan, 1/1 psu, 2/2 raid, 1/1 system]. | 'Disk 1#hardware.disk.bad_sectors.count'=0;;;0; 'Disk 2#hardware.disk.bad_sectors.count'=0;;;0; 'hardware.disk.count'=2;;;; 'hardware.fan.count'=2;;;; 'hardware.psu.count'=1;;;; 'hardware.raid.count'=2;;;; 'hardware.system.count'=1;;;; |
| 27 |
... 2 storage/synology/snmp/synology-disk-warning WARNING: Disk 'Disk 2' health is warning | 'Disk 1#hardware.disk.bad_sectors.count'=0;;;0; 'Disk 2#hardware.disk.bad_sectors.count'=0;;;0; 'hardware.disk.count'=2;;;; 'hardware.fan.count'=2;;;; 'hardware.psu.count'=1;;;; 'hardware.raid.count'=2;;;; 'hardware.system.count'=1;;;; |
| 28 |
... 3 storage/synology/snmp/synology-disk-critical CRITICAL: Disk 'Disk 2' health is critical | 'Disk 1#hardware.disk.bad_sectors.count'=0;;;0; 'Disk 2#hardware.disk.bad_sectors.count'=0;;;0; 'hardware.disk.count'=2;;;; 'hardware.fan.count'=2;;;; 'hardware.psu.count'=1;;;; 'hardware.raid.count'=2;;;; 'hardware.system.count'=1;;;; |
| 29 |
... 4 storage/synology/snmp/synology-disk-failing CRITICAL: Disk 'Disk 2' health is failing | 'Disk 1#hardware.disk.bad_sectors.count'=0;;;0; 'Disk 2#hardware.disk.bad_sectors.count'=0;;;0; 'hardware.disk.count'=2;;;; 'hardware.fan.count'=2;;;; 'hardware.psu.count'=1;;;; 'hardware.raid.count'=2;;;; 'hardware.system.count'=1;;;; |