Skip to main content

A tool for realtime monitoring of running, queued and blocked queries in Snowflake

Project description

SnowKill

PyPI

SnowKill is a near real-time query monitoring tool for Snowflake Data Cloud.

SnowKill helps to detect potential problems with queries which are currently running. It analyzes query stats and plans, detects bad patterns, generates notifications and optionally "kills" some queries automatically.

The core logic of SnowKill relies on internal REST API calls instead of SQL queries. It does not require an active warehouse to run, which makes it possible to maintain the constant monitoring almost free of charge.

SnowKill has programmatic access to query plan from "Query Profile" page in SnowSight. SnowKill also has access to information about locks and tries to report the exact reason for transaction collisions.

SnowKill operates on present data, which normally allows it to react much faster relative to conventional monitoring tools operating on past data from QUERY_HISTORY and GET_QUERY_OPERATOR_STATS.

How does it work?

  1. Load list of queries which are currently RUNNING, QUEUED or BLOCKED.
  2. Load additional information about query plans and active locks, if necessary.
  3. Check queries against list of fully customizable conditions.
  4. Optionally terminate matched queries exceeding specific thresholds.
  5. Detect and skip previously reported queries, avoid duplicates.
  6. Send notifications about newly matched queries (via Slack, Email, etc.).

Notification example

Notification example 1

Quick links

Built-in conditions:

Built-in formatters:

Built-in storages:

Future plans

  • More conditions, formatters, storages.
  • Automated testing on push.
  • Maybe some conditions for groups of queries, e.g. "more than 4 queries are queued on warehouse".

Issues? Questions? Feedback?

Please use GitHub "Issues" to report bugs and technical problems.

Please use GitHub "Discussions" to ask questions and provide feedback.

Created by

Vitaly Markov, 2023

Enjoy!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snowkill-0.4.5.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

snowkill-0.4.5-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file snowkill-0.4.5.tar.gz.

File metadata

  • Download URL: snowkill-0.4.5.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.0

File hashes

Hashes for snowkill-0.4.5.tar.gz
Algorithm Hash digest
SHA256 3178dbf58cb825ab2940000e5c7e4cc1e348cba4f9d3031df7e78abe3bb24b87
MD5 ea9c35e046a7948f6f23fc6369482873
BLAKE2b-256 f535df1a9552c2e45c378829c921e046939a6994af3f2047f808ad135c2e8a2e

See more details on using hashes here.

File details

Details for the file snowkill-0.4.5-py3-none-any.whl.

File metadata

  • Download URL: snowkill-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.0

File hashes

Hashes for snowkill-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f1c9256863ed556dd40293ff86b9baa77c22a2a139bfea297ab0e152a246082d
MD5 c10f940f065901fb04e064be0c45898d
BLAKE2b-256 6a060067fe2a1275f1ac97165969cbb446cd8e607efdd0f1dc14e3650d4a6bbb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page