Debian Codegraph @

tests/os/windows/snmp/cpu.robot

raw
1 *** Settings ***
2 Documentation Check Windows operating systems in SNMP.
3
4 Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
5
6 Suite Setup Ctn Generic Suite Setup
7 Test Timeout 120s
8
9
10 *** Variables ***
11 ${CMD} ${CENTREON_PLUGINS}
12
13 *** Test Cases ***
14 cpu ${tc}
15 [Tags] os Windows
16 ${command} Catenate
17 ... ${CMD}
18 ... --plugin=os::windows::snmp::plugin
19 ... --mode=cpu
20 ... --hostname=${HOSTNAME}
21 ... --snmp-version=${SNMPVERSION}
22 ... --snmp-port=${SNMPPORT}
23 ... --snmp-community=os/windows/snmp/windows_anon
24 ... --snmp-timeout=1
25 ... --critical-average=${critical-average}
26 ... --warning-average=${warning-average}
27 ... --warning-core=${warning-core}
28 ... --critical-core=${critical-core}
29
30 Ctn Run Command And Check Result As Strings ${command} ${expected_result}
31
32 Examples: tc critical-average warning-average warning-core critical-core expected_result --
33 ... 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
34 ... 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
35 ... 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
36 ... 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