spydertop


Namespydertop JSON
Version 1.3.1 PyPI version JSON
download
home_page
SummaryA tool that provides htop-like functionality for any point in time.
upload_time2023-08-10 16:40:22
maintainer
docs_urlNone
author
requires_python>=3.7
licenseThe MIT License (MIT) Copyright (c) 2022 Spyderbat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords spydertop spyderbat htop top
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Spydertop

Spydertop is a tool that provides htop-like functionality for any point in time, on any of your Spyderbat-enabled machines. Utilizing Spyderbat’s kernel-level system monitoring and public APIs, Spydertop allows analysts to look into system anomalies days or even months after they occur.

## Demo:

![A demo of Spydertop](https://github.com/spyderbat/spydertop/blob/main/assets/demo.gif)

## Quick Start

If you would like to try spydertop without installing it first, you can run the [docker image](https://hub.docker.com/r/spyderbat/spydertop). Example data from the `examples` directory is included in the docker image.

```sh
# to run without arguments
docker run -it spyderbat/spydertop

# to run on an example
docker run -it spyderbat/spydertop -i examples/minikube-sock-shop.json.gz

# to persist settings, or to use a pre-configured Spyderbat API
docker run -it -v $HOME/.config/spydertop:/root/.config/spydertop spyderbat/spydertop [ARGS]

# to run docker with the host's timezone settings
docker run -it -v /etc/localtime:/etc/localtime spyderbat/spydertop [ARGS]
```

You can also download the bundled executable from the [releases page](https://github.com/spyderbat/spydertop/releases), which includes everything necessary to run spydertop, including a compatible python version!

## Installation

Spydertop can be installed from [PyPi](https://pypi.org/project/spydertop/) with pip:

```sh
pip install spydertop
```

If you prefer a manual install, you can download and install the appropriate wheel file or bundled executable (`spydertop-bundled-XXX`) from the [releases page](https://github.com/spyderbat/spydertop/releases).

To install from source, clone this repository and run this command inside:

```sh
# note: requires setuptools >= 45
pip install .
# pip install . -e # for editable install
```

On your first run of `spydertop`, it will guide you through setting up a basic configuration if you do not have one already. If you prefer to set it up yourself, see [Configuration](#configuration).

## Usage

Spydertop is called with options specifying the machine to pull from and how that data is collected, and a timestamp. Records will be loaded from the specified machine around that time, and an htop-like view will start at the exact requested time. The relative time selection bar at the bottom or bracket keys (`[` or `]`) can be used to move forward and backward in time, and the arrow keys, tab key, or mouse can be used to navigate the interface. More usage information is available on the help page (`h` or `<F1>`).

As this tool emulates much of HTOP's functionality, more information is also available on the HTOP man page.

## Examples

```sh
spydertop --help # print usage information

# starts spydertop with the specified machine
# at a point in time 5 days ago
spydertop load -g ORGUID -m MACHINEUID -- -5d

# full example
spydertop load \
        --organization ORGUID \
        --machine MACHINEUID \
        --duration 3m \
        --input cached_input_records.json.gz \
        --output file_to_save_to.json.gz \
        -- 1654303663.600901
```

## Configuration

The current configuration, and it's location on disk, can be viewed with

```bash
spydertop config get
```

Spydertop uses the Spyderbat APIs, so it must have access to a valid API key. API keys can be obtained from the API keys page under your Spyderbat account, and configured in spydertop using the `spydertop config set-secret` command:

```bash
spydertop config set-secret mysecret --api-key $(cat ./apikey.txt)
```

When using the `load` command, spydertop uses a *context* to determine how to load data. By default, you will have to specify the organization and source every time you start spydertop. However, you can update or create a new context to configure default values:

```bash
spydertop config set-context mycontext --secret mysecret --organization ORG_ID --source SOURCE_ID
```

Your organization id can be found in the url for the dashboard, and many other pages. Similarly, the machine id can be located in the url of an investigation, or by enabling the id column in the sources list.

```url
https://api.spyderbat.com/app/org/{ORG_ID_HERE}/dashboard
```

After creating a context, you can enable it with:

```bash
spydertop config use-context mycontext
```

## Development

For development, Spydertop can be installed with the `--editable` flag in `pip`. Spydertop works well inside of a Python virtual environment, so using one is recommended.

```sh
# in the spydertop repository:

# setup development environment
python -m venv .venv
source .venv/bin/activate

# install spydertop for development
pip install --editable .
```

In the virtual environment, after editing and saving a file, the `spydertop` command will automatically be updated.

See the [Project Structure](https://github.com/spyderbat/spydertop/blob/main/structure.md) for a walk through of Spydertop's code base.

## Debugging

If you are using VSCode, `launch.json` is configured to run Spydertop with the python extension's debugger. This runs the module as a python file instead of through the command line, so command line arguments can be added in `__init__.py`.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "spydertop",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Spyderbat <dev@spyderbat.com>",
    "keywords": "spydertop,spyderbat,htop,top",
    "author": "",
    "author_email": "Griffith Thomas <dev@spyderbat.com>",
    "download_url": "",
    "platform": null,
    "description": "# Spydertop\n\nSpydertop is a tool that provides htop-like functionality for any point in time, on any of your Spyderbat-enabled machines. Utilizing Spyderbat\u2019s kernel-level system monitoring and public APIs, Spydertop allows analysts to look into system anomalies days or even months after they occur.\n\n## Demo:\n\n![A demo of Spydertop](https://github.com/spyderbat/spydertop/blob/main/assets/demo.gif)\n\n## Quick Start\n\nIf you would like to try spydertop without installing it first, you can run the [docker image](https://hub.docker.com/r/spyderbat/spydertop). Example data from the `examples` directory is included in the docker image.\n\n```sh\n# to run without arguments\ndocker run -it spyderbat/spydertop\n\n# to run on an example\ndocker run -it spyderbat/spydertop -i examples/minikube-sock-shop.json.gz\n\n# to persist settings, or to use a pre-configured Spyderbat API\ndocker run -it -v $HOME/.config/spydertop:/root/.config/spydertop spyderbat/spydertop [ARGS]\n\n# to run docker with the host's timezone settings\ndocker run -it -v /etc/localtime:/etc/localtime spyderbat/spydertop [ARGS]\n```\n\nYou can also download the bundled executable from the [releases page](https://github.com/spyderbat/spydertop/releases), which includes everything necessary to run spydertop, including a compatible python version!\n\n## Installation\n\nSpydertop can be installed from [PyPi](https://pypi.org/project/spydertop/) with pip:\n\n```sh\npip install spydertop\n```\n\nIf you prefer a manual install, you can download and install the appropriate wheel file or bundled executable (`spydertop-bundled-XXX`) from the [releases page](https://github.com/spyderbat/spydertop/releases).\n\nTo install from source, clone this repository and run this command inside:\n\n```sh\n# note: requires setuptools >= 45\npip install .\n# pip install . -e # for editable install\n```\n\nOn your first run of `spydertop`, it will guide you through setting up a basic configuration if you do not have one already. If you prefer to set it up yourself, see [Configuration](#configuration).\n\n## Usage\n\nSpydertop is called with options specifying the machine to pull from and how that data is collected, and a timestamp. Records will be loaded from the specified machine around that time, and an htop-like view will start at the exact requested time. The relative time selection bar at the bottom or bracket keys (`[` or `]`) can be used to move forward and backward in time, and the arrow keys, tab key, or mouse can be used to navigate the interface. More usage information is available on the help page (`h` or `<F1>`).\n\nAs this tool emulates much of HTOP's functionality, more information is also available on the HTOP man page.\n\n## Examples\n\n```sh\nspydertop --help # print usage information\n\n# starts spydertop with the specified machine\n# at a point in time 5 days ago\nspydertop load -g ORGUID -m MACHINEUID -- -5d\n\n# full example\nspydertop load \\\n        --organization ORGUID \\\n        --machine MACHINEUID \\\n        --duration 3m \\\n        --input cached_input_records.json.gz \\\n        --output file_to_save_to.json.gz \\\n        -- 1654303663.600901\n```\n\n## Configuration\n\nThe current configuration, and it's location on disk, can be viewed with\n\n```bash\nspydertop config get\n```\n\nSpydertop uses the Spyderbat APIs, so it must have access to a valid API key. API keys can be obtained from the API keys page under your Spyderbat account, and configured in spydertop using the `spydertop config set-secret` command:\n\n```bash\nspydertop config set-secret mysecret --api-key $(cat ./apikey.txt)\n```\n\nWhen using the `load` command, spydertop uses a *context* to determine how to load data. By default, you will have to specify the organization and source every time you start spydertop. However, you can update or create a new context to configure default values:\n\n```bash\nspydertop config set-context mycontext --secret mysecret --organization ORG_ID --source SOURCE_ID\n```\n\nYour organization id can be found in the url for the dashboard, and many other pages. Similarly, the machine id can be located in the url of an investigation, or by enabling the id column in the sources list.\n\n```url\nhttps://api.spyderbat.com/app/org/{ORG_ID_HERE}/dashboard\n```\n\nAfter creating a context, you can enable it with:\n\n```bash\nspydertop config use-context mycontext\n```\n\n## Development\n\nFor development, Spydertop can be installed with the `--editable` flag in `pip`. Spydertop works well inside of a Python virtual environment, so using one is recommended.\n\n```sh\n# in the spydertop repository:\n\n# setup development environment\npython -m venv .venv\nsource .venv/bin/activate\n\n# install spydertop for development\npip install --editable .\n```\n\nIn the virtual environment, after editing and saving a file, the `spydertop` command will automatically be updated.\n\nSee the [Project Structure](https://github.com/spyderbat/spydertop/blob/main/structure.md) for a walk through of Spydertop's code base.\n\n## Debugging\n\nIf you are using VSCode, `launch.json` is configured to run Spydertop with the python extension's debugger. This runs the module as a python file instead of through the command line, so command line arguments can be added in `__init__.py`.\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT)  Copyright (c) 2022 Spyderbat  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A tool that provides htop-like functionality for any point in time.",
    "version": "1.3.1",
    "project_urls": {
        "Docker": "https://hub.docker.com/r/spyderbat/spydertop",
        "Source": "https://github.com/spyderbat/spydertop",
        "Spyderbat": "https://www.spyderbat.com/"
    },
    "split_keywords": [
        "spydertop",
        "spyderbat",
        "htop",
        "top"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a8fbd66f566e11dcdee636451676e17fc4262a2e078dbb726720cff939d372b7",
                "md5": "8a850d05c0a4c7eec481f011902cc879",
                "sha256": "833076c7a4b0e121efd7d1d0b048e2805311f5ccb6911205dbc1f139bb9e0806"
            },
            "downloads": -1,
            "filename": "spydertop-1.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8a850d05c0a4c7eec481f011902cc879",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 92067,
            "upload_time": "2023-08-10T16:40:22",
            "upload_time_iso_8601": "2023-08-10T16:40:22.899002Z",
            "url": "https://files.pythonhosted.org/packages/a8/fb/d66f566e11dcdee636451676e17fc4262a2e078dbb726720cff939d372b7/spydertop-1.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-10 16:40:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "spyderbat",
    "github_project": "spydertop",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "spydertop"
}
        
Elapsed time: 0.10493s