community.skydive.skydive_capture – Module which manages flow capture on interfaces

Note

This plugin is part of the community.skydive collection (version 1.0.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.skydive.

To use it in a playbook, specify: community.skydive.skydive_capture.

Synopsis

  • 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

The below requirements are needed on the host that executes this module.

  • skydive-client

Parameters

Parameter Choices/Defaults Comments
capture_name
string
Default:
""
To define flow capture name.
description
string
Default:
""
Configures a text string to be associated with the instance of this object.
extra_tcp_metric
boolean
    Choices:
  • no
  • yes
To define flow capture ExtraTCPMetric.
interface_name
string
To define flow capture interface name.
ip_defrag
boolean
    Choices:
  • no
  • yes
To define flow capture IPDefrag.
layer_key_mode
string
Default:
"L2"
To define flow capture Layer KeyMode.
provider
string
A dict object containing connection details.
endpoint
string / required
Specifies the hostname/address along with the port as localhost:8082for connecting to the remote instance of SKYDIVE client over the REST API.
insecure
boolean
    Choices:
  • no
  • yes
Ignore SSL certification verification.
password
string
Specifies the password to use to authenticate the connection to the remote instance of SKYDIVE client.
ssl
boolean
    Choices:
  • no
  • yes
Specifies the ssl parameter that decides if the connection type shall be http or https.
user
string
Configures the username to use to authenticate the connection to the remote instance of SKYDIVE client.
query
string
It's the complete gremlin query which the users can input, 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.
reassemble_tcp
boolean
    Choices:
  • no
  • yes
To define flow capture ReassembleTCP.
state
string
    Choices:
  • present
  • absent
State of the flow capture. If value is present flow capture will be created else if it is absent it will be deleted.
type
string
To define flow capture interface type.

Notes

Note

  • This module must be run locally, which can be achieved by specifying connection: local.

Examples

- 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

- 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

- 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

- 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

Authors

  • Sumit Jaiswal (@sjaiswal)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/skydive/skydive_capture_module.html