Skip to main content

InfraSonar Toolkit

Project description

CI Release Version

The InfraSonar tool can be used to manage assets for a container. The tool has two main features. One is to read all assets from a container to YAML output. If needed, all collector and label information can be included. The other feature of this tool is to apply a YAML file to InfraSonar. These two features combined allow you to easily add new assets as well as managing existing assets for a container.

Installation

Using pip:

pip install infrasonar

Or, clone this project and use the setup

python setup.py install

Apply assets

Create a yaml file, for example: assets.yaml (you may also use get-assets to export the current assets and make modifications)

labels:
  windows: 3257

configs:
  tcp:
    checkCertificatePorts: [443, 995, 993, 465, 3389, 989, 990, 636, 5986]

assets:
- name: foo.local
  kind: Windows
  labels: ["windows"]
  collectors:
  - key: lastseen
  - key: ping
  - key: tcp
    config: tcp
  - key: wmi

Next, use the following command to apply the assets: (-a will only add labels and collectors, -d performs a dry-run without actually applying the changes)

infrasonar apply-assets assets.yaml -a -d

The script will create a new asset if an asset with the given name cannot be found, otherwise it will apply the changes to the existing asset. Existing labels and/or collectors will not be removed, but a kind will be overwritten if one is given. The properties kind, description, mode, labels and collectors are all optional.

Token

A token might be included in the yaml file:

token: xxxxxx

Or, it will be asked in a prompt when starting the script.

:point_right: Note that a token with Agent flags must be used for the apply-assets action to work. A container token is required when no container Id is given or when one or more assets without an asset Id are used.

Get assets

Get container assets. (in the example below, 123 is a container Id)

infrasonar get-assets 123 -o yaml

Help

infrasonar -h
infrasonar get-assets -h
infrasonar apply-assets -h

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

infrasonar-0.1.7.tar.gz (25.6 kB view hashes)

Uploaded Source

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