Skip to content

Commit

Permalink
Allow critical alerts check when enable_alerts is disabled
Browse files Browse the repository at this point in the history
This covers use case where user wants to just check for critical alerts
post chaos without having to enable the alerts evaluation feature which
evaluates prom queries specified in an alerts file.

Signed-off-by: Naga Ravi Chaitanya Elluri <[email protected]>
  • Loading branch information
chaitanyaenr committed Feb 20, 2024
1 parent c440dc4 commit 5a8d5b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run_kraken.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def main(cfg):
telemetry_ocp = KrknTelemetryOpenshift(safe_logger, ocpcli)
telemetry_elastic = KrknElastic(safe_logger,elastic_url)

if enable_alerts:
if enable_alerts or check_critical_alerts:
prometheus = KrknPrometheus(prometheus_url, prometheus_bearer_token)

logging.info("Server URL: %s" % kubecli.get_host())
Expand Down Expand Up @@ -347,7 +347,7 @@ def main(cfg):
failed_post_scenarios, scenario_telemetries = network_chaos.run(scenarios_list, config, wait_duration, kubecli, telemetry_k8s)

# Check for critical alerts when enabled
if enable_alerts and check_critical_alerts:
if check_critical_alerts:
logging.info("Checking for critical alerts firing post choas")

##PROM
Expand Down

0 comments on commit 5a8d5b0

Please sign in to comment.