snowkill


Namesnowkill JSON
Version 0.4.4 PyPI version JSON
download
home_pagehttps://github.com/littleK0i/snowkill
SummaryA tool for realtime monitoring of running, queued and blocked queries in Snowflake
upload_time2024-01-25 16:48:52
maintainer
docs_urlNone
authorVitaly Markov
requires_python>=3.8
license
keywords snowflake sql query monitor monitoring running kill terminate database
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SnowKill

[![PyPI](https://badge.fury.io/py/snowkill.svg)](https://badge.fury.io/py/snowkill)

SnowKill is a near real-time query monitoring tool for [Snowflake Data Cloud](https://www.snowflake.com/).

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"](https://docs.snowflake.com/en/user-guide/ui-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`](https://docs.snowflake.com/en/sql-reference/account-usage/query_history) and [`GET_QUERY_OPERATOR_STATS`](https://docs.snowflake.com/en/sql-reference/functions/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](https://docs.snowflake.com/en/user-guide/ui-query-profile) and [active locks](https://docs.snowflake.com/en/sql-reference/sql/show-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](/misc/notification_example_1.png)

## Quick links

- [Getting started](https://docs.snowkill.net/getting-started)
- [Implementation details](https://docs.snowkill.net/implementation-details)
- [Examples](https://docs.snowkill.net/examples)
- [Deployment best practices](https://docs.snowkill.net/deployment/best-practices)

Built-in conditions:
- [Blocked Duration](https://docs.snowkill.net/condition/built-in-conditions/blocked-duration)
- [Cartesian Join Explosion](https://docs.snowkill.net/condition/built-in-conditions/cartesian-join-explosion)
- [Estimated Scan Duration](https://docs.snowkill.net/condition/built-in-conditions/estimated-scan-duration)
- [Execute Duration](https://docs.snowkill.net/condition/built-in-conditions/execute-duration)
- [Join Explosion](https://docs.snowkill.net/condition/built-in-conditions/join-explosion)
- [Storage Spilling](https://docs.snowkill.net/condition/built-in-conditions/storage-spilling)
- [Queued Duration](https://docs.snowkill.net/condition/built-in-conditions/queued-duration)
- [Union without ALL](https://docs.snowkill.net/condition/built-in-conditions/union-without-all)

Built-in formatters:
- [Markdown](https://docs.snowkill.net/formatter/built-in-formatters/markdown)
- [Slack](https://docs.snowkill.net/formatter/built-in-formatters/slack)

Built-in storages:
- [Postgres table](https://docs.snowkill.net/storage/built-in-storages/postgres-table)
- [Snowflake table](https://docs.snowkill.net/storage/built-in-storages/snowflake-table)

## 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](https://www.linkedin.com/in/markov-vitaly/), 2023

Enjoy!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/littleK0i/snowkill",
    "name": "snowkill",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "snowflake,sql,query,monitor,monitoring,running,kill,terminate,database",
    "author": "Vitaly Markov",
    "author_email": "wild.desu@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6d/cd/0ae393737b5457945a4af0568469b765e7ea120fd14ecb84a4aff159e2de/snowkill-0.4.4.tar.gz",
    "platform": null,
    "description": "# SnowKill\n\n[![PyPI](https://badge.fury.io/py/snowkill.svg)](https://badge.fury.io/py/snowkill)\n\nSnowKill is a near real-time query monitoring tool for [Snowflake Data Cloud](https://www.snowflake.com/).\n\nSnowKill 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.\n\nThe 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.\n\nSnowKill has programmatic access to query plan from [\"Query Profile\"](https://docs.snowflake.com/en/user-guide/ui-query-profile) page in SnowSight. SnowKill also has access to information about locks and tries to report the exact reason for transaction collisions.\n\nSnowKill operates on present data, which normally allows it to react much faster relative to conventional monitoring tools operating on past data from [`QUERY_HISTORY`](https://docs.snowflake.com/en/sql-reference/account-usage/query_history) and [`GET_QUERY_OPERATOR_STATS`](https://docs.snowflake.com/en/sql-reference/functions/get_query_operator_stats).\n\n## How does it work?\n\n1. Load list of queries which are currently `RUNNING`, `QUEUED` or `BLOCKED`.\n2. Load additional information about [query plans](https://docs.snowflake.com/en/user-guide/ui-query-profile) and [active locks](https://docs.snowflake.com/en/sql-reference/sql/show-locks), if necessary.\n3. Check queries against list of fully customizable conditions.\n4. Optionally terminate matched queries exceeding specific thresholds.\n5. Detect and skip previously reported queries, avoid duplicates.\n6. Send notifications about newly matched queries (via Slack, Email, etc.).\n\n## Notification example\n\n![Notification example 1](/misc/notification_example_1.png)\n\n## Quick links\n\n- [Getting started](https://docs.snowkill.net/getting-started)\n- [Implementation details](https://docs.snowkill.net/implementation-details)\n- [Examples](https://docs.snowkill.net/examples)\n- [Deployment best practices](https://docs.snowkill.net/deployment/best-practices)\n\nBuilt-in conditions:\n- [Blocked Duration](https://docs.snowkill.net/condition/built-in-conditions/blocked-duration)\n- [Cartesian Join Explosion](https://docs.snowkill.net/condition/built-in-conditions/cartesian-join-explosion)\n- [Estimated Scan Duration](https://docs.snowkill.net/condition/built-in-conditions/estimated-scan-duration)\n- [Execute Duration](https://docs.snowkill.net/condition/built-in-conditions/execute-duration)\n- [Join Explosion](https://docs.snowkill.net/condition/built-in-conditions/join-explosion)\n- [Storage Spilling](https://docs.snowkill.net/condition/built-in-conditions/storage-spilling)\n- [Queued Duration](https://docs.snowkill.net/condition/built-in-conditions/queued-duration)\n- [Union without ALL](https://docs.snowkill.net/condition/built-in-conditions/union-without-all)\n\nBuilt-in formatters:\n- [Markdown](https://docs.snowkill.net/formatter/built-in-formatters/markdown)\n- [Slack](https://docs.snowkill.net/formatter/built-in-formatters/slack)\n\nBuilt-in storages:\n- [Postgres table](https://docs.snowkill.net/storage/built-in-storages/postgres-table)\n- [Snowflake table](https://docs.snowkill.net/storage/built-in-storages/snowflake-table)\n\n## Future plans\n\n- More conditions, formatters, storages.\n- Automated testing on push.\n- Maybe some conditions for groups of queries, e.g. \"more than 4 queries are queued on warehouse\".\n\n## Issues? Questions? Feedback?\n\nPlease use GitHub \"Issues\" to report bugs and technical problems.\n\nPlease use GitHub \"Discussions\" to ask questions and provide feedback.\n\n## Created by\n[Vitaly Markov](https://www.linkedin.com/in/markov-vitaly/), 2023\n\nEnjoy!\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A tool for realtime monitoring of running, queued and blocked queries in Snowflake",
    "version": "0.4.4",
    "project_urls": {
        "Homepage": "https://github.com/littleK0i/snowkill"
    },
    "split_keywords": [
        "snowflake",
        "sql",
        "query",
        "monitor",
        "monitoring",
        "running",
        "kill",
        "terminate",
        "database"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dbbfb754104ab125bf948c986be20d75b1c7e569d6c812c90ddf862fe30d629f",
                "md5": "2ec8bafc24bd0686368ffa94882aee5f",
                "sha256": "751b57bd838dd7b612fe1bde7deeb9b4f8053f1b5915c9ddc5b86911e9cbacae"
            },
            "downloads": -1,
            "filename": "snowkill-0.4.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2ec8bafc24bd0686368ffa94882aee5f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 26722,
            "upload_time": "2024-01-25T16:48:48",
            "upload_time_iso_8601": "2024-01-25T16:48:48.967830Z",
            "url": "https://files.pythonhosted.org/packages/db/bf/b754104ab125bf948c986be20d75b1c7e569d6c812c90ddf862fe30d629f/snowkill-0.4.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6dcd0ae393737b5457945a4af0568469b765e7ea120fd14ecb84a4aff159e2de",
                "md5": "a1c2d22eb593435b2d2f8e4d1592ad4a",
                "sha256": "72aeedb246a15ad882aad48bc6141a440ba6bc086eb3f67098dd365875ee1d27"
            },
            "downloads": -1,
            "filename": "snowkill-0.4.4.tar.gz",
            "has_sig": false,
            "md5_digest": "a1c2d22eb593435b2d2f8e4d1592ad4a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 20931,
            "upload_time": "2024-01-25T16:48:52",
            "upload_time_iso_8601": "2024-01-25T16:48:52.128111Z",
            "url": "https://files.pythonhosted.org/packages/6d/cd/0ae393737b5457945a4af0568469b765e7ea120fd14ecb84a4aff159e2de/snowkill-0.4.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-25 16:48:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "littleK0i",
    "github_project": "snowkill",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "snowkill"
}
        
Elapsed time: 0.40611s