Skip to content

Commit

Permalink
adding 2nd check to memory
Browse files Browse the repository at this point in the history
  • Loading branch information
sfarouq-ext committed Feb 19, 2025
1 parent e2b76b9 commit 72774e3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/storage/purestorage/flasharray/v2/restapi/alerts.robot
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
*** Settings ***
Documentation Check alerts.

Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource

Expand All @@ -9,10 +8,10 @@ Test Timeout 120s

** Variables ***
${MOCKOON_JSON} ${CURDIR}${/}mokoon.json
#${HOSTNAME} host.docker.internal
#${APIPORT} 3000

${CMD} ${CENTREON_PLUGINS}
... --plugin=storage::purestorage::flasharray::v2::restapi::plugin
... --mode=alerts
... --hostname=${HOSTNAME}
... --proto='http'
... --api-version='2.4'
Expand All @@ -24,12 +23,13 @@ alerts ${tc}
[Tags] storage purestorage flasharray restapi
${command} Catenate
... ${CMD}
... --mode=alerts
... ${extra_options}
Ctn Verify Command Output ${command} ${expected_result}

Examples: tc extra_options expected_result --
... 1 --filter-category='array' CRITICAL: 1 problem(s) detected | 'alerts.detected.count'=1;;;0;
... 2 --warning-status='\\\%{component_name} eq "ct1.eth0"' --filter-category="toto" --insecure --verbose WARNING: 1 problem(s) detected | 'alerts.detected.count'=1;;;0; warning: alert [component: ct1.eth0] [severity: warning] [category: toto] [issue: failure]
... 3 --critical-status='\\\%{component_name} eq "ch0" and \\\%{severity} =~ /critical/i' --filter-category="array" --insecure --verbose CRITICAL: 1 problem(s) detected | 'alerts.detected.count'=1;;;0; critical: alert [component: ch0] [severity: critical] [category: array] [issue: shelf drive failures(s)]
... 4 --memory="" CRITICAL: 1 problem(s) detected | 'alerts.detected.count'=1;;;0;
... 1 ${EMPTY} CRITICAL: 1 problem(s) detected | 'alerts.detected.count'=1;;;0;
... 2 --filter-category='array' CRITICAL: 1 problem(s) detected | 'alerts.detected.count'=1;;;0;
... 3 --warning-status='\\\%{component_name} eq "ct1.eth0"' --filter-category="toto" --insecure --verbose WARNING: 1 problem(s) detected | 'alerts.detected.count'=1;;;0; warning: alert [component: ct1.eth0] [severity: warning] [category: toto] [issue: failure]
... 4 --critical-status='\\\%{component_name} eq "ch0" and \\\%{severity} =~ /critical/i' --filter-category="array" --insecure --verbose CRITICAL: 1 problem(s) detected | 'alerts.detected.count'=1;;;0; critical: alert [component: ch0] [severity: critical] [category: array] [issue: shelf drive failures(s)]
... 5 --memory CRITICAL: 1 problem(s) detected | 'alerts.detected.count'=1;;;0; #first memory alert to be defined
... 6 --memory OK: 0 problem(s) detected | 'alerts.detected.count'=0;;;0; #second check to ensure no new memory alert

0 comments on commit 72774e3

Please sign in to comment.