cisco.nxos.nxos_telemetry – TELEMETRY resource module
Note
This plugin is part of the cisco.nxos collection (version 2.8.2).
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.nxos
.
To use it in a playbook, specify: cisco.nxos.nxos_telemetry
.
New in version 1.0.0: of cisco.nxos
Synopsis
Manages Telemetry Monitoring Service (TMS) configuration
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
---|---|
The provided configuration |
|
Certificate SSL/TLS and hostname values. Value must be a dict defining values for keys (key and hostname). |
|
Certificate hostname |
|
Certificate key |
|
Destination profile compression method. Choices:
|
|
List of telemetry destination groups. |
|
Group destination ipv4, port, protocol and encoding values. Value must be a dict defining values for keys (ip, port, protocol, encoding). |
|
Destination group encoding. Choices:
|
|
Destination group IP address. |
|
Destination group port number. |
|
Destination group protocol. Choices:
|
|
Destination group identifier. Value must be a int representing the destination group identifier. |
|
List of telemetry sensor groups. |
|
Telemetry data source. Choices:
|
|
Sensor group identifier. Value must be a int representing the sensor group identifier. |
|
Telemetry sensor path. Value must be a dict defining values for keys (name, depth, filter_condition, query_condition). Mandatory Keys (name) Optional Keys (depth, filter_condition, query_condition) |
|
Sensor group depth. |
|
Sensor group filter condition. |
|
Sensor group path name. |
|
Sensor group query condition. |
|
Destination profile source interface. Valid value is a str representing the source interface name. |
|
List of telemetry subscriptions. |
|
Associated destination group. |
|
Subscription identifier. Value must be a int representing the subscription identifier. |
|
Associated sensor group. Value must be a dict defining values for keys (id, sample_interval). |
|
Associated sensor group id. |
|
Associated sensor group id sample interval. |
|
Destination profile vrf. Valid value is a str representing the vrf name. |
|
Final configuration state Choices:
|
Examples
# Using deleted
# This action will delete all telemetry configuration on the device
- name: Delete Telemetry Configuration
cisco.nxos.nxos_telemetry:
state: deleted
# Using merged
# This action will merge telemetry configuration defined in the playbook with
# telemetry configuration that is already on the device.
- name: Merge Telemetry Configuration
cisco.nxos.nxos_telemetry:
config:
certificate:
key: /bootflash/server.key
hostname: localhost
compression: gzip
source_interface: Ethernet1/1
vrf: management
destination_groups:
- id: 2
destination:
ip: 192.168.0.2
port: 50001
protocol: gPRC
encoding: GPB
- id: 55
destination:
ip: 192.168.0.55
port: 60001
protocol: gPRC
encoding: GPB
sensor_groups:
- id: 1
data_source: NX-API
path:
name: '"show lldp neighbors detail"'
depth: 0
- id: 55
data_source: DME
path:
name: sys/ch
depth: unbounded
filter_condition: ne(eqptFt.operSt,"ok")
subscriptions:
- id: 5
destination_group: 55
sensor_group:
id: 1
sample_interval: 1000
- id: 6
destination_group: 2
sensor_group:
id: 55
sample_interval: 2000
state: merged
# Using replaced
# This action will replace telemetry configuration on the device with the
# telemetry configuration defined in the playbook.
- name: Override Telemetry Configuration
cisco.nxos.nxos_telemetry:
config:
certificate:
key: /bootflash/server.key
hostname: localhost
compression: gzip
source_interface: Ethernet1/1
vrf: management
destination_groups:
- id: 2
destination:
ip: 192.168.0.2
port: 50001
protocol: gPRC
encoding: GPB
subscriptions:
- id: 5
destination_group: 55
state: replaced
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The configuration as structured data after module completion. Returned: when changed Sample: “The configuration returned will always be in the same format\n of the parameters above.\n” |
|
The configuration as structured data prior to module invocation. Returned: always Sample: “The configuration returned will always be in the same format\n of the parameters above.\n” |
|
The set of commands pushed to the remote device. Returned: always Sample: [“command 1”, “command 2”, “command 3”] |
Authors
Mike Wiebe (@mikewiebe)