brianaddicks.adx.ingest (1.0.2) — module

Ingest local json file into Azure Data Explorer table.

| "added in version" 1.0.0 of brianaddicks.adx"

Authors: Brian Addicks (@brianaddicks)

Install collection

Install with ansible-galaxy collection install brianaddicks.adx:==1.0.2


Add to requirements.yml

  collections:
    - name: brianaddicks.adx
      version: 1.0.2

Description

Ingest local json file into Azure Data Explorer table.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Pass in a message
- name: Ingest data to ADX
  ingest:
    cluster_ingest_uri: https://ingest-myadx.region.kusto.windows.net
    client_id: aaaabbbb-cccc-dddd-1111-222233334444
    client_secret: '{{ my_super_secret }}'
    tenant_id: contoso.onmicrosoft.com
    database_name: testdb
    table_name: testtable
    ingest_mapping_name: testtable_mapping
    cluster_uri: https://myadx.region.kusto.windows.net
    json_file: ./ingest.json
    table_schema: "(MyColumn:datetime, MyColumn2: dynamic)"

Inputs

    
client_id:
    description:
    - Client ID used to authenticate ot adx
    - 'ie: aaaabbbb-cccc-dddd-1111-222233334444'
    - Required if environment variable ADX_CLIENT_ID is not set
    required: false
    type: str

json_file:
    description:
    - path to json file to import
    required: true
    type: str

tenant_id:
    description:
    - Azure Tenant ID
    - 'ie: contoso.onmicrosoft.com'
    - Required if environment variables ADX_TENANT_ID is not set
    required: false
    type: str

table_name:
    description:
    - ADX table name
    required: true
    type: str

cluster_uri:
    description:
    - ADX Cluster URI
    - 'ie: https://myadx.region.kusto.windows.net'
    - Required if environment variable ADX_CLUSTER_URI is not set
    required: false
    type: str

table_schema:
    description:
    - ADX table schema
    - 'ie: (MyColumn:datetime, MyColumn2: dynamic)'
    required: true
    type: str

client_secret:
    description:
    - Secret associated with Client ID
    - Required if environment variables ADX_CLIENT_SECRET is not set
    required: false
    type: str

database_name:
    description:
    - ADX database name
    required: true
    type: str

cluster_ingest_uri:
    description:
    - ADX Cluster URI
    - 'ie: https://ingest-myadx.region.kusto.windows.net'
    - Required if environment variable ADX_CLUSTER_INGEST_URI is not set
    required: false
    type: str

ingest_mapping_name:
    description:
    - Name of existing ingest mapping
    required: true
    type: str