Skip to main content

InfraSonar Toolkit

Project description

CI Release Version

Installation

Using pip:

pip install infrasonar

Or, clone this project and use the setup

python setup.py install

Upsert assets

Create a yaml file, for example: assets.yaml

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 upsert the assets: (-v for verbose output)

infrasonar upsert-assets assets.yaml -v

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, 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 container token with Agent flags must be used for the upsert-assets action to work!

Get assets

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

infrasonar get-assets 123 -o yaml

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.1.tar.gz (19.3 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