Commandline interpreter to interact with Fix Inventory.
Project description
fixsh
Fix Shell
Table of contents
Overview
fixsh
starts the fix shell. It is used to interact with fixcore
. It allows you to explore the graph, find resources of interest, mark them for cleanup, fix their tagging, aggregate over their metadata to create metrics and format the output for use in a 3rd party script or system.
More information can be found below and in the docs.
Usage
fixsh
uses the following commandline arguments:
--fixcore-uri fixCORE_URI
fixcore URI (default: https://localhost:8900)
--fixcore-section fixCORE_SECTION
All queries are interpreted with this section name. If not set, the server default is used.
--fixcore-graph fixCORE_GRAPH
The name of the graph to use by default. If not set, the server default is used.
--download-directory DOWNLOAD_DIRECTORY
If files are received, they are written to this directory.
--no-color Output should be rendered plain without any color escape sequences.
--stdin Read from STDIN instead of opening a shell
--verbose, -v Verbose logging
--quiet Only log errors
--psk PSK Pre-shared key
--ca-cert CA_CERT Path to custom CA certificate file
--no-verify-certs Turn off certificate verification
ENV Prefix: fixSHELL_
Every CLI arg can also be specified using ENV variables.
For instance --fixcore-uri http://foobar.tld:8900
would become fixSHELL_fixCORE_URI=http://foobar.tld:8900
.
Examples
Basics
Enter help
into fixsh
to get an overview of all available commands
Using help
followed by a command will provide more information about that command.
Intermediate
Show all storage volumes that are in use
> search is(volume) and volume_status = in-use
Show all storage volumes in use and format the output as CSV
> search is(volume) and volume_status = in-use | format {kind},{id},{name},{ctime}
Show all storage volumes not in use with a size of more than 10 GB
> search is(volume) and volume_status = available and volume_size > 10
Advanced
Find volumes in cloud AWS that are in use
search is(volume) and volume_status = in-use and /ancestors.cloud.reported.name = aws
Alternatively instead of filtering for storage volumes of the generic volume
kind we can also be more specific
search is(aws_ec2_volume) and volume_status = in-use
Find unused AWS volumes older than 30 days with no I/O in the past 7 days
search is(aws_ec2_volume) and volume_status = available and ctime < -30d and atime < -7d and mtime < -7d
Contact
If you have any questions feel free to join our Discord or open a GitHub issue.
License
See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fixinventoryshell-4.1.0.tar.gz
.
File metadata
- Download URL: fixinventoryshell-4.1.0.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 996504dfb7d243599dadbfa17dc4224abeeb08e6ba3678ea8a756cf7b0d0361b |
|
MD5 | 26094ffc6cefc705d11f2c8077f99176 |
|
BLAKE2b-256 | fd830b4ba478d0c3dfbadf4d6b97f8c993e1c33d49840b0808a30133ccde79b0 |
File details
Details for the file fixinventoryshell-4.1.0-py3-none-any.whl
.
File metadata
- Download URL: fixinventoryshell-4.1.0-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f44a0d00c74e358ab45f4f0080355fa3d6b3e21f7534cea75e990d329b6e6852 |
|
MD5 | 23a5190d9cb8c6bef2185681a3088b5b |
|
BLAKE2b-256 | 70d9b1006e4744304ba27fdc5c0333d4e51078ee71a822f531ef2fb1d2d6d37f |