This commit is contained in:
sfarouq-ext 2024-08-27 11:17:49 +02:00
parent fe90a52295
commit ee1ebc93cd
21 changed files with 15015 additions and 0 deletions

View File

@ -0,0 +1,37 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
arp ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=arp
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/network-interfaces
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --filter-macaddr OK: total entries 3 - duplicate mac address 0 - duplicate ip address 0 | 'arp.total.entries.count'=3;;;0; 'arp.duplicate.macaddr.count'=0;;;0; 'arp.duplicate.ipaddr.count'=0;;;0;
... 2 --filter-ipaddr OK: total entries 3 - duplicate mac address 0 - duplicate ip address 0 | 'arp.total.entries.count'=3;;;0; 'arp.duplicate.macaddr.count'=0;;;0; 'arp.duplicate.ipaddr.count'=0;;;0;
... 3 --warning-total-entries OK: total entries 3 - duplicate mac address 0 - duplicate ip address 0 | 'arp.total.entries.count'=3;;;0; 'arp.duplicate.macaddr.count'=0;;;0; 'arp.duplicate.ipaddr.count'=0;;;0;
... 4 --critical-total-entries OK: total entries 3 - duplicate mac address 0 - duplicate ip address 0 | 'arp.total.entries.count'=3;;;0; 'arp.duplicate.macaddr.count'=0;;;0; 'arp.duplicate.ipaddr.count'=0;;;0;
... 5 --critical-duplicate-ipaddr OK: total entries 3 - duplicate mac address 0 - duplicate ip address 0 | 'arp.total.entries.count'=3;;;0; 'arp.duplicate.macaddr.count'=0;;;0; 'arp.duplicate.ipaddr.count'=0;;;0;
... 6 --critical-duplicate-macaddr OK: total entries 3 - duplicate mac address 0 - duplicate ip address 0 | 'arp.total.entries.count'=3;;;0; 'arp.duplicate.macaddr.count'=0;;;0; 'arp.duplicate.ipaddr.count'=0;;;0;
... 7 --warning-duplicate-ipaddr OK: total entries 3 - duplicate mac address 0 - duplicate ip address 0 | 'arp.total.entries.count'=3;;;0; 'arp.duplicate.macaddr.count'=0;;;0; 'arp.duplicate.ipaddr.count'=0;;;0;
... 8 --warning-duplicate-macaddr OK: total entries 3 - duplicate mac address 0 - duplicate ip address 0 | 'arp.total.entries.count'=3;;;0; 'arp.duplicate.macaddr.count'=0;;;0; 'arp.duplicate.ipaddr.count'=0;;;0;
... 9 ${EMPTY} OK: total entries 3 - duplicate mac address 0 - duplicate ip address 0 | 'arp.total.entries.count'=3;;;0; 'arp.duplicate.macaddr.count'=0;;;0; 'arp.duplicate.ipaddr.count'=0;;;0;

View File

@ -0,0 +1,39 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
cpu-detailed ${tc}
[Tags] os linux cpu
${command} Catenate
... ${CMD}
... --mode=cpu-detailed
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --warning-user OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved
... 2 --warning-nice OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved
... 3 --warning-system OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved
... 4 --warning-idle OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved
... 5 --warning-wait OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved
... 6 --warning-kernel OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved
... 7 --warning-interrupt OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved
... 8 --warning-softirq OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved
... 9 --warning-steal OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved
... 10 --warning-guest OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved
... 11 --warning-guestnice OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved

View File

@ -0,0 +1,38 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
cpu ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=cpu
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/network-interfaces
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --use-ucd='0' OK: 1 CPU(s) average usage is 2.00 % - CPU '0' usage : 2.00 % | 'total_cpu_avg'=2.00%;;;0;100 'cpu'=2.00%;;;0;100
... 2 --warning-average OK: 1 CPU(s) average usage is 2.00 % - CPU '0' usage : 2.00 % | 'total_cpu_avg'=2.00%;;;0;100 'cpu'=2.00%;;;0;100
... 3 --critical-average OK: 1 CPU(s) average usage is 2.00 % - CPU '0' usage : 2.00 % | 'total_cpu_avg'=2.00%;;;0;100 'cpu'=2.00%;;;0;100
... 4 --warning-core OK: 1 CPU(s) average usage is 2.00 % - CPU '0' usage : 2.00 % | 'total_cpu_avg'=2.00%;;;0;100 'cpu'=2.00%;;;0;100
... 5 --critical-core OK: 1 CPU(s) average usage is 2.00 % - CPU '0' usage : 2.00 % | 'total_cpu_avg'=2.00%;;;0;100 'cpu'=2.00%;;;0;100
... 6 --verbose OK: 1 CPU(s) average usage is 2.00 % - CPU '0' usage : 2.00 % | 'total_cpu_avg'=2.00%;;;0;100 'cpu'=2.00%;;;0;100 CPU '0' usage : 2.00 %
... 7 --warning-average='0' WARNING: 1 CPU(s) average usage is 2.00 % | 'total_cpu_avg'=2.00%;0:0;;0;100 'cpu'=2.00%;;;0;100
... 8 --critical-average='0' CRITICAL: 1 CPU(s) average usage is 2.00 % | 'total_cpu_avg'=2.00%;;0:0;0;100 'cpu'=2.00%;;;0;100
... 9 --warning-core='0' WARNING: CPU '0' usage : 2.00 % | 'total_cpu_avg'=2.00%;;;0;100 'cpu'=2.00%;0:0;;0;100
... 10 --critical-core='0' CRITICAL: CPU '0' usage : 2.00 % | 'total_cpu_avg'=2.00%;;;0;100 'cpu'=2.00%;;0:0;0;100

View File

@ -0,0 +1,54 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
disk-usage ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=disk-usage
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --filter-counters OK: All partitions are ok | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 2 --disk-index='25' OK: Partition '/run/user/0' usage total: 196.70 MB used: 0.00 B (0.00%) free: 196.70 MB (100.00%), Inodes used: 0 % | 'count'=1;;;0; 'used'=0B;;;0;206258176 'free'=206258176B;;;0;206258176 'used_prct'=0.00%;;;0;100 'inodes'=0%;;;0;100
... 3 --filter-disk-path OK: All partitions are ok | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 4 --filter-disk-device OK: All partitions are ok | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 5 --reload-cache-time='180' OK: All partitions are ok | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 6 --display-transform-src='dev' OK: All partitions are ok | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_//shm'=0B;;;0;1031299072 'free_//shm'=1031299072B;;;0;1031299072 'used_prct_//shm'=0.00%;;;0;100 'inodes_//shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 7 --display-transform-dst OK: All partitions are ok | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 8 --disk-index='2' UNKNOWN: No disk path found. Can be: filters, cache file.
... 9 --space-reservation='0' OK: All partitions are ok | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 10 --force-use-mib-percent OK: All partitions are ok | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.00%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.00%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 11 --force-counters32='1111' OK: All partitions are ok | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 12 --warning-usage='1' WARNING: Partition '/' usage total: 97.87 GB used: 6.89 GB (7.04%) free: 90.98 GB (92.96%) - Partition '/run' usage total: 196.71 MB used: 520.00 KB (0.26%) free: 196.20 MB (99.74%) | 'count'=5;;;0; 'used_/'=7394013184B;0:1;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;0:1;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;0:1;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;0:1;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;0:1;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 13 --critical-usage='1' CRITICAL: Partition '/' usage total: 97.87 GB used: 6.89 GB (7.04%) free: 90.98 GB (92.96%) - Partition '/run' usage total: 196.71 MB used: 520.00 KB (0.26%) free: 196.20 MB (99.74%) | 'count'=5;;;0; 'used_/'=7394013184B;;0:1;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;0:1;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;0:1;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;0:1;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;0:1;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 14 --warning-usage-free='1' WARNING: Partition '/' usage total: 97.87 GB used: 6.89 GB (7.04%) free: 90.98 GB (92.96%) - Partition '/dev/shm' usage total: 983.52 MB used: 0.00 B (0.00%) free: 983.52 MB (100.00%) - Partition '/run' usage total: 196.71 MB used: 520.00 KB (0.26%) free: 196.20 MB (99.74%) - Partition '/run/lock' usage total: 5.00 MB used: 0.00 B (0.00%) free: 5.00 MB (100.00%) - Partition '/run/user/0' usage total: 196.70 MB used: 0.00 B (0.00%) free: 196.70 MB (100.00%) | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;0:1;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;0:1;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;0:1;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;0:1;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;0:1;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 15 --critical-usage-free='1' CRITICAL: Partition '/' usage total: 97.87 GB used: 6.89 GB (7.04%) free: 90.98 GB (92.96%) - Partition '/dev/shm' usage total: 983.52 MB used: 0.00 B (0.00%) free: 983.52 MB (100.00%) - Partition '/run' usage total: 196.71 MB used: 520.00 KB (0.26%) free: 196.20 MB (99.74%) - Partition '/run/lock' usage total: 5.00 MB used: 0.00 B (0.00%) free: 5.00 MB (100.00%) - Partition '/run/user/0' usage total: 196.70 MB used: 0.00 B (0.00%) free: 196.70 MB (100.00%) | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;0:1;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;0:1;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;0:1;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;0:1;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;0:1;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 16 --warning-usage-prct='1' WARNING: Partition '/' used: 7.04 % | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;0:1;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;0:1;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;0:1;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;0:1;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;0:1;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 17 --critical-usage-prct='1' CRITICAL: Partition '/' used: 7.04 % | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;0:1;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;0:1;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;0:1;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;0:1;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;0:1;0;100 'inodes_/run/user/0'=0%;;;0;100
... 18 --warning-inodes='1' WARNING: Partition '/' Inodes used: 6 % | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;0:1;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;0:1;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;0:1;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;0:1;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;0:1;;0;100
... 19 --critical-inodes='1' CRITICAL: Partition '/' Inodes used: 6 % | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;0:1;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;0:1;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;0:1;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;0:1;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;0:1;0;100
... 20 --warning-count='1' WARNING: Partitions count : 5 | 'count'=5;0:1;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 21 --critical-count='1' CRITICAL: Partitions count : 5 | 'count'=5;;0:1;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 22 --filter-disk-path='/dev/shm' OK: Partition '/dev/shm' usage total: 983.52 MB used: 0.00 B (0.00%) free: 983.52 MB (100.00%), Inodes used: 0 % | 'count'=1;;;0; 'used'=0B;;;0;1031299072 'free'=1031299072B;;;0;1031299072 'used_prct'=0.00%;;;0;100 'inodes'=0%;;;0;100
... 23 --filter-disk-path='/run' OK: All partitions are ok | 'count'=3;;;0; 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 24 --filter-disk-path='/run/lock' OK: Partition '/run/lock' usage total: 5.00 MB used: 0.00 B (0.00%) free: 5.00 MB (100.00%), Inodes used: 0 % | 'count'=1;;;0; 'used'=0B;;;0;5242880 'free'=5242880B;;;0;5242880 'used_prct'=0.00%;;;0;100 'inodes'=0%;;;0;100
... 25 --filter-disk-path='/' OK: All partitions are ok | 'count'=5;;;0; 'used_/'=7394013184B;;;0;105088212992 'free_/'=97694199808B;;;0;105088212992 'used_prct_/'=7.04%;;;0;100 'inodes_/'=6%;;;0;100 'used_/dev/shm'=0B;;;0;1031299072 'free_/dev/shm'=1031299072B;;;0;1031299072 'used_prct_/dev/shm'=0.00%;;;0;100 'inodes_/dev/shm'=0%;;;0;100 'used_/run'=532480B;;;0;206262272 'free_/run'=205729792B;;;0;206262272 'used_prct_/run'=0.26%;;;0;100 'inodes_/run'=0%;;;0;100 'used_/run/lock'=0B;;;0;5242880 'free_/run/lock'=5242880B;;;0;5242880 'used_prct_/run/lock'=0.00%;;;0;100 'inodes_/run/lock'=0%;;;0;100 'used_/run/user/0'=0B;;;0;206258176 'free_/run/user/0'=206258176B;;;0;206258176 'used_prct_/run/user/0'=0.00%;;;0;100 'inodes_/run/user/0'=0%;;;0;100
... 26 --filter-disk-path='/run/user/0' OK: Partition '/run/user/0' usage total: 196.70 MB used: 0.00 B (0.00%) free: 196.70 MB (100.00%), Inodes used: 0 % | 'count'=1;;;0; 'used'=0B;;;0;206258176 'free'=206258176B;;;0;206258176 'used_prct'=0.00%;;;0;100 'inodes'=0%;;;0;100

View File

@ -0,0 +1,43 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
diskio ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=diskio
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --device='1' OK: Device 'sda' Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00 | 'read'=0B/s;;;0; 'write'=0B/s;;;0; 'read_iops'=0.00iops;;;0; 'write_iops'=0.00iops;;;0;
... 2 --critical-read OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;
... 3 --critical-write OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;
... 4 --critical-read-iops OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;
... 5 --critical-write-iops OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;
... 6 --critical-total-read OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;
... 7 --critical-total-write OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;
... 8 --critical-total-read-iops OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;
... 9 --critical-total-write-iops OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;
... 10 --critical-sum-read-write OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;
... 11 --critical-sum-read-write-iops OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;
... 12 --device='222' UNKNOWN: No device found for id '222'.
... 13 --name OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;
... 14 --regexp OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;
... 15 --regexp-insensitive OK: All devices [Read I/O : 0.00 B/s, Write I/O : 0.00 B/s, Read IOPs : 0.00, Write IOPs : 0.00] - Server overall [R+W I/O : 0.00 B/s, R+W IOPs : 0.00] - All devices are ok | 'total_read'=0B/s;;;0; 'total_write'=0B/s;;;0; 'total_read_iops'=0.00iops;;;0; 'total_write_iops'=0.00iops;;;0; 'sum_read_write'=0B/s;;;0; 'sum_read_write_iops'=0.00iops;;;0; 'read_sda'=0B/s;;;0; 'write_sda'=0B/s;;;0; 'read_iops_sda'=0.00iops;;;0; 'write_iops_sda'=0.00iops;;;0; 'read_sda1'=0B/s;;;0; 'write_sda1'=0B/s;;;0; 'read_iops_sda1'=0.00iops;;;0; 'write_iops_sda1'=0.00iops;;;0;

View File

@ -0,0 +1,33 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
inodes ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=inodes
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --filter-path='' OK: All inode partitions are ok | 'used_/'=6%;;;0;100 'used_/dev/shm'=0%;;;0;100 'used_/run'=0%;;;0;100 'used_/run/lock'=0%;;;0;100 'used_/run/user/0'=0%;;;0;100
... 2 --display-transform-src='dev' OK: All inode partitions are ok | 'used_/'=6%;;;0;100 'used_//shm'=0%;;;0;100 'used_/run'=0%;;;0;100 'used_/run/lock'=0%;;;0;100 'used_/run/user/0'=0%;;;0;100
... 3 --display-transform-dst='run' OK: All inode partitions are ok | 'used_/'=6%;;;0;100 'used_/dev/shm'=0%;;;0;100 'used_/run'=0%;;;0;100 'used_/run/lock'=0%;;;0;100 'used_/run/user/0'=0%;;;0;100
... 4 --filter-device OK: All inode partitions are ok | 'used_/'=6%;;;0;100 'used_/dev/shm'=0%;;;0;100 'used_/run'=0%;;;0;100 'used_/run/lock'=0%;;;0;100 'used_/run/user/0'=0%;;;0;100
... 5 --filter-path OK: All inode partitions are ok | 'used_/'=6%;;;0;100 'used_/dev/shm'=0%;;;0;100 'used_/run'=0%;;;0;100 'used_/run/lock'=0%;;;0;100 'used_/run/user/0'=0%;;;0;100

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
list-diskspath ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=list-diskspath
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --skip-total-size-zero='' List disk path: ${SPACE}'/run/user/0' [id = 25] ${SPACE} '/run' [id = 5] ${SPACE} '/' [id = 6] ${SPACE} '/dev/shm' [id = 8] ${SPACE} '/run/lock' [id = 9]
... 2 --regexp-insensitive='/run/user/0' List disk path: ${SPACE}'/run/user/0' [id = 25] ${SPACE} '/run' [id = 5] ${SPACE} '/' [id = 6] ${SPACE} '/dev/shm' [id = 8] ${SPACE} '/run/lock' [id = 9]
... 3 --display-transform-src='dev' List disk path: ${SPACE}'/run/user/0' [id = 25] ${SPACE}'/run' [id = 5] ${SPACE} '/' [id = 6] ${SPACE} '//shm' [id = 8] ${SPACE} '/run/lock' [id = 9]
... 4 --display-transform-dst='run' List disk path: ${SPACE}'/run/user/0' [id = 25] ${SPACE} '/run' [id = 5] ${SPACE} '/' [id = 6] ${SPACE} '/dev/shm' [id = 8] ${SPACE} '/run/lock' [id = 9]
... 5 --skip-total-size-zero List disk path: ${SPACE}'/run/user/0' [id = 25] ${SPACE} '/run' [id = 5] ${SPACE} '/' [id = 6] ${SPACE} '/dev/shm' [id = 8] ${SPACE} '/run/lock' [id = 9]
... 6 --regexp-insensitive List disk path: ${SPACE}'/run/user/0' [id = 25] ${SPACE} '/run' [id = 5] ${SPACE} '/' [id = 6] ${SPACE} '/dev/shm' [id = 8] ${SPACE} '/run/lock' [id = 9]
... 7 --regexp List disk path: ${SPACE}'/run/user/0' [id = 25] ${SPACE} '/run' [id = 5] ${SPACE} '/' [id = 6] ${SPACE} '/dev/shm' [id = 8] ${SPACE} '/run/lock' [id = 9]

View File

@ -0,0 +1,33 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
list-interfaces ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=list-interfaces
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --add-extra-oid='alias,.1.3.6.1.2.1.31.1.1.1.18' List interfaces: ${SPACE}'lo' [speed = 10][status = up][id = 1][alias = ][type = softwareLoopback] 'eth0' [speed = 1000][status = up][id = 2][alias = ][type = ethernetCsmacd] ${SPACE} 'eth1' [speed = 1000][status = up][id = 3][alias = ][type = ethernetCsmacd]
... 2 --add-extra-oid='' List interfaces: ${SPACE}'lo' [speed = 10][status = up][id = 1][type = softwareLoopback] ${SPACE} 'eth0' [speed = 1000][status = up][id = 2][type = ethernetCsmacd] ${SPACE}'eth1' [speed = 1000][status = up][id = 3][type = ethernetCsmacd]
... 3 --add-mac-address='' List interfaces: ${SPACE}'lo' [speed = 10][status = up][id = 1][macaddress = ][type = softwareLoopback] ${SPACE} 'eth0' [speed = 1000][status = up][id = 2][macaddress = 08:00:27:8d:c0:4d][type = ethernetCsmacd] ${SPACE} 'eth1' [speed = 1000][status = up][id = 3][macaddress = 08:00:27:af:8a:b1][type = ethernetCsmacd]
... 4 --display-transform-src='eth' List interfaces:${SPACE} 'lo' [speed = 10][status = up][id = 1][type = softwareLoopback] ${SPACE} '0' [speed = 1000][status = up][id = 2][type = ethernetCsmacd] ${SPACE} '1' [speed = 1000][status = up][id = 3][type = ethernetCsmacd]
... 5 --display-transform-dst='ens' List interfaces:${SPACE} 'lo' [speed = 10][status = up][id = 1][type = softwareLoopback]${SPACE} 'eth0' [speed = 1000][status = up][id = 2][type = ethernetCsmacd] ${SPACE} 'eth1' [speed = 1000][status = up][id = 3][type = ethernetCsmacd]

View File

@ -0,0 +1,31 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
list-processes ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=list-processes
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --verbose OK:
... 2 --filter-name='cbd' List processes: [name = cbd] [path = /usr/sbin/cbd] [parameters = /etc/centreon-broker/central-broker.json] [type = application] [pid = 658] [status = runnable] [name = cbd] [path = /usr/sbin/cbd] [parameters = /etc/centreon-broker/central-rrd.json] [type = application] [pid = 659] [status = runnable]
... 3 --add-stats --help List processes: [name = rcu_preempt] [path = ] [parameters = ] [type = operatingSystem] [pid = 15] [status = invalid] [name = gorgone-audit] [path = gorgone-audit] [parameters = ] [type = application] [pid = 756] [status = runnable] [name = apache2] [path = /usr/sbin/apache2] [parameters = -k start] [type = application] [pid = 2544] [status = runnable] [name = php-fpm8.1] [path = php-fpm: pool www] [parameters = ] [type = application] [pid = 577] [status = runnable] [name = php-fpm8.1] [path = php-fpm: pool www] [parameters = ] [type = application] [pid = 580] [status = runnable] [name = agetty] [path = /sbin/agetty] [parameters = -o -p -- \\u --noclear - linux] [type = application] [pid = 465] [status = runnable] [ Message content over the limit has been removed. ] ...ash] [parameters = ] [type = application] [pid = 1594] [status = runnable] [name = kworker/0:1-mm_percpu_wq] [path = ] [parameters = ] [type = operatingSystem] [pid = 1759] [status = invalid] [name = snmpd] [path = /usr/sbin/snmpd] [parameters = -LOw -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf -f] [type = application] [pid = 449] [status = running] [name = dhclient] [path = dhclient] [parameters = -4 -v -i -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0] [type = application] [pid = 341] [status = runnable] [name = cbd] [path = /usr/sbin/cbd] [parameters = /etc/centreon-broker/central-broker.json] [type = application] [pid = 658] [status = runnable] [name = bash] [path = -bash] [parameters = ] [type = application] [pid = 3369] [status = runnable] [name = mm_percpu_wq] [path = ] [parameters = ] [type = operatingSystem] [pid = 10] [status = invalid] [name = gorgone-proxy] [path = gorgone-proxy] [parameters = ] [type = application] [pid = 777] [status = runnable]

View File

@ -0,0 +1,32 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
list-storages ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=list-storages
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --display-transform-src='dev' List storage: ${SPACE}Skipping storage 'Physical memory': no type or no matching filter type ${SPACE}Skipping storage 'Swap space': no type or no matching filter type ${SPACE}Skipping storage 'Available memory': no type or no matching filter type ${SPACE}Skipping storage 'Virtual memory': no type or no matching filter type ${SPACE}'/run' [size = 206262272B] [id = 35] ${SPACE} '/' [size = 105088212992B] [id = 36] ${SPACE} '//shm' [size = 1031299072B] [id = 38] ${SPACE} '/run/lock' [size = 5242880B] [id = 39] ${SPACE}'/run/user/0' [size = 206258176B] [id = 55] ${SPACE} Skipping storage 'Memory buffers': no type or no matching filter type ${SPACE} Skipping storage 'Cached memory': no type or no matching filter type ${SPACE} Skipping storage 'Shared memory': no type or no matching filter type
... 2 --display-transform-dst='run' List storage: ${SPACE}Skipping storage 'Physical memory': no type or no matching filter type ${SPACE}Skipping storage 'Swap space': no type or no matching filter type ${SPACE}Skipping storage 'Available memory': no type or no matching filter type ${SPACE}Skipping storage 'Virtual memory': no type or no matching filter type ${SPACE}'/run' [size = 206262272B] [id = 35] ${SPACE}'/' [size = 105088212992B] [id = 36] ${SPACE}'/dev/shm' [size = 1031299072B] [id = 38] ${SPACE}'/run/lock' [size = 5242880B] [id = 39] ${SPACE}'/run/user/0' [size = 206258176B] [id = 55] ${SPACE}Skipping storage 'Memory buffers': no type or no matching filter type Skipping storage 'Cached memory': no type or no matching filter type ${SPACE}Skipping storage 'Shared memory': no type or no matching filter type
... 3 --filter-storage-type='' List storage: ${SPACE}'Physical memory' [size = 2062598144B] [id = 1] ${SPACE}'Swap space' [size = 0B] [id = 10] ${SPACE}'Available memory' [size = 1143980032B] [id = 11]${SPACE} 'Virtual memory' [size = 2062598144B] [id = 3] ${SPACE}'/run' [size = 206262272B] [id = 35] '/' [size = 105088212992B] [id = 36] ${SPACE}'/dev/shm' [size = 1031299072B] [id = 38] ${SPACE}'/run/lock' [size = 5242880B] [id = 39] ${SPACE}'/run/user/0' [size = 206258176B] [id = 55] ${SPACE}'Memory buffers' [size = 2062598144B] [id = 6] ${SPACE}'Cached memory' [size = 523030528B] [id = 7] ${SPACE}'Shared memory' [size = 30310400B] [id = 8]
... 4 --filter-storage-type='^(hrStorageFixedDisk|hrStorageNetworkDisk|hrFSBerkeleyFFS)$' List storage: ${SPACE}Skipping storage 'Physical memory': no type or no matching filter type ${SPACE}Skipping storage 'Swap space': no type or no matching filter type ${SPACE}Skipping storage 'Available memory': no type or no matching filter type ${SPACE}Skipping storage 'Virtual memory': no type or no matching filter type ${SPACE}'/run' [size = 206262272B] [id = 35]${SPACE} '/' [size = 105088212992B] [id = 36] ${SPACE}'/dev/shm' [size = 1031299072B] [id = 38] ${SPACE}'/run/lock' [size = 5242880B] [id = 39] ${SPACE}'/run/user/0' [size = 206258176B] [id = 55] ${SPACE}Skipping storage 'Memory buffers': no type or no matching filter type ${SPACE}Skipping storage 'Cached memory': no type or no matching filter type ${SPACE}Skipping storage 'Shared memory': no type or no matching filter type

View File

@ -0,0 +1,34 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
load ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=load
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --critical=15 OK: Load average: 0.87, 0.63, 0.47 | 'load1'=0.87;;0:15;0; 'load5'=0.63;;;0; 'load15'=0.47;;;0;
... 2 --critical='2' OK: Load average: 0.87, 0.63, 0.47 | 'load1'=0.87;;0:2;0; 'load5'=0.63;;;0; 'load15'=0.47;;;0;
... 3 --warning='1' OK: Load average: 0.87, 0.63, 0.47 | 'load1'=0.87;0:1;;0; 'load5'=0.63;;;0; 'load15'=0.47;;;0;
... 4 --critical='0' CRITICAL: Load average: 0.87, 0.63, 0.47 | 'load1'=0.87;;0:0;0; 'load5'=0.63;;;0; 'load15'=0.47;;;0;
... 5 --warning='3' OK: Load average: 0.87, 0.63, 0.47 | 'load1'=0.87;0:3;;0; 'load5'=0.63;;;0; 'load15'=0.47;;;0;
... 6 --average='0.87' OK: Load average: 0.43 [0.87/2 CPUs], 0.32 [0.63/2 CPUs], 0.23 [0.47/2 CPUs] | 'avg_load1'=0.43;;;0; 'avg_load5'=0.32;;;0; 'avg_load15'=0.23;;;0; 'load1'=0.87;;;0; 'load5'=0.63;;;0; 'load15'=0.47;;;0;

View File

@ -0,0 +1,49 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
memory ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=memory
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --verbose OK: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%), Buffer: 35.86 MB, Cached: 498.80 MB, Shared: 28.91 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 2 --warning-usage='1' WARNING: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%) | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;0:1;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 3 --warning-usage-free='1' WARNING: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%) | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;0:1;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 4 --warning-usage-prct='1' WARNING: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%) | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;0:1;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 5 --warning-swap='1' OK: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%), Buffer: 35.86 MB, Cached: 498.80 MB, Shared: 28.91 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 6 --warning-swap-free='1' OK: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%), Buffer: 35.86 MB, Cached: 498.80 MB, Shared: 28.91 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 7 --warning-swap-prct='0' OK: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%), Buffer: 35.86 MB, Cached: 498.80 MB, Shared: 28.91 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 8 --warning-buffer='40' WARNING: Buffer: 35.86 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;0:40;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 9 --warning-cached='1' WARNING: Cached: 498.80 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;0:1;;0; 'shared'=30310400B;;;0;
... 10 --warning-shared='1' WARNING: Shared: 28.91 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;0:1;;0;
... 11 --patch-redhat='1' OK: Ram Total: 1.92 GB Used (-buffers/cache): 1.21 GB (62.88%) Free: 730.19 MB (37.12%), Buffer: 35.86 MB, Cached: 498.80 MB, Shared: 28.91 MB | 'used'=1296941056B;;;0;2062598144 'free'=765657088B;;;0;2062598144 'used_prct'=62.88%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 12 --critical-usage='1' CRITICAL: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%) | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;0:1;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 13 --critical-usage-free='1' CRITICAL: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%) | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;0:1;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 14 --critical-usage-prct='1' CRITICAL: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%) | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;0:1;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 15 --critical-swap='1' OK: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%), Buffer: 35.86 MB, Cached: 498.80 MB, Shared: 28.91 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 16 --critical-swap-free='1' OK: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%), Buffer: 35.86 MB, Cached: 498.80 MB, Shared: 28.91 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 17 --critical-swap-prct='1' OK: Ram Total: 1.92 GB Used (-buffers/cache): 702.20 MB (35.70%) Free: 1.24 GB (64.30%), Buffer: 35.86 MB, Cached: 498.80 MB, Shared: 28.91 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 18 --critical-buffer='1' CRITICAL: Buffer: 35.86 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;0:1;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;
... 19 --critical-cached='1' CRITICAL: Cached: 498.80 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;0:1;0; 'shared'=30310400B;;;0;
... 20 --critical-shared='1' CRITICAL: Shared: 28.91 MB | 'used'=736309248B;;;0;2062598144 'free'=1326288896B;;;0;2062598144 'used_prct'=35.70%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;0:1;0;
... 21 --patch-redhat='1' OK: Ram Total: 1.92 GB Used (-buffers/cache): 1.21 GB (62.88%) Free: 730.19 MB (37.12%), Buffer: 35.86 MB, Cached: 498.80 MB, Shared: 28.91 MB | 'used'=1296941056B;;;0;2062598144 'free'=765657088B;;;0;2062598144 'used_prct'=62.88%;;;0;100 'buffer'=37601280B;;;0; 'cached'=523030528B;;;0; 'shared'=30310400B;;;0;

View File

@ -0,0 +1,32 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
processcount ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=processcount
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --critical-cpu-total OK: Number of current processes running: 86 | 'nbproc'=86;;;0;
... 2 --top OK: Number of current processes running: 86 | 'nbproc'=86;;;0; 'top_gorgone-proxy'=324349952B;;;0; 'top_mariadbd'=298323968B;;;0; 'top_apache2'=251240448B;;;0; 'top_telegraf'=127754240B;;;0; 'top_perl'=126619648B;;;0;
... 3 --top-num OK: Number of current processes running: 86 | 'nbproc'=86;;;0;
... 4 --top-size OK: Number of current processes running: 86 | 'nbproc'=86;;;0;

View File

@ -0,0 +1,33 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
storage ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=storage
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --filter-duplicate='' OK: All storages are ok | 'count'=5;;;0; 'used_/run'=532480B;;;0;206262272 'used_/'=7394013184B;;;0;105088212992 'used_/dev/shm'=0B;;;0;1031299072 'used_/run/lock'=0B;;;0;5242880 'used_/run/user/0'=0B;;;0;206258176
... 2 --filter-storage-type='' OK: All storages are ok | 'count'=11;;;0; 'used_Physical memory'=1296941056B;;;0;2062598144 'used_Available memory'=0B;;;0;1143980032 'used_Virtual memory'=1296941056B;;;0;2062598144 'used_/run'=532480B;;;0;206262272 'used_/'=7394013184B;;;0;105088212992 'used_/dev/shm'=0B;;;0;1031299072 'used_/run/lock'=0B;;;0;5242880 'used_/run/user/0'=0B;;;0;206258176 'used_Memory buffers'=37601280B;;;0;2062598144 'used_Cached memory'=523030528B;;;0;523030528 'used_Shared memory'=30310400B;;;0;30310400
... 3 --display-transform-dst='run' OK: All storages are ok | 'count'=5;;;0; 'used_/run'=532480B;;;0;206262272 'used_/'=7394013184B;;;0;105088212992 'used_/dev/shm'=0B;;;0;1031299072 'used_/run/lock'=0B;;;0;5242880 'used_/run/user/0'=0B;;;0;206258176
... 4 --filter-duplicate OK: All storages are ok | 'count'=5;;;0; 'used_/run'=532480B;;;0;206262272 'used_/'=7394013184B;;;0;105088212992 'used_/dev/shm'=0B;;;0;1031299072 'used_/run/lock'=0B;;;0;5242880 'used_/run/user/0'=0B;;;0;206258176
... 5 --filter-storage-type OK: All storages are ok | 'count'=11;;;0; 'used_Physical memory'=1296941056B;;;0;2062598144 'used_Available memory'=0B;;;0;1143980032 'used_Virtual memory'=1296941056B;;;0;2062598144 'used_/run'=532480B;;;0;206262272 'used_/'=7394013184B;;;0;105088212992 'used_/dev/shm'=0B;;;0;1031299072 'used_/run/lock'=0B;;;0;5242880 'used_/run/user/0'=0B;;;0;206258176 'used_Memory buffers'=37601280B;;;0;2062598144 'used_Cached memory'=523030528B;;;0;523030528 'used_Shared memory'=30310400B;;;0;30310400

View File

@ -0,0 +1,36 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
swap ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=swap
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --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: No active swap
... 2 --no-swap CRITICAL: No active swap
... 3 --warning-usage='2' CRITICAL: No active swap
... 4 --warning-usage-free='' CRITICAL: No active swap
... 5 --warning-usage-prct='' CRITICAL: No active swap
... 6 --critical-usage='' CRITICAL: No active swap
... 4 --critical-usage-free='' CRITICAL: No active swap
... 5 --critical-usage-prct='' CRITICAL: No active swap

View File

@ -0,0 +1,42 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
tcpcon ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=tcpcon
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
${output} Run ${command}
${output} Strip String ${output}
Should Match Regexp ${output} OK: Total connections: \d+ \| 'service_total'=\d+;;;;
Examples: tc extra_options expected_result --
... 1 --verbose --help OK: Total connections: 43 | 'service_total'=43;;;0;
... 2 -application=[services] OK: Total connections: 43 | 'service_total'=43;;;0;
... 3 -application=[threshold-critical] OK: Total connections: 43 | 'service_total'=43;;;0; 'con_finWait1'=0;;;0; 'con_finWait2'=1;;;0; 'con_established'=8;;;0; 'con_listen'=17;;;0; 'con_closeWait'=1;;;0; 'con_lastAck'=0;;;0; 'con_synSent'=0;;;0; 'con_closing'=0;;;0; 'con_closed'=0;;;0; 'con_timeWait'=33;;;0; 'con_synReceived'=0;;;0;
... 4 -application=[threshold-warning] OK: Total connections: 43 | 'service_total'=43;;;0; 'con_closing'=0;;;0; 'con_synSent'=0;;;0; 'con_closed'=0;;;0; 'con_finWait1'=0;;;0; 'con_closeWait'=1;;;0; 'con_established'=8;;;0; 'con_finWait2'=1;;;0; 'con_synReceived'=0;;;0; 'con_listen'=17;;;0; 'con_lastAck'=0;;;0; 'con_timeWait'=33;;;0;
*** Keywords ***
Check Elements Presence
[Arguments] ${output} ${expected_result}
:FOR ${element} IN @{expected_result}
\ Should Contain ${output} ${element}

View File

@ -0,0 +1,36 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
time ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=time
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
${output} Run ${command}
${output} Strip String ${output}
Should Match Regexp ${output} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --oid='' oj
... 2 --warning-offset='0' ^(OK|WARNING|CRITICAL): Time offset (-?\\\d+) second\\\(s\\\): Local Time : (\\\d{4}-\\\d{2}-\\d{2}T\\\d{2}:\\\d{2}:\\\d{2}) \\\(\\\+\\\d{4}\\\) \\\| 'offset'=(-?\\\d+)s;.*$
... 3 --critical-offset='125' CRITICAL: Time offset -1211346 second(s): Local Time : 2024-08-13T10:39:44 (+0200) | 'offset'=-1211346s;;0:125;;
... 4 --ntp-hostname='NET' UNKNOWN: Cannot load module 'Net::NTP'
... 5 --ntp-port=123 oid
... 6 --timezone='+0100' oj

View File

@ -0,0 +1,32 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
udpcon ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=udpcon
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --verbose OK: Total connections: 7 | 'service_total'=7;;;0; 'con_listen'=7;;;0;
... 2 -application=[services] OK: Total connections: 7 | 'service_total'=7;;;0; 'con_listen'=7;;;0;
... 3 -application=[threshold-critical] OK: Total connections: 7 | 'service_total'=7;;;0; 'con_listen'=7;;;0;
... 4 -application=[threshold-warning] OK: Total connections: 7 | 'service_total'=7;;;0; 'con_listen'=7;;;0;

View File

@ -0,0 +1,38 @@
*** Settings ***
Documentation Check arp table
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
Test Timeout 120s
*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
*** Test Cases ***
uptime ${tc}
[Tags] os linux
${command} Catenate
... ${CMD}
... --mode=uptime
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
Examples: tc extra_options expected_result --
... 1 --warning-uptime='2' WARNING: System uptime is: 38m 39s | 'uptime'=2319.00s;0:2;;0;
... 2 --warning-uptime='1' WARNING: System uptime is: 38m 39s | 'uptime'=2319.00s;0:1;;0;
... 3 --critical-uptime='2' CRITICAL: System uptime is: 38m 39s | 'uptime'=2319.00s;;0:2;0;
... 4 --add-sysdesc OK: System uptime is: 38m 39s, Linux central-deb-24-04 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 | 'uptime'=2319.00s;;;0;
... 5 --critical-uptime='1' CRITICAL: System uptime is: 38m 39s | 'uptime'=2319.00s;;0:1;0;
... 6 --check-overload OK: System uptime is: 38m 39s | 'uptime'=2319.00s;;;0;
... 7 --reboot-window OK: System uptime is: 38m 39s | 'uptime'=2319.00s;;;0;
... 8 --unit='h' OK: System uptime is: 38m 39s | 'uptime'=0.64h;;;0;
... 9 --unit='m' OK: System uptime is: 38m 39s | 'uptime'=38.65m;;;0;
... 10 --unit='s' OK: System uptime is: 38m 39s | 'uptime'=2319.00s;;;0;