-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0818cc0
commit 876399f
Showing
22 changed files
with
11,831 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
*** Settings *** | ||
Documentation Check Windows operating systems in SNMP. | ||
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource | ||
|
||
Test Timeout 120s | ||
|
||
|
||
*** Variables *** | ||
${CMD} ${CENTREON_PLUGINS} | ||
|
||
*** Test Cases *** | ||
cpu ${tc} | ||
[Tags] os Windows | ||
${command} Catenate | ||
... ${CMD} | ||
... --plugin=os::windows::snmp::plugin | ||
... --mode=cpu | ||
... --hostname=${HOSTNAME} | ||
... --snmp-version=${SNMPVERSION} | ||
... --snmp-port=${SNMPPORT} | ||
... --snmp-community=os/windows/snmp/windows_anon | ||
... --snmp-timeout=1 | ||
... --critical-average=${critical-average} | ||
... --warning-average=${warning-average} | ||
... --warning-core=${warning-core} | ||
... --critical-core=${critical-core} | ||
|
||
Ctn Run Command And Check Result As Strings ${command} ${expected_result} | ||
|
||
Examples: tc critical-average warning-average warning-core critical-core expected_result -- | ||
... 2 '90' '80' ${EMPTY} ${EMPTY} OK: 2 CPU(s) average usage is 0.50 % | 'total_cpu_avg'=0.50%;0:80;0:90;0;100 'cpu_0'=1.00%;;;0;100 'cpu_1'=0.00%;;;0;100 | ||
... 3 '1180' '0' ${EMPTY} ${EMPTY} WARNING: 2 CPU(s) average usage is 0.50 % | 'total_cpu_avg'=0.50%;0:0;0:1180;0;100 'cpu_0'=1.00%;;;0;100 'cpu_1'=0.00%;;;0;100 | ||
... 4 ${EMPTY} ${EMPTY} '0' '0' CRITICAL: CPU '0' usage : 1.00 % | 'total_cpu_avg'=0.50%;;;0;100 'cpu_0'=1.00%;0:0;0:0;0;100 'cpu_1'=0.00%;0:0;0:0;0;100 | ||
... 5 '0' '0' ${EMPTY} ${EMPTY} CRITICAL: 2 CPU(s) average usage is 0.50 % | 'total_cpu_avg'=0.50%;0:0;0:0;0;100 'cpu_0'=1.00%;;;0;100 'cpu_1'=0.00%;;;0;100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
*** Settings *** | ||
Documentation Check Windows operating systems in SNMP. | ||
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource | ||
|
||
Test Timeout 120s | ||
|
||
|
||
*** Variables *** | ||
${CMD} ${CENTREON_PLUGINS} | ||
|
||
*** Test Cases *** | ||
interfaces ${tc} | ||
[Tags] os Windows | ||
${command} Catenate | ||
... ${CMD} | ||
... --plugin=os::windows::snmp::plugin | ||
... --mode=interfaces | ||
... --hostname=${HOSTNAME} | ||
... --snmp-version=${SNMPVERSION} | ||
... --snmp-port=${SNMPPORT} | ||
... --snmp-community=os/windows/snmp/interfaces | ||
... --snmp-timeout=1 | ||
... ${extra_options} | ||
|
||
Ctn Run Command And Check Result As Strings ${command} ${expected_result} | ||
|
||
Examples: tc extra_options expected_result -- | ||
... 1 --verbose CRITICAL: Interface 'Anonymized 232' Status : down (admin: up) - Interface 'Anonymized 184' Status : down (admin: up) - Interface 'Anonymized 101' Status : down (admin: up) - Interface 'Anonymized 012' Status : down (admin: up) - Interface 'Anonymized 232' Status : down (admin: up) - Interface 'Anonymized 072' Status : down (admin: up)${SPACE}Interface 'Anonymized 250' Status : up (admin: up)${SPACE}Interface 'Anonymized 012' Status : notPresent (admin: down)${SPACE}Interface 'Anonymized 118' Status : notPresent (admin: down)${SPACE}Interface 'Anonymized 073' Status : up (admin: up)${SPACE}Interface 'Anonymized 071' Status : up (admin: up)${SPACE}Interface 'Anonymized 073' Status : up (admin: up)${SPACE}Interface 'Anonymized 232' Status : down (admin: up)${SPACE}Interface 'Anonymized 191' Status : up (admin: up)${SPACE}Interface 'Anonymized 242' Status : up (admin: up)${SPACE}Interface 'Anonymized 175' Status : up (admin: up)${SPACE}Interface 'Anonymized 128' Status : up (admin: up)${SPACE}Interface 'Anonymized 037' Status : notPresent (admin: down)${SPACE}Interface 'Anonymized 080' Status : up (admin: up)${SPACE}Interface 'Anonymized 229' Status : up (admin: up)${SPACE}Interface 'Anonymized 248' Status : up (admin: up)${SPACE}Interface 'Anonymized 092' Status : up (admin: up)${SPACE}Interface 'Anonymized 187' Status : up (admin: up)${SPACE}Interface 'Anonymized 184' Status : down (admin: up)${SPACE}Interface 'Anonymized 101' Status : down (admin: up)${SPACE}Interface 'Anonymized 252' Status : notPresent (admin: down)${SPACE}Interface 'Anonymized 012' Status : down (admin: up)${SPACE}Interface 'Anonymized 232' Status : down (admin: up)${SPACE}Interface 'Anonymized 072' Status : down (admin: up)${SPACE}Interface 'Anonymized 037' Status : up (admin: up) | ||
... 2 --display-transform-src='eth' --display-transform-dst='ens' CRITICAL: Interface 'Anonymized 232' Status : down (admin: up) - Interface 'Anonymized 184' Status : down (admin: up) - Interface 'Anonymized 101' Status : down (admin: up) - Interface 'Anonymized 012' Status : down (admin: up) - Interface 'Anonymized 232' Status : down (admin: up) - Interface 'Anonymized 072' Status : down (admin: up) | ||
... 3 --oid-display='ifName' CRITICAL: Interface 'Anonymized 232' Status : down (admin: up) - Interface 'Anonymized 184' Status : down (admin: up) - Interface 'Anonymized 101' Status : down (admin: up) - Interface 'Anonymized 012' Status : down (admin: up) - Interface 'Anonymized 232' Status : down (admin: up) - Interface 'Anonymized 072' Status : down (admin: up) | ||
... 4 --oid-extra-display='ifDesc' CRITICAL: Interface 'Anonymized 232' [ WAN Miniport (L2TP) ] Status : down (admin: up) - Interface 'Anonymized 184' [ WAN Miniport (IKEv2) ] Status : down (admin: up) - Interface 'Anonymized 101' [ WAN Miniport (SSTP) ] Status : down (admin: up) - Interface 'Anonymized 012' [ WAN Miniport (GRE) ] Status : down (admin: up) - Interface 'Anonymized 232' [ WAN Miniport (PPPOE) ] Status : down (admin: up) - Interface 'Anonymized 072' [ WAN Miniport (PPTP) ] Status : down (admin: up) |
Oops, something went wrong.