Configuring Telemetry Static Subscription
Telemetry static subscription indicates that a device functioning as a client initiates a connection to a collector functioning as a server to send data collected.
Usage Scenario
The controller uses commands to configure devices that support Telemetry, subscribe to data sources, and collect data. The protocol used to send data can be gRPC or UDP.
If the connection between a device and the collection is interrupted, the device connects to the collector and sends data again. However, the data sampled when the connection is being re-established is lost.
After an active/standby switchover is performed or the system saves Telemetry service configurations and restarts, the Telemetry service reloads its configurations and continues to run. However, the data sampled during the restart or active/standby switchover is lost. This poses high pressure on devices. Therefore, Telemetry static subscription is often used for coarse-grained data collection.
- Configuring a Destination Collector
When you configure Telemetry static subscription to the data sampled or a customized event, you need to create a destination group and specify a destination collector to which the data is sent. - Configuring the Data to Be Sampled or a Customized Event
When you configure Telemetry static subscription to the data sampled or a customized event, you need to create a sampling sensor group and specify a sampling path and filter criteria. - Creating a Subscription
When you configure Telemetry static subscription to the data sampled or a customized event, you need to create a subscription to associate the configured destination group with the configured sampling sensor group so that data can be sent to the collector. - Verifying the Telemetry Configuration
After configuring Telemetry static subscription to the data sampled or a customized event, check information about the sampling sensor group, destination group, and subscription.
Configuring a Destination Collector
When you configure Telemetry static subscription to the data sampled or a customized event, you need to create a destination group and specify a destination collector to which the data is sent.
Context
When static subscription is configured, a device functions as a client and a collector functions as a server. To statically subscribe to the data sampled or a customized event, you need to configure the IP address and port number of a destination collector, and the protocol and encryption mode for data sending.
Procedure
- Run system-view
The system view is displayed.
- Run telemetry
The Telemetry view is displayed.
- Run destination-group destination-name
A destination group to which the data sampled is sent is created, and the Destination-group view is displayed.
- Run ipv4-address ip-address port port [ vpn-instance vpn-instance ] [ protocol { grpc [ no-tls ] | udp } ]
An IP address and a port number are configured for the destination collector, and a protocol and an encryption mode are configured for data sending.
NOTE:
This command can be run for no more than five times for each destination group.
Both this command and the protocol command in the Subscription view can be run to configure a protocol and encryption mode for the target collector. If the target collector is associated with the subscription, command configurations take effect based on the following rules:If the protocol command has been run in the Subscription view, the protocol and encryption mode configured in the Subscription view take effect.
If the protocol command is not run in the Subscription view, the protocol and encryption mode configured in the Destination-group view take effect.
- Run commit
The configuration is committed.
Configuring the Data to Be Sampled or a Customized Event
When you configure Telemetry static subscription to the data sampled or a customized event, you need to create a sampling sensor group and specify a sampling path and filter criteria.
Context
When static subscription is configured, a device functions as a client and a collector functions as a server. To statically subscribe to the data sampled or a customized event, you need to configure a source of the data to be sampled.
You can configure a Telemetry customized event. If a performance indicator of a resource object that Telemetry monitors exceeds the user-defined threshold, the customized event is reported to the collector in time for service policy determination.
Creating a Subscription
When you configure Telemetry static subscription to the data sampled or a customized event, you need to create a subscription to associate the configured destination group with the configured sampling sensor group so that data can be sent to the collector.
Context
When static subscription is configured, a device functions as a client and a collector functions as a server. To statically subscribe to the data sampled or a customized event, you need to create a subscription to set up a data sending channel. The protocol used to send data can be gRPC or UDP.
To configure an SSL policy for a client so that the server and client establish a secure SSL connection, you must ensure that an SSL policy has been created. For details about how to create an SSL policy, see "Configuring and Binding an SSL Policy" in "Basic Configuration" in the configuration guide.
Verifying the Telemetry Configuration
After configuring Telemetry static subscription to the data sampled or a customized event, check information about the sampling sensor group, destination group, and subscription.
Procedure
- Run the display telemetry sensor [ sensor-name ] command to check the sampling sensor information.
- Run the display telemetry destination [ destination-name ] command to check information about a destination group to which the data sampled is sent.
- Run the display telemetry subscription [ subscription-name ] command to check the subscription information.
- Run the display telemetry sensor-path command to check the sampling path of a Telemetry sensor.
Example
<HUAWEI> display telemetry sensor group1
----------------------------------------------------------------------------------------
Sensor-name:group1
1. Sensor-path : huawei-devm:devm/cpuInfos/cpuInfo
Sensor-type : sample
Path-state : NA
Op-field : -
Op-type1 : -
Op-value1 : -
Relation : -
Op-type2 : -
Op-value2 : -
Policy : -
2. Sensor-path : huawei-devm:devm/cpuInfos/cpuInfo
Sensor-type : self-defined-event
Path-state : NA
Op-field : systemCpuUsage
Op-type1 : le
Op-value1 : 10
Relation : and
Op-type2 : gt
Op-value2 : 90
Self defined event :
Level : 7
Suppress-period : 20
Description : event1
3. Sensor-path : huawei-mpls:TNLREROUTED
Sensor-type : event
Path-state : NA
4. Sensor-path : huawei-sem:hwCPUUtilizationResume
Sensor-type : alarm
Path-state : NA
----------------------------------------------------------------------------------------
<HUAWEI> display telemetry destination 1
----------------------------------------------------------------------------------------
Dest-name Dest-addr Dest-port State Vpn-name Protocol Istls FailedReason
----------------------------------------------------------------------------------------
1 10.135.84.185 50000 RESOLVED - GRPC NO-TLS NA
----------------------------------------------------------------------------------------
<HUAWEI> display telemetry subscription 1
---------------------------------------------------------------------------
Sub-name : 1
Dscp : 0
Protocol : GRPC
Encoding : GPB
Send bytes : 0
Send packets : 0
Total send delay : 0
Total send error : 0
Total send drop : 302
Total other error : 0
Last send-time : 2017-08-31 15:42:35
Sensor group:
----------------------------------------------------------------------
Sensor-name Sample-interval(ms) Heart-interval(s) Suppression State
----------------------------------------------------------------------
senso1 60000 - NO RESOLVED
----------------------------------------------------------------------
Destination group:
----------------------------------------------------------------------
Dest-name Dest-IP Dest-port State Vpn-name Protocol
----------------------------------------------------------------------
dest1 10.135.84.185 50000 RESOLVED - GRPC
----------------------------------------------------------------------
Sub-state : PASSIVE
---------------------------------------------------------------------------
Total subscription number is : 1
<HUAWEI> display telemetry sensor-path
Sample(S) : Serial sample.
Sample(P) : Parallel sample.
Parallel sampled data may not be sent through UDP in out-of-band mode.
------------------------------------------------------------------------------------------------------------------
Type MinPeriod(ms) MaxEachPeriod Path
------------------------------------------------------------------------------------------------------------------
Event -- -- huawei-bfd:hwBfdSessDown
Event -- -- huawei-bfd:hwBfdSessUp
Alarm -- -- huawei-bgp:BACKWARD
Alarm -- -- huawei-bgp:ESTABLISHED
Sample(S) 10000 -- huawei-devm:devm/cpuInfos/cpuInfo
Sample(S) 10000 -- huawei-devm:devm/memoryInfos/memoryInfo
Sample(S) 10000 -- huawei-ifm:ifm/interfaces/interface
Sample(P) 100 20 huawei-ifm:ifm/interfaces/interface/ifClearedStat
Sample(S) 10000 -- huawei-ifm:ifm/interfaces/interface/ifDynamicInfo
Sample(P) 100 20 huawei-ifm:ifm/interfaces/interface/ifStatistics
Sample(P) 1000 20 huawei-ifm:ifm/interfaces/interface/ifStatistics/ethPortErrSts
Sample(S) 100 20 huawei-ifm:interfaces/interface
Alarm -- -- huawei-isiscomm:isisAdjacencyChange
Alarm -- -- huawei-mpls:Session-Down-MIB
Alarm -- -- huawei-mpls:Session-Up-MIB
Event -- -- huawei-mpls:TNLREROUTED
Sample(S) 10000 -- huawei-mpls:mpls/mplsTe/rsvpTeTunnels/rsvpTeTunnel/tunnelPaths/tunnelPath
Alarm -- -- huawei-mpls:mplsLdpSessionDown
Alarm -- -- huawei-ospfv2:ospfNbrStateChange
Alarm -- -- huawei-ospfv2:ospfVirtNbrStateChange
Alarm -- -- huawei-ospfv3:ospfv3NbrStateChange
Alarm -- -- huawei-sem:hwCPUUtilizationResume
Alarm -- -- huawei-sem:hwCPUUtilizationRisingAlarm
Alarm -- -- huawei-sem:hwStorageUtilizationResume
Alarm -- -- huawei-sem:hwStorageUtilizationRisingAlarm
------------------------------------------------------------------------------------------------------------------