skyline.thunder package

Submodules

skyline.thunder.agent module

skyline.thunder.thunder module

class Thunder(parent_pid)[source]

Bases: threading.Thread

The Thunder class which controls the thunder thread and spawned processes. Thunder is ONLY for alerting on Skyline operations. Thunder checks on the other hand are carried out by analyzer/metrics_manager and other Skyline apps, which send events to thunder. thunder/rolling carries out internal and external checks and sends any events to thunder.

check_if_parent_is_alive()[source]

Self explanatory

spin_thunder_process(i, validated_event_details, redis_item, event_file)[source]

Roll some thunder.

Parameters:i – python process id
Returns:anomalous
Return type:boolean
run()[source]
  • Called when the process intializes.
  • Determine if Redis is up and discover checks to run.
  • If Redis is down and discover checks to run from the filesystem.
  • Process event.
  • Wait for the processes to finish.
  • Repeat.

skyline.thunder.thunder_alerters module

thunder_alert(alert_via, subject, body)[source]

skyline.thunder.thunder_rolling module

class RollingThunder(parent_pid)[source]

Bases: threading.Thread

The RollingThunder class which controls the thunder/rolling thread and spawned processes. thunder/rolling carries out internal and external checks and sends any events to thunder for various Skyline app operations and dependencies, such as Redis, mariadb, memcache and Graphite. In a distributed Skyline set up, thunder/rolling can alert on other Skyline apps in the cluster (TBD)

check_if_parent_is_alive()[source]

Self explanatory

rolling_process(i)[source]

Create and manage the required lists and Redis sets

run()[source]
  • Called when the process intializes.
  • Determine if Redis is up
  • Spawn a rolling process to do checks
  • Wait for the process to finish.
  • run_every 60 seconds

Module contents