Step 1 |
Enable the telemetry feature.
{
"fmEntity" : {
"children" : [{
"fmTelemetry" : {
"attributes" : {
"adminSt" : "enabled"
}
}
}
]
}
}
|
The root element is fmTelemetry and the base path for this element is sys/fm . Configure the adminSt attribute as enabled .
|
Step 2 |
Create the root level of the JSON payload to describe the telemetry configuration.
{
"telemetryEntity": {
"attributes": {
"dn": "sys/tm"
},
}
}
|
The root element is telemetryEntity and the base path for this element is sys/tm . Configure the dn
attribute as sys/tm .
|
Step 3 |
Create a sensor group to contain the defined sensor paths.
"telemetrySensorGroup": {
"attributes": {
"id": "10",
"rn": "sensor-10"
}, "children": [{
}]
}
|
A telemetry sensor group is defined in an object of class telemetrySensorGroup . Configure the following attributes of the object:
Children of the sensor group object will include sensor paths and one or more relation objects (telemetryRtSensorGroupRel ) to associate the sensor group with a telemetry subscription.
|
Step 4 |
Define a telemetry destination group.
{
"telemetryDestGroup": {
"attributes": {
"id": "20"
}
}
}
|
A telemetry destination group is defined in telemetryEntity . Configure the id attribute.
|
Step 5 |
Define a telemetry destination profile.
{
"telemetryDestProfile": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetryDestOptSourceInterface": {
"attributes": {
"name": "lo0"
}
}
}
]
}
}
|
A telemetry destination profile is defined in telemetryDestProfile .
-
Configure the adminSt attribute as enabled .
-
Under telemetryDestOptSourceInterface , configure the name attribute with an interface name to stream data from the configured interface to a destination with the source IP address.
|
Step 6 |
Define one or more telemetry destinations, consisting of an IP address and port number to which telemetry data will be sent.
{
"telemetryDest": {
"attributes": {
"addr": "1.2.3.4",
"enc": "GPB",
"port": "50001",
"proto": "gRPC",
"rn": "addr-[1.2.3.4]-port-50001"
}
}
}
|
A telemetry destination is defined in an object of class telemetryDest . Configure the following attributes of the object:
-
addr — The IP address of the destination.
-
port — The port number of the destination.
-
rn — The relative name of the destination object in the format: path-[path] .
-
enc — The encoding type of the telemetry data to be sent. NX-OS supports:
-
proto — The transport protocol type of the telemetry data to be sent. NX-OS supports:
|
Step 7 |
Create a telemetry subscription to configure the telemetry behavior.
"telemetrySubscription": {
"attributes": {
"id": "30",
"rn": "subs-30"
}, "children": [{
}]
}
|
A telemetry subscription is defined in an object of class telemetrySubscription . Configure the following attributes of the object:
Children of the subscription object will include relation objects for sensor groups (telemetryRsSensorGroupRel ) and destination groups (telemetryRsDestGroupRel ).
|
Step 8 |
Add the sensor group object as a child object to the telemetrySubscription
element under the root element (telemetryEntity ).
{
"telemetrySubscription": {
"attributes": {
"id": "30"
}
"children": [{
"telemetryRsSensorGroupRel": {
"attributes": {
"sampleIntvl": "5000",
"tDn": "sys/tm/sensor-10"
}
}
}
]
}
}
|
|
Step 9 |
Create a relation object as a child object of the subscription to associate the subscription to the telemetry sensor group
and to specify the data sampling behavior.
"telemetryRsSensorGroupRel": {
"attributes": {
"rType": "mo",
"rn": "rssensorGroupRel-[sys/tm/sensor-10]",
"sampleIntvl": "5000",
"tCl": "telemetrySensorGroup",
"tDn": "sys/tm/sensor-10",
"tType": "mo"
}
}
|
The relation object is of class telemetryRsSensorGroupRel and is a child object of telemetrySubscription . Configure the following attributes of the relation object:
-
rn — The relative name of the relation object in the format: rssensorGroupRel-[sys/tm/sensor-group-id] .
-
sampleIntvl — The data sampling period in milliseconds. An interval value of 0 creates an event-based subscription, in which telemetry
data is sent only upon changes under the specified MO. An interval value greater than 0 creates a frequency-based subscription,
in which telemetry data is sent periodically at the specified interval. For example, an interval value of 15000 results in
the sending of telemetry data every 15 seconds.
-
tCl — The class of the target (sensor group) object, which is telemetrySensorGroup .
-
tDn — The distinguished name of the target (sensor group) object, which is sys/tm/sensor-group-id .
-
rType — The relation type, which is mo for managed object.
-
tType — The target type, which is mo for managed object.
|
Step 10 |
Define one or more sensor paths or nodes to be monitored for telemetry.
Single sensor path
{
"telemetrySensorPath": {
"attributes": {
"path": "sys/cdp",
"rn": "path-[sys/cdp]",
"excludeFilter": "",
"filterCondition": "",
"path": "sys/fm/bgp",
"secondaryGroup": "0",
"secondaryPath": "",
"depth": "0"
}
}
}
Multiple sensor paths
{
"telemetrySensorPath": {
"attributes": {
"path": "sys/cdp",
"rn": "path-[sys/cdp]",
"excludeFilter": "",
"filterCondition": "",
"path": "sys/fm/bgp",
"secondaryGroup": "0",
"secondaryPath": "",
"depth": "0"
}
}
},
{
"telemetrySensorPath": {
"attributes": {
"excludeFilter": "",
"filterCondition": "",
"path": "sys/fm/dhcp",
"secondaryGroup": "0",
"secondaryPath": "",
"depth": "0"
}
}
}
Single sensor path filtering for BGP disable events:
{
"telemetrySensorPath": {
"attributes": {
"path": "sys/cdp",
"rn": "path-[sys/cdp]",
"excludeFilter": "",
"filterCondition": "eq(fmBgp.operSt.\"disabled\")",
"path": "sys/fm/bgp",
"secondaryGroup": "0",
"secondaryPath": "",
"depth": "0"
}
}
}
|
A sensor path is defined in an object of class telemetrySensorPath . Configure the following attributes of the object:
|
Step 11 |
Add sensor paths as child objects to the sensor group object (telemetrySensorGroup ).
|
|
Step 12 |
Add destinations as child objects to the destination group object (telemetryDestGroup ).
|
|
Step 13 |
Add the destination group object as a child object to the root element (telemetryEntity ).
|
|
Step 14 |
Create a relation object as a child object of the telemetry sensor group to associate the sensor group to the subscription.
"telemetryRtSensorGroupRel": {
"attributes": {
"rn": "rtsensorGroupRel-[sys/tm/subs-30]",
"tCl": "telemetrySubscription",
"tDn": "sys/tm/subs-30"
}
}
|
The relation object is of class telemetryRtSensorGroupRel and is a child object of telemetrySensorGroup . Configure the following attributes of the relation object:
-
rn — The relative name of the relation object in the format: rtsensorGroupRel-[sys/tm/subscription-id] .
-
tCl — The target class of the subscription object, which is telemetrySubscription .
-
tDn — The target distinguished name of the subscription object, which is sys/tm/subscription-id .
|
Step 15 |
Create a relation object as a child object of the telemetry destination group to associate the destination group to the subscription.
"telemetryRtDestGroupRel": {
"attributes": {
"rn": "rtdestGroupRel-[sys/tm/subs-30]",
"tCl": "telemetrySubscription",
"tDn": "sys/tm/subs-30"
}
}
|
The relation object is of class telemetryRtDestGroupRel and is a child object of telemetryDestGroup . Configure the following attributes of the relation object:
-
rn — The relative name of the relation object in the format: rtdestGroupRel-[sys/tm/subscription-id] .
-
tCl — The target class of the subscription object, which is telemetrySubscription .
-
tDn — The target distinguished name of the subscription object, which is sys/tm/subscription-id .
|
Step 16 |
Create a relation object as a child object of the subscription to associate the subscription to the telemetry destination
group.
"telemetryRsDestGroupRel": {
"attributes": {
"rType": "mo",
"rn": "rsdestGroupRel-[sys/tm/dest-20]",
"tCl": "telemetryDestGroup",
"tDn": "sys/tm/dest-20",
"tType": "mo"
}
}
|
The relation object is of class telemetryRsDestGroupRel and is a child object of telemetrySubscription . Configure the following attributes of the relation object:
-
rn — The relative name of the relation object in the format: rsdestGroupRel-[sys/tm/destination-group-id] .
-
tCl — The class of the target (destination group) object, which is telemetryDestGroup .
-
tDn — The distinguished name of the target (destination group) object, which is sys/tm/destination-group-id .
-
rType — The relation type, which is mo for managed object.
-
tType — The target type, which is mo for managed object.
|
Step 17 |
Send the resulting JSON structure as an HTTP/HTTPS POST payload to the NX-API endpoint for telemetry configuration.
|
The base path for the telemetry entity is sys/tm and the NX-API endpoint is:
{{URL}}/api/node/mo/sys/tm.json
|