community.skydive.skydive_capture (1.0.0) — module

Module which manages flow capture on interfaces

Authors: Sumit Jaiswal (@sjaiswal)

preview | supported by network

Install collection

Install with ansible-galaxy collection install community.skydive:==1.0.0


Add to requirements.yml

  collections:
    - name: community.skydive
      version: 1.0.0

Description

This module manages flow capture on interfaces. The Gremlin expression is continuously evaluated which means that it is possible to define a capture on nodes that do not exist yet.

It is useful when you want to start a capture on all OpenvSwitch whatever the number of Skydive agents you will start.

While starting the capture, user can specify the capture name, capture description and capture type optionally.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: start a new flow capture directly from gremlin query
  community.skydive.skydive_capture:
    query: G.V().Has('Name', 'eth0', 'Type', 'device')
    state: present
    provider:
      endpoint: localhost:8082
      username: admin
      password: admin
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: stop the flow capture directly from gremlin query
  community.skydive.skydive_capture:
    query: G.V().Has('Name', 'eth0', 'Type', 'device')
    state: absent
    provider:
      endpoint: localhost:8082
      username: admin
      password: admin
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: start a new flow capture from user's input
  community.skydive.skydive_capture:
    interface_name: Node1
    type: myhost
    capture_name: test_capture
    description: test description
    extra_tcp_metric: true
    ip_defrag: true
    reassemble_tcp: true
    state: present
    provider:
      endpoint: localhost:8082
      username: admin
      password: admin
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: stop the flow capture
  community.skydive.skydive_capture:
    interface_name: Node1
    type: myhost
    capture_name: test_capture
    description: test description
    extra_tcp_metric: true
    ip_defrag: true
    reassemble_tcp: true
    state: absent
    provider:
      endpoint: localhost:8082
      username: admin
      password: admin

Inputs

    
type:
    description:
    - To define flow capture interface type.
    required: false

query:
    description:
    - It's the complete gremlin query which the users can input, I(G.V().Has('Name', 'eth0',
      'Type', 'device')), to create the capture. And, if the user directly inputs the
      gremlin query then user is not required to input any other module parameter as gremlin
      query takes care of creating the flow capture.
    required: false

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the flow capture. If value is I(present) flow capture will be created else
      if it is I(absent) it will be deleted.

provider:
    description:
    - A dict object containing connection details.
    suboptions:
      endpoint:
        description:
        - Specifies the hostname/address along with the port as C(localhost:8082)for connecting
          to the remote instance of SKYDIVE client over the REST API.
        required: true
      insecure:
        default: false
        description:
        - Ignore SSL certification verification.
        type: bool
      password:
        description:
        - Specifies the password to use to authenticate the connection to the remote instance
          of SKYDIVE client.
      ssl:
        default: false
        description:
        - Specifies the ssl parameter that decides if the connection type shall be http
          or https.
        type: bool
      user:
        description:
        - Configures the username to use to authenticate the connection to the remote
          instance of SKYDIVE client.

ip_defrag:
    default: false
    description:
    - To define flow capture IPDefrag.
    type: bool

description:
    default: ''
    description:
    - Configures a text string to be associated with the instance of this object.

capture_name:
    default: ''
    description:
    - To define flow capture name.
    required: false

interface_name:
    description:
    - To define flow capture interface name.
    required: false

layer_key_mode:
    default: L2
    description:
    - To define flow capture Layer KeyMode.
    type: str

reassemble_tcp:
    default: false
    description:
    - To define flow capture ReassembleTCP.
    type: bool

extra_tcp_metric:
    default: false
    description:
    - To define flow capture ExtraTCPMetric.
    type: bool