cisco.mso.ndo_tenant_span_session module – Manage Tenant SPAN Sessions on Cisco Nexus Dashboard Orchestrator (NDO).
Note
This module is part of the cisco.mso collection (version 2.11.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 cisco.mso
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: cisco.mso.ndo_tenant_span_session
.
New in cisco.mso 2.11.0
Synopsis
Manage Switched Port Analyzer (SPAN) Sessions on Cisco Nexus Dashboard Orchestrator (NDO).
This module is only supported on ND v3.1 (NDO v4.3) and later.
Requirements
The below requirements are needed on the host that executes this module.
Multi Site Orchestrator v2.1 or newer
Parameters
Parameter |
Comments |
---|---|
The administrative state of the SPAN Session. Defaults to Choices:
|
|
The description of the SPAN Session. |
|
The destination EPG configuration group. |
|
The destination IP address to route SPAN Session packets. |
|
The DSCP value for sending the monitored SPAN Session packets. Defaults to Choices:
|
|
Enforce the SPAN Session version defined in Defaults to true when unset during creation. Choices:
|
|
The destination EPG to use for the SPAN Session. This parameter or |
|
The name of the ANP that contains the destination EPG. This parameter or |
|
The UUID of the ANP that contains the destination EPG. This parameter or |
|
The name of the destination EPG. |
|
The name of the schema that contains the destination EPG. This parameter or |
|
The ID of the schema that contains the destination EPG. This parameter or |
|
The name of the template that contains the destination EPG. This parameter or |
|
The ID of the that contains the destination EPG. This parameter or |
|
The UUID of the destination EPG to use for the SPAN Session. This parameter or |
|
The flow ID of the SPAN Session packets. The value must be in the range 1 - 1023. Defaults to 1 when unset during creation. |
|
The prefix used to assign source IP addresses to ERSPAN packets which can be used to identify which Leaf or Spine is sending the traffic. This can be any IP. If the prefix is used, the node ID of the source node is used for the undefined bits of the prefix. |
|
The version of the SPAN Session. Defaults to Choices:
|
|
The time to live (TTL) of the SPAN Session packets. The value must be in the range 1 - 1023. Defaults to 1 when unset during creation. |
|
IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable |
|
The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable When using a HTTPAPI connection plugin the inventory variable |
|
The MTU truncation size for the SPAN packets. The value must be in the range 64 - 9216. Defaults to 1518 when unset during creation. |
|
The name of the SPAN Session. |
|
Influence the output of this MSO module.
If the value is not specified in the task, the value of environment variable Choices:
|
|
The password to use for authentication. If the value is not specified in the task, the value of environment variables |
|
Port number to be used for the REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable |
|
The SPAN Session sources. Providing a new list of Providing an empty list will remove the |
|
The direction of the SPAN Session source. Choices:
|
|
The EPG to use for the SPAN Session source. This parameter or |
|
The name of the Application Profile (ANP) that contains the source EPG. This parameter or |
|
The UUID of the ANP that contains the source EPG. This parameter or |
|
The name of the source EPG. |
|
The name of the schema that contains the source EPG. This parameter or |
|
The ID of the schema that contains the source EPG. This parameter or |
|
The name of the template that contains the source EPG. This parameter or |
|
The ID of the template that contains the source EPG. This parameter or |
|
The UUID of the source Endpoint Group (EPG) to use for the SPAN Session. This parameter or |
|
The name of the SPAN Session source. |
|
Use Use Use Choices:
|
|
The name of the template. The template must be a Tenant Monitoring Policy template. This parameter or |
|
The ID of the template. The template must be a Tenant Monitoring Policy template. This parameter or |
|
The socket level timeout in seconds. The default value is 30 seconds. If the value is not specified in the task, the value of environment variable |
|
If If the value is not specified in the task, the value of environment variable The default is Choices:
|
|
If If the value is not specified in the task, the value of environment variable When using a HTTPAPI connection plugin the inventory variable The default is Choices:
|
|
The username to use for authentication. If the value is not specified in the task, the value of environment variables |
|
The UUID of the SPAN Session. This parameter is required when the |
|
If This should only set to If the value is not specified in the task, the value of environment variable The default is Choices:
|
Notes
Note
The
template
,destination_epg.epg
andsources.epg
must exist before using this module in your playbook. Use cisco.mso.ndo_template to create the Tenant Monitoring Policy template. Use cisco.mso.mso_schema_template_anp_epg to create the EPGs.This module was written to support Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions.
See Also
See also
- cisco.mso.ndo_template
Manage Templates on Cisco Nexus Dashboard Orchestrator (NDO).
- cisco.mso.mso_schema_template_anp_epg
Manage Endpoint Groups (EPGs) in schema templates.
Examples
- name: Create a new SPAN Session
cisco.mso.ndo_tenant_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: monitoring_tenant_template
name: span_session_1
sources:
- name: source_1
epg_uuid: '{{ query_epg_1.current.uuid }}'
direction: both
- name: source_2
direction: outgoing
epg:
name: epg_2
anp: anp_1
template: template_1
schema: schema_1
admin_state: enabled
mtu: 9216
destination_epg:
epg:
name: epg_3
anp: anp_1
template: template_1
schema: schema_1
destination_ip: 10.1.1.1
source_ip_prefix: 10.1.1.1/24
span_version: v1
enforce_span_version: false
flow_id: 15
ttl: 128
dscp: af11
state: present
register: create_span_session_1
- name: Update the name of the SPAN Session using UUID
cisco.mso.ndo_tenant_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template_id: "{{ create_monitoring_tenant.current.templateId }}"
uuid: "{{ create_span_session_1.current.uuid }}"
name: span_session_1_updated
state: present
register: update_span_session_1
- name: Query an existing SPAN Session using UUID
cisco.mso.ndo_tenant_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: monitoring_tenant_template
uuid: "{{ create_span_session_1.current.uuid }}"
state: query
register: query_with_uuid
- name: Query an existing SPAN Session using name
cisco.mso.ndo_tenant_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: monitoring_tenant_template
name: span_session_1_updated
state: query
register: query_with_name
- name: Query all SPAN Sessions
cisco.mso.ndo_tenant_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: monitoring_tenant_template
state: query
register: query_all
- name: Remove all sources from a SPAN Session
cisco.mso.ndo_tenant_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: monitoring_tenant_template
name: span_session_1_updated
sources: []
state: present
- name: Delete an existing SPAN Session using UUID
cisco.mso.ndo_tenant_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: monitoring_tenant_template
uuid: "{{ create_span_session_1.current.uuid }}"
state: absent
- name: Delete an existing SPAN Session using Name
cisco.mso.ndo_tenant_span_session:
host: mso_host
username: admin
password: SomeSecretPassword
template: monitoring_tenant_template
name: span_session_1_updated
state: absent