Telemetry-Netconf
Telemetry
Section titled “Telemetry”Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /telemetry-client | Y | — | — |
| /telemetry-client/destination-group/{name} | Y | merge, replace, create, delete | — |
| /telemetry-client/destination-group/{name}/destination/{ip}/{port} | Y | merge, replace, create, delete | — |
| /telemetry-client/global | Y | merge, create | — |
| /telemetry-client/subscription/{name} | Y | merge, replace, create, delete | — |
| /telemetry-client/subscription/{name}/paths/{sub-path} | Y | delete | — |
| delete-client | — | — | Y |
Examples
Section titled “Examples”This chapter provides examples on how to use Netconf to manage Telemetry configurations on AsterNOS devices.
Get Telemetry Client Configuration
Section titled “Get Telemetry Client Configuration”Request example
<filter type="subtree"><top> <telemetry-client/></top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b04f002d-3312-45ca-8bf4-aadc641b1ec0"> <data> <top> <telemetry-client xmlns="http://asterfusion.com/ns/yang/asternos-telemetry"> <destination-group> <name>None</name> </destination-group> <destination-group> <name>test</name> <destination> <ip>1.1.1.1</ip> <port>1</port> </destination> <destination> <ip>2.2.2.2</ip> <port>2</port> </destination> <destination> <ip>3.3.3.3</ip> <port>3</port> </destination> </destination-group> <destination-group> <name>test1</name> <destination> <ip>4.4.4.4</ip> <port>4</port> </destination> <destination> <ip>5.5.5.5</ip> <port>5</port> </destination> <destination> <ip>6.6.6.6</ip> <port>6</port> </destination> </destination-group> <subscription> <name>None</name> </subscription> <subscription> <name>test</name> <dst-group>test</dst-group> <sensor-target>COUNTERS_DB</sensor-target> <report-interval>5000</report-interval> <report-type>stream</report-type> <paths> <sub-path>COUNTERS/Ethernet*</sub-path> </paths> </subscription> <subscription> <name>test1</name> <dst-group>test</dst-group> <sensor-target>OTHERS</sensor-target> <report-interval>5000</report-interval> <report-type>periodic</report-type> <paths> <sub-path>osversion/build</sub-path> </paths> <paths> <sub-path>proc/uptime</sub-path> </paths> </subscription> <subscription> <name>test2</name> <dst-group>test1</dst-group> <sensor-target>STATE_DB</sensor-target> <report-interval>5000</report-interval> <report-type>stream</report-type> <paths> <sub-path>proc/parts_stat</sub-path> </paths> <paths> <sub-path>port/port_stat</sub-path> </paths> </subscription> </telemetry-client> </top> </data></rpc-reply>Get Specific Destination Group
Section titled “Get Specific Destination Group”Request example
<filter type="subtree"> <top> <telemetry-client> <destination-group> <name>test</name> </destination-group> </telemetry-client> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b04f002d-3312-45ca-8bf4-aadc641b1ec0"> <data> <top> <telemetry-client xmlns="http://asterfusion.com/ns/yang/asternos-telemetry"> <destination-group> <name>test</name> <destination> <ip>1.1.1.1</ip> <port>1</port> </destination> <destination> <ip>2.2.2.2</ip> <port>2</port> </destination> <destination> <ip>3.3.3.3</ip> <port>3</port> </destination> </destination-group> </telemetry-client> </top> </data></rpc-reply>Get Specific Subscription
Section titled “Get Specific Subscription”Request example
<filter type="subtree"><top> <telemetry-client><subscription> <name>test</name> </subscription></telemetry-client></top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b04f002d-3312-45ca-8bf4-aadc641b1ec0"> <data> <top> <telemetry-client xmlns="http://asterfusion.com/ns/yang/asternos-telemetry"> <subscription> <name>test</name> <dst-group>test</dst-group> <sensor-target>COUNTERS_DB</sensor-target> <report-interval>5000</report-interval> <report-type>stream</report-type> <paths> <sub-path>COUNTERS/Ethernet*</sub-path> </paths> </subscription> </telemetry-client> </top> </data></rpc-reply>Create Destination Group
Section titled “Create Destination Group”Request example
<config><top><telemetry-client><destination-group operation="create"> <name>TestCreate</name> <destination><ip>11.11.11.11</ip><port>1</port></destination> <destination><ip>22.22.22.22</ip><port>11</port></destination></destination-group></telemetry-client></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f20f182e-f568-49d0-ad82-aaac24244f74"> <ok/></rpc-reply>Create Subscription
Section titled “Create Subscription”Request example
<config><top><telemetry-client> <subscription operation="create"> <name>CreateTest</name> <dst-group>test</dst-group> <sensor-target>STATE_DB</sensor-target> <paths> <sub-path>proc/parts_stat</sub-path> </paths> <report-interval>5000</report-interval> </subscription></telemetry-client></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f20f182e-f568-49d0-ad82-aaac24244f74"> <ok/></rpc-reply>Create Subscription without Destination Group
Section titled “Create Subscription without Destination Group”Request example
<config><top><telemetry-client> <subscription operation="create"> <name>CreateTest</name> <sensor-target>STATE_DB</sensor-target> <paths> <sub-path>proc/parts_stat</sub-path> </paths> <report-interval>5000</report-interval> </subscription></telemetry-client></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f20f182e-f568-49d0-ad82-aaac24244f74"> <ok/></rpc-reply>Modify Destination Group
Section titled “Modify Destination Group”Request example to modify destination group via edit-config.
<config><top> <telemetry-client><destination-group operation="merge"> <name>test</name> <destination><ip>12.34.56.78</ip><port>8081</port></destination> </destination-group></telemetry-client></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f20f182e-f568-49d0-ad82-aaac24244f74"> <ok/></rpc-reply>Modify Subscription
Section titled “Modify Subscription”Request example
<config><top> <telemetry-client><subscription operation="merge"> <name>test</name> <dst-group>None</dst-group> <sensor-target>STATE_DB</sensor-target> <paths> <sub-path>proc/parts_stat</sub-path> </paths> <report-interval>10000</report-interval> </subscription></telemetry-client></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f20f182e-f568-49d0-ad82-aaac24244f74"> <ok/></rpc-reply>Delete Destination Group
Section titled “Delete Destination Group”Request example to delete destination group via edit-config.
<config><top> <telemetry-client><destination-group operation="delete"> <name>test</name> </destination-group></telemetry-client></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a4170319-d410-44bc-86da-7461fc38c790"> <ok/></rpc-reply>Delete Subscription
Section titled “Delete Subscription”Request example to delete subscription via edit-config.
<config><top> <telemetry-client><subscription operation="delete"> <name>test</name> </subscription></telemetry-client></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a4170319-d410-44bc-86da-7461fc38c790"> <ok/></rpc-reply>Properties Descriptions
Section titled “Properties Descriptions”Telemetry Client
Section titled “Telemetry Client”Tree Diagram
module: asternos-telemetry +--rw telemetry-client +--rw global | +--ro encoding? enumeration | +--ro retry-interval? uint16 | +--ro src-ip? inet:ip-address-no-zone | +--ro unidirectional? boolean +--rw destination-group* [name] | +--rw name string | +--rw destination* [ip port] | +--rw ip inet:ip-address-no-zone | +--rw port uint16 +--rw subscription* [name] +--rw name string +--rw dst-group? -> /telemetry-client/destination-group/name +--rw sensor-target? enumeration +--rw paths* [sub-path] | +--rw sub-path string +--rw report-interval? uint32 +--rw report-type? enumerationTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| telemetry-client | M | Path-only node, has no configurable value. | |
| global | M | Path-only node, has no configurable value. | |
| encoding | RO | ”JSON" "GPB” | encoding method Default value: JSON |
| retry-interval | RO | integer | time interval to retry Default value: 30 |
| src-ip | RO | inet:ip-address-no-zone | source ip address |
| unidirectional | RO | ”true" "false” | unidirectional link to remote Default value: True |
| destination-group | M | Path-only node, has no configurable value. | |
| name | O | string | name of destination group |
| destination | M | Path-only node, has no configurable value. one destination-group contain multiple destination | |
| ip | O | inet:ip-address-no-zone | destination ip address |
| port | O | 1..65535 | destination port |
| subscription | M | Path-only node, has no configurable value. | |
| name | O | string | name of subscription |
| dst-group | O | → leafref | name of destination group to subscribe |
| sensor-target | O | ”COUNTERS_DB" "STATE_DB" "OTHERS” | sensor target to report |
| paths | M | Path-only node, has no configurable value. | |
| sub-path | O | string | sensor path to report |
| report-interval | O | 100..1800000 | report interval |
| report-type | O | ”periodic" "stream” | report type |
Destination Group
Section titled “Destination Group”Tree Diagram
module: asternos-telemetry +--rw telemetry-client +--rw destination-group* [name] +--rw name string +--rw destination* [ip port] +--rw ip inet:ip-address-no-zone +--rw port uint16Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| destination-group | M | Path-only node, has no configurable value. | |
| name | O | string | name of destination group |
| destination | M | Path-only node, has no configurable value. one destination-group contain multiple destination | |
| ip | O | inet:ip-address-no-zone | destination ip address |
| port | O | 1..65535 | destination port |
one destination-group contain multiple destination
Section titled “one destination-group contain multiple destination”Tree Diagram
module: asternos-telemetry +--rw telemetry-client +--rw destination-group* [name] +--rw destination* [ip port] +--rw ip inet:ip-address-no-zone +--rw port uint16Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| destination | M | Path-only node, has no configurable value. one destination-group contain multiple destination | |
| ip | O | inet:ip-address-no-zone | destination ip address |
| port | O | 1..65535 | destination port |
Global
Section titled “Global”Tree Diagram
module: asternos-telemetry +--rw telemetry-client +--rw global +--ro encoding? enumeration +--ro retry-interval? uint16 +--ro src-ip? inet:ip-address-no-zone +--ro unidirectional? booleanTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| global | M | Path-only node, has no configurable value. | |
| encoding | RO | ”JSON" "GPB” | encoding method Default value: JSON |
| retry-interval | RO | integer | time interval to retry Default value: 30 |
| src-ip | RO | inet:ip-address-no-zone | source ip address |
| unidirectional | RO | ”true" "false” | unidirectional link to remote Default value: True |
Subscription
Section titled “Subscription”Tree Diagram
module: asternos-telemetry +--rw telemetry-client +--rw subscription* [name] +--rw name string +--rw dst-group? -> /telemetry-client/destination-group/name +--rw sensor-target? enumeration +--rw paths* [sub-path] | +--rw sub-path string +--rw report-interval? uint32 +--rw report-type? enumerationTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| subscription | M | Path-only node, has no configurable value. | |
| name | O | string | name of subscription |
| dst-group | O | → leafref | name of destination group to subscribe |
| sensor-target | O | ”COUNTERS_DB" "STATE_DB" "OTHERS” | sensor target to report |
| paths | M | Path-only node, has no configurable value. | |
| sub-path | O | string | sensor path to report |
| report-interval | O | 100..1800000 | report interval |
| report-type | O | ”periodic" "stream” | report type |
Tree Diagram
module: asternos-telemetry +--rw telemetry-client +--rw subscription* [name] +--rw paths* [sub-path] +--rw sub-path stringTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| paths | M | Path-only node, has no configurable value. | |
| sub-path | O | string | sensor path to report |
Delete Client
Section titled “Delete Client”Tree Diagram
module: asternos-telemetry
rpcs: +---x delete-clientTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| delete-client | O |