mirror of
				https://github.com/centreon/centreon-plugins.git
				synced 2025-10-31 19:33:50 +01:00 
			
		
		
		
	rebase
This commit is contained in:
		
						commit
						d3ed56f53a
					
				
							
								
								
									
										46
									
								
								tests/robot/network/teldat/snmp/cpu.robot
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								tests/robot/network/teldat/snmp/cpu.robot
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,46 @@ | |||||||
|  | *** Settings *** | ||||||
|  | Documentation       Network Teldat SNMP plugin | ||||||
|  | 
 | ||||||
|  | Resource            ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource | ||||||
|  | 
 | ||||||
|  | Test Timeout        120s | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | *** Variables *** | ||||||
|  | ${CMD}                          ${CENTREON_PLUGINS} --plugin=network::teldat::snmp::plugin | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | *** Test Cases *** | ||||||
|  | CPU ${tc} | ||||||
|  |     [Tags]    network    teldat    snmp | ||||||
|  |     ${command}    Catenate | ||||||
|  |     ...    ${CMD} | ||||||
|  |     ...    --mode=cpu | ||||||
|  |     ...    --hostname=127.0.0.1 | ||||||
|  |     ...    --snmp-version=2c | ||||||
|  |     ...    --snmp-port=2024 | ||||||
|  |     ...    --snmp-community=network/teldat/snmp/teldat | ||||||
|  |     ...    --warning-cpu-utilization-5s=${warningcpuutilization5s} | ||||||
|  |     ...    --critical-cpu-utilization-5s=${criticalcpuutilization5s} | ||||||
|  |     ...    --warning-cpu-utilization-1m=${warningcpuutilization1m} | ||||||
|  |     ...    --critical-cpu-utilization-1m=${criticalcpuutilization1m} | ||||||
|  |     ...    --warning-cpu-utilization-5m=${warningcpuutilization5m} | ||||||
|  |     ...    --critical-cpu-utilization-5m=${criticalcpuutilization5m} | ||||||
|  | 
 | ||||||
|  |     ${output}    Run    ${command} | ||||||
|  |     ${output}    Strip String    ${output} | ||||||
|  |     Should Be Equal As Strings | ||||||
|  |     ...    ${output} | ||||||
|  |     ...    ${result} | ||||||
|  |     ...    Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${result}\n | ||||||
|  |     ...    values=False | ||||||
|  |     ...    collapse_spaces=True | ||||||
|  | 
 | ||||||
|  |     Examples:         tc  warningcpuutilization5s  criticalcpuutilization5s  warningcpuutilization1m  criticalcpuutilization1m  warningcpuutilization5m  criticalcpuutilization5m  result    -- | ||||||
|  |             ...       1   ${EMPTY}                 ${EMPTY}                  ${EMPTY}                 ${EMPTY}                  ${EMPTY}                 ${EMPTY}                  OK: cpu average usage: 1.00 % (5s), 1.00 % (1m), 1.00 % (5m) | 'cpu.utilization.5s.percentage'=1.00%;;;0;100 'cpu.utilization.1m.percentage'=1.00%;;;0;100 'cpu.utilization.15m.percentage'=1.00%;;;0;100 | ||||||
|  |             ...       2   0.5                      ${EMPTY}                  ${EMPTY}                 ${EMPTY}                  ${EMPTY}                 ${EMPTY}                  WARNING: cpu average usage: 1.00 % (5s) | 'cpu.utilization.5s.percentage'=1.00%;0:0.5;;0;100 'cpu.utilization.1m.percentage'=1.00%;;;0;100 'cpu.utilization.15m.percentage'=1.00%;;;0;100 | ||||||
|  |             ...       3   ${EMPTY}                 0.5                       ${EMPTY}                 ${EMPTY}                  ${EMPTY}                 ${EMPTY}                  CRITICAL: cpu average usage: 1.00 % (5s) | 'cpu.utilization.5s.percentage'=1.00%;;0:0.5;0;100 'cpu.utilization.1m.percentage'=1.00%;;;0;100 'cpu.utilization.15m.percentage'=1.00%;;;0;100 | ||||||
|  |             ...       4   ${EMPTY}                 ${EMPTY}                  0.5                      ${EMPTY}                  ${EMPTY}                 ${EMPTY}                  WARNING: cpu average usage: 1.00 % (1m) | 'cpu.utilization.5s.percentage'=1.00%;;;0;100 'cpu.utilization.1m.percentage'=1.00%;0:0.5;;0;100 'cpu.utilization.15m.percentage'=1.00%;;;0;100 | ||||||
|  |             ...       5   ${EMPTY}                 ${EMPTY}                  ${EMPTY}                 0.5                       ${EMPTY}                 ${EMPTY}                  CRITICAL: cpu average usage: 1.00 % (1m) | 'cpu.utilization.5s.percentage'=1.00%;;;0;100 'cpu.utilization.1m.percentage'=1.00%;;0:0.5;0;100 'cpu.utilization.15m.percentage'=1.00%;;;0;100 | ||||||
|  |             ...       6   ${EMPTY}                 ${EMPTY}                  ${EMPTY}                 ${EMPTY}                  0.5                      ${EMPTY}                  WARNING: cpu average usage: 1.00 % (5m) | 'cpu.utilization.5s.percentage'=1.00%;;;0;100 'cpu.utilization.1m.percentage'=1.00%;;;0;100 'cpu.utilization.15m.percentage'=1.00%;0:0.5;;0;100 | ||||||
|  |             ...       7   ${EMPTY}                 ${EMPTY}                  ${EMPTY}                 ${EMPTY}                  ${EMPTY}                 0.5                       CRITICAL: cpu average usage: 1.00 % (5m) | 'cpu.utilization.5s.percentage'=1.00%;;;0;100 'cpu.utilization.1m.percentage'=1.00%;;;0;100 'cpu.utilization.15m.percentage'=1.00%;;0:0.5;0;100 | ||||||
							
								
								
									
										46
									
								
								tests/robot/network/teldat/snmp/memory.robot
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								tests/robot/network/teldat/snmp/memory.robot
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,46 @@ | |||||||
|  | *** Settings *** | ||||||
|  | Documentation       Network Teldat SNMP plugin | ||||||
|  | 
 | ||||||
|  | Resource            ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource | ||||||
|  | 
 | ||||||
|  | Test Timeout        120s | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | *** Variables *** | ||||||
|  | ${CMD}                          ${CENTREON_PLUGINS} --plugin=network::teldat::snmp::plugin | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | *** Test Cases *** | ||||||
|  | Memory ${tc} | ||||||
|  |     [Tags]    network    teldat    snmp | ||||||
|  |     ${command}    Catenate | ||||||
|  |     ...    ${CMD} | ||||||
|  |     ...    --mode=memory | ||||||
|  |     ...    --hostname=127.0.0.1 | ||||||
|  |     ...    --snmp-version=2c | ||||||
|  |     ...    --snmp-port=2024 | ||||||
|  |     ...    --snmp-community=network/teldat/snmp/teldat | ||||||
|  |     ...    --warning-usage=${warningusage} | ||||||
|  |     ...    --critical-usage=${criticalusage} | ||||||
|  |     ...    --warning-usage-free=${warningusagefree} | ||||||
|  |     ...    --critical-usage-free=${criticalusagefree} | ||||||
|  |     ...    --warning-usage-prct=${warningusageprct} | ||||||
|  |     ...    --critical-usage-prct=${criticalusageprct} | ||||||
|  |      | ||||||
|  |     ${output}    Run    ${command} | ||||||
|  |     ${output}    Strip String    ${output} | ||||||
|  |     Should Be Equal As Strings | ||||||
|  |     ...    ${output} | ||||||
|  |     ...    ${expected_result} | ||||||
|  |     ...    Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n | ||||||
|  |     ...    values=False | ||||||
|  |     ...    collapse_spaces=True | ||||||
|  | 
 | ||||||
|  |     Examples:         tc  warningusage  criticalusage  warningusagefree  criticalusagefree  warningusageprct  criticalusageprct    expected_result    -- | ||||||
|  |             ...       1   ${EMPTY}      ${EMPTY}       ${EMPTY}          ${EMPTY}           ${EMPTY}           ${EMPTY}            OK: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;;0;268435456 'system#memory.free.bytes'=163015856B;;;0;268435456 'system#memory.usage.percentage'=39.27%;;;0;100 | ||||||
|  |             ...       2   100           ${EMPTY}       ${EMPTY}          ${EMPTY}           ${EMPTY}           ${EMPTY}            WARNING: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;0:100;;0;268435456 'system#memory.free.bytes'=163015856B;;;0;268435456 'system#memory.usage.percentage'=39.27%;;;0;100 | ||||||
|  |             ...       3   ${EMPTY}      100            ${EMPTY}          ${EMPTY}           ${EMPTY}           ${EMPTY}            CRITICAL: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;0:100;0;268435456 'system#memory.free.bytes'=163015856B;;;0;268435456 'system#memory.usage.percentage'=39.27%;;;0;100 | ||||||
|  |             ...       4   ${EMPTY}      ${EMPTY}       100               ${EMPTY}           ${EMPTY}           ${EMPTY}            WARNING: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;;0;268435456 'system#memory.free.bytes'=163015856B;0:100;;0;268435456 'system#memory.usage.percentage'=39.27%;;;0;100 | ||||||
|  |             ...       5   ${EMPTY}      ${EMPTY}       ${EMPTY}          100                ${EMPTY}           ${EMPTY}            CRITICAL: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;;0;268435456 'system#memory.free.bytes'=163015856B;;0:100;0;268435456 'system#memory.usage.percentage'=39.27%;;;0;100 | ||||||
|  |             ...       6   ${EMPTY}      ${EMPTY}       ${EMPTY}          ${EMPTY}           30                 ${EMPTY}            WARNING: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;;0;268435456 'system#memory.free.bytes'=163015856B;;;0;268435456 'system#memory.usage.percentage'=39.27%;0:30;;0;100 | ||||||
|  |             ...       7   ${EMPTY}      ${EMPTY}       ${EMPTY}          ${EMPTY}           ${EMPTY}           30                  CRITICAL: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;;0;268435456 'system#memory.free.bytes'=163015856B;;;0;268435456 'system#memory.usage.percentage'=39.27%;;0:30;0;100                  | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user