16-Telemetry Command Reference

HomeSupportRoutersCR16000-M SeriesReference GuidesCommand ReferencesH3C CR16000-M Routers Command Reference-R838x-6W10116-Telemetry Command Reference
Table of Contents
Related Documents
01-gRPC commands
Title Size Download
01-gRPC commands 220.32 KB

gRPC commands

Generic gRPC commands

display grpc

Use display grpc to display gRPC dial-in mode information.

Syntax

display grpc [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

verbose: Display detailed gRPC information. If you do not specify this keyword, the command displays brief gRPC information.

Examples

# Display brief gRPC information.

<Sysname> display grpc

gRPC status : Enabled

PKI domain : --

Current-time: 2021-08-20T17:53:12.880

------------Dial-in mode information------------

gRPC server port: 50051

Session idle-timeout: 5 minutes

Session count: 0

  ID         IP Address:Port                  UserName

   1         192.1.11.254:53030               test

------------Dial-out mode information-----------

Sensor mode: Simple

Sensor group count: 1

Sensor path count: 1

Destination group count: 1

Destination count: 1

Subscription count: 1

Connection ID: 1

  IP address:Port: 1.1.1.1:50051

   Encoding: JSON

   Status: Idle

Table 1 Command output

 

Field

Description

gRPC status

Status of the gRPC service:

·     Enabled—The gRPC service is enabled.

·     Disabled—The gRPC service is disabled.

PKI domain

PKI domain for secure gRPC connections to collectors.

This field displays a hyphen (-) if no PKI domain has been specified by using the grpc pki domain command.

Current-time

Current system time.

Dial-in mode information

Information about gRPC in dail-in mode.

gRPC server port

Port number for the gRPC service.

Session idle-timeout

gRPC session idle timeout timer, in minutes.

Session count

Number of gRPC sessions.

ID

ID of a gRPC session.

IP Address:Port

IP address and port number of the gRPC client.

UserName

Username of the gRPC user.

Dial-out mode information

Information about gRPC in dial-out mode.

Sensor mode

Sensor mode:

·     flex—Flexible sensor mode.

·     simple—Simple sensor mode.

Sensor group count

Number of sensor groups.

Sensor path count

Number of sensor paths.

Destination group count

Number of destination groups.

Destination count

Number of collectors.

Subscription count

Number of subscriptions.

Connection ID

ID of the connection between the device and a collector.

IP address:Port

IP address and port number of the collector.

Encoding

Encoding format for data packets sent to the controller. Available options are JSON and GPB.

Status

State of the channel between the device and the collector:

·     Init—The channel is being initialized.

·     Idle—The channel is idle.

·     Connecting—The channel is being established.

·     Connected—The channel has been established.

·     Transient failure—The channel has failed transiently and is attempting to recover.

·     Shutdown—The channel has been closed because of an issue.

 

# Display detailed gRPC information.

<Sysname> display grpc verbose

gRPC status : Enabled

PKI domain : --

Current-time: 2021-08-20T17:51:28.846

------------Dial-in mode information------------

gRPC server port: 50051

Session idle-timeout: 5 minutes

Session count: 1

  Session ID: 1

    User name: test

    Login time:2020-05-19 16:40:16     Idle time : 3 mins 41 s

    Client IP address : 192.1.11.254:53030

    Received RPCs        : 39        Received erroneous RPCs : 6

    Received subscription: 0         Sent notifications: 0

------------Dial-out mode information-----------

Sensor mode: Simple

Sensor group count: 1

Sensor path count: 1

Destination group count: 1

Destination count: 1

Subscription count: 1

Subscription s

Subscription mode: non-gNMI

DSCP value: 0

Source address or interface: Not configured

Telemetry data model:  2-layer

Encoding: JSON

Protocol: GRPC

Sensor group: s

  Sampling interval: 10 seconds

  Sampling type         Effective sampling interval   Sensor path

  Periodic              10 seconds                    ifmgr/statistics

Destination group: d

  Start time: 2021-08-20T17:51:24.377

  IP:Port: 1.1.1.1:50051

    VPN: N/A

    Connection state: Idle

    Periodic sampling statistics:

      Effective count: 0

      Sent successfully: 0                  Failed: 0

    Event-triggered statistics:

      Effective count: 0

      Sent successfully: 0                  Failed: 0

    Queued packets/Queue size: 0/1000

    Total sent bytes: 0

    Total delayed packets: 0

    Total dropped packets: 0

    Last sent time: N/A

    Heartbeat interval: 0s

    Last error: --

Table 2 Command output

Field

Description

gRPC status

Status of the gRPC service:

·     Enabled—The gRPC service is enabled.

·     Disabled—The gRPC service is disabled.

PKI domain

PKI domain for securing gRPC connections to collectors.

This field displays a hyphen (-) if no PKI domain has been specified by using the grpc pki domain command.

Current-time

Current system time.

Dial-in mode information

Information about gRPC in dial-in mode.

gRPC server port

Port number for the gRPC service.

Session idle-timeout

gRPC session idle timeout timer, in minutes.

Session count

Number of gRPC sessions.

Session ID

ID of a gRPC session.

User name

Username of the gRPC user.

Login time

Date and time when the gRPC user logged in to the device.

Idle time

Amount of time in which the session idle timeout timer will expire. If the value in this field is 0, gRPC sessions will never time out.

Client IP address

IP address and port number of the gRPC client.

Received RPCs

Number of received gRPC requests.

Received erroneous RPCs

Number of received erroneous gRPC requests.

Received subscription

Number of received gRPC subscription requests.

Sent notifications

Number of gRPC notifications reported to the collector.

Dial-out mode information

Information about gRPC in dial-out mode.

Sensor mode

Sensor mode:

·     flex—Flexible sensor mode.

·     simple—Simple sensor mode.

Sensor group count

Number of sensor groups.

Sensor path count

Number of sensor paths.

Destination group count

Number of destination groups.

Destination count

Number of collectors.

Subscription count

Number of subscriptions.

Subscription

Name of the subscription.

Subscription mode

Supported subscription mode. The current software version supports only non-gNMI subscription.

DSCP value

DSCP value of packets sent to the collector.

Source-address or interface

Source IP address or source interface for packets sent to the collector.

This field displays not-config if no source IP address or source interface has been specified.

Telemetry data model

Telemetry data model architecture for gRPC.

Options:

·     2-layer—Two-layer telemetry data model architecture.

·     3-layer—Three-layer telemetry data model architecture.

Encoding

Encoding format for packets sent to the controller. Available options are JSON and GPB.

Protocol

Transport protocol.

Available options:

·     gRPC (TCP).

·     UDP.

Sensor-group

Name of the sensor group.

Sampling interval

User-configured data sampling and push interval, in seconds.

This field displays 0 for event-triggered sampling.

Sampling type

Data sampling type:

·     Event-triggered—Event-triggered sampling.

·     Periodic—Periodical sampling.

Effective sampling interval

The data sampling and push interval that actually takes effect.

Sensor path

Sensor path.

Destination group

Name of the destination group.

Start time

Date and time when the gRPC connection was established.

IP:Port

IP address and port number of the collector (gRPC server).

VPN

VPN instance to which the collector belongs.

This field displays N/A if the collector belongs to the public network.

Connection state

State of the gRPC connection between the device and the collector:

·     Idle—The connection has not been established.

·     Established—The connection has been established.

Periodic sampling statistics

Statistics for periodic sampling.

Event-triggered statistics

Statistics for event-triggered sampling.

Effective count

Number of effective samplings. This counter does not count a sampling if it does not collect any data.

Sent successfully

Number of successfully sent data packets.

Failed

Number of data packets failed to be sent.

Queued packets/Queue size

Number of data packets waiting for transmission in queue and the size of the queue.

Total sent bytes

Total number of sent bytes.

Total delayed packets

Total number of packets delayed for transmission.

Total dropped packets

Number of data packets dropped because the queue was full.

Last sent time

Date and time when the most recent packet transmission occurred.

Heartbeat interval

Keepalive interval (in seconds) on the gRPC channel. This parameter is not configurable in the current software version. A value of 0 indicates that keepalive detection is disabled.

Last error

Most recent error:

·     VPN doesn’t exist—The VPN instance does not exist.

·     PKI failed—An error exists in the PKI domain. For example, the certificate became invalid.

·     Channel (reason)—An error occurred on the gRPC channel. Possible reasons:

¡     Init—The channel is being initialized.

¡     Idle—The channel is idle,

¡     Connecting—The channel is being established.

¡     Transient failure—The channel has transiently failed and is attempting to recover.

¡     Shutdown—The channel has been closed because of an issue.

This field displays two hyphens (--) if no errors exist.

 

grpc data-model

Use grpc data-model to specify the architecture of telemetry data models.

Use undo grpc data-model to restore the default.

Syntax

grpc data-model { 2-layer | 3-layer }

undo grpc data-model

Default

The device uses the two-layer telemetry data model architecture to push data.

Views

System view

Predefined user roles

network-admin

Parameters

2-layer: Specifies the two-layer telemetry data model architecture.

3-layer: Specifies the three-layer telemetry data model architecture.

Usage guidelines

This command is available only in gRPC dial-out mode.

If you specify the two-layer telemetry data model, the encoding format for pushed data can only be JSON.

For more information about telemetry data model architectures, see gRPC configuration in Telemetry Configuration Guide.

Examples

# Configure the device to use three-layer telemetry data models to push data.

<Sysname> system-view

[Sysname] grpc data-model 3-layer

Related commands

encoding

grpc enable

Use grpc enable to enable the gRPC service.

Use undo grpc enable to disable the gRPC service.

Syntax

grpc enable

undo grpc enable

Default

The gRPC service is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

You must enable the gRPC service before you can configure gRPC service attributes.

Disabling the gRPC service deletes all gRPC settings.

Examples

# Enable the gRPC service.

<Sysname> system

[Sysname] grpc enable

grpc pki domain

Use grpc pki domain to specify a PKI domain for establishing secure gRPC connections to collectors.

Use undo grpc pki domain to restore the default.

Syntax

grpc pki domain domain-name

undo grpc pki domain

Default

No PKI domain is specified for establishing secure gRPC connections to collectors.

Views

System view

Predefined user roles

network-admin

Parameters

domain-name: Specifies a PKI domain by its name, a case-insensitive string of 1 to 31 characters.

Usage guidelines

By default, the gRPC connection between the device and a collector does not provide data encryption service or require authentication. After you specify a PKI domain, the device and the collector will use TLS for data encryption and bidirectional certificate-based authentication to improve communication security.

For the device to establish secure gRPC connections to collectors, make sure the PKI domain already exists and has correct certificate and key settings. If these requirements are not met, the connections to collectors are not secure. For more information about PKI configuration, see Security Configuration Guide.

Examples

# Specify a PKI domain for establishing secure gRPC connections to collectors.

<Sysname> system-view

[Sysname] grpc pki domain grpc_test

Related commands

grpc enable

gRPC dial-in mode commands

grpc idle-timeout

Use grpc idle-timeout to set the gRPC session idle timeout timer.

Use undo grpc idle-timeout to restore the default.

Syntax

grpc idle-timeout minutes

undo grpc idle-timeout

Default

The gRPC session idle timeout timer is 5 minutes.

Views

System view

Predefined user roles

network-admin

Parameters

minutes: Specifies the gRPC session idle timeout timer in minutes, in the range of 0 to 30. To disable gRPC sessions from being timed out, set it to 0.

Usage guidelines

If no gRPC packet exchanges occur on the session between a gRPC and the server before the idle timeout timer expires, the device closes the session.

Examples

# Set the gRPC session idle timeout timer to 6 minutes.

<Sysname> system

[Sysname] grpc idle-timeout 6

grpc log dial-in gnmi

Use grpc log dial-in gnmi to enable gRPC logging for gNMI operations in dial-in mode.

Use undo grpc log dial-in gnmi to disable gRPC logging for gNMI operations in dial-in mode.

Syntax

grpc log dial-in gnmi { all | { capabilities | get | set | subscribe }* }

undo grpc log dial-in gnmi { all | { capabilities | get | set | subscribe }* }

Default

In dial-in mode, gRPC logging is enabled for gNMI Set operations and disabled for other gNMI operations.

Views

System view

Predefined user roles

network-admin

Parameters

all: Specifies all gNMI operations.

capabilities: Specifies the gNMI Capabilities operations.

get: Specifies the gNMI Get operations.

set: Specifies the gNMI Set operations.

subscribe: Specifies the gNMI Subscribe operations.

Usage guidelines

To identify gRPC issues, enable gNMI operations logging in dial-in mode.

This command generates gNMI operation logs in dial-in mode and sends them to the information center. With the information center, you can configure log destinations and output rules. For more information about the information center, see Network Management and Monitoring Configuration Guide.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Enable gRPC logging for gNMI Get operations in dial-in mode.

<Sysname> system

[Sysname] grpc log dial-in gnmi get

grpc log dial-in rpc

Use grpc log dial-in rpc to enable gRPC logging for RPC operations in dial-in mode.

Use undo grpc log dial-in rpc to disable gRPC logging for RPC operations in dial-in mode.

Syntax

grpc log dial-in rpc { all | { cli | get }* }

undo grpc log dial-in rpc { all | { cli | get }* }

Default

In dial-in mode, gRPC logging is disabled for RPC operations.

Views

System view

Predefined user roles

network-admin

Parameters

all: Specifies both RPC CLI and Get operations.

cli: Specifies the RPC CLI operations.

get: Specifies the RPC Get operations.

Usage guidelines

To identify gRPC issues, enable RPC operations logging in dial-in mode.

This command generates RPC operation logs in dial-in mode and sends them to the information center. With the information center, you can configure log destinations and output rules. For more information about the information center, see Network Management and Monitoring Configuration Guide.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Enable gRPC logging for RPC Get operations in dial-in mode.

<Sysname> system

[Sysname] grpc log dial-in gnmi get

grpc port

Use grpc port to specify the gRPC service port number.

Use undo grpc port to restore the default.

Syntax

grpc port port-number

undo grpc port

Default

The gRPC service port number is 50051.

Views

System view

Predefined user roles

network-admin

Parameters

port-number: Specifies the gRPC service port number, in the range of 1 to 65535.

Usage guidelines

Changing the gRPC service port number reboots the gRPC service and terminates all gRPC sessions to the gRPC server. If the new port is not available, the system reboots the gRPC service again to use the old port.

Examples

# Set the gRPC service port number to 50052.

<Sysname> system

[Sysname] grpc port 50052

Related commands

grpc enable

gRPC dial-out mode commands

condition

Use condition to configure a filtering condition for a filter.

Use undo condition to delete a filtering condition from a filter.

Syntax

condition node node operator operator value value

undo condition node node operator operator value value

Default

A filter does not contain filtering conditions.

Views

Filter view

Predefined user roles

network-admin

Parameters

node node: Specifies a node by its full name, a case-insensitive string. To obtain information about the available nodes, execute the condition node ? command.

operator operator: Specifies a comparison operator. Available operations vary by node. The following are values available for the operator argument:

·     eq: Equal to.

·     ge: Greater than or equal to.

·     gt: Greater than.

·     le: Less than or equal to.

·     lt: Less than.

·     ne: Not equal to.

value value: Specify the value on which the operation is performed.

Usage guidelines

Use this command to add filtering conditions to a filter for flexible filtering. A filtering condition matches a subnet of data of interest to collectors.

To add multiple filtering conditions to a filter, repeat this command. A filter can contain a maximum of five filtering conditions.

By default, a filter is matched if all its filtering conditions are matched. To have a filter match data that matches any one of its filtering conditions, use the operator command to change the operator between filtering conditions.

Examples

# Enable flexible sensor mode and add sensor path device/base for flexible filtering in sensor group test. Configure a filter for the device to push data entries with a value of 377 or 378 for the uptime node under the sensor path.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] grpc sensor-mode flex

[Sysname-telemetry] sensor-group test

[Sysname-telemetry-sensor-group-test] sensor-path-flex device/base

[Sysname-telemetry-sensor-group-test-path] filter filter1

[Sysname-telemetry-sensor-group-test-path-filter] operator or

[Sysname-telemetry-sensor-group-test-path-filter] condition node uptime operator eq value 377

[Sysname-telemetry-sensor-group-test-path-filter] condition node uptime operator eq value 378

Related commands

filter

operator

depth

Use depth to specify the retrieval depth for a flex-mode sensor path.

Use undo depth to restore the default.

Syntax

depth depth

undo depth

Default

Data retrieval depth is 1.

Views

Flex-mode sensor path view

Predefined user roles

network-admin

Parameters

depth: Retrieval depth. The value range is 1 to 3.

·     If the depth is set to 1, the device retrieves data from all columns under the specified path.

·     If the depth is set to 2, the device retrieves data from both columns and subtables under the specified path.

·     If the depth is set to 3, the device retrieves data from columns and subtables under the specified path as well as the subtables (if any) attached to the subtables under the specified path.

Usage guidelines

This command is supported only for sensor paths that represent multilevel tables.

Examples

# Enable flexible sensor mode and set the retrieval depth to 2 for a multilevel table sensor path in sensor group test.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] grpc sensor-mode flex

[Sysname-telemetry] sensor-group test

[Sysname-telemetry-sensor-group-test] sensor-path-flex grpc/subscriptions/subscription/destinationprofiles/destinationprofile

[Sysname-telemetry-sensor-group-test-path] depth 2

 

destination-group (subscription view)

Use destination-group to specify a destination group for a subscription.

Use undo destination-group to remove a destination group from a subscription.

Syntax

destination-group group-name

undo destination-group group-name

Default

A subscription does not have a destination group.

Views

Subscription view

Predefined user roles

network-admin

Parameters

group-name: Specifies a destination group by its name, a case-sensitive string of 1 to 31 characters.

Usage guidelines

A subscription binds sensor groups to destination groups. Then, the device pushes data from the specified sensors to the collectors.

The specified destination group must have been created by using the destination-group command in telemetry view.

A subscription can have a maximum of five destination groups.

Examples

# Specify destination group collector1 for subscription A.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] subscription A

[Sysname-telemetry-subscription-A] destination-group collector1

Related commands

destination-group (telemetry view)

destination-group (telemetry view)

Use destination-group to create a destination group and enter its view, or enter the view of an existing destination group.

Use undo destination-group to delete a destination group.

Syntax

destination-group group-name

undo destination-group group-name

Default

No destination groups exist.

Views

Telemetry view

Predefined user roles

network-admin

Parameters

group-name: Specifies the destination group name, a case-sensitive string of 1 to 31 characters.

Usage guidelines

As a best practice, configure a maximum of five destination groups. If you configure too many destination groups, system performance might degrade.

To delete a destination group that is already used by a subscription, you must remove the destination group from the subscription first.

Examples

# Create a destination group named collector1.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] destination-group collector1

[Sysname-telemetry-destination-group-collector1]

Related commands

destination-group (subscription view)

subscription

dscp

Use dscp to set the DSCP value of packets sent to collectors.

Use undo dscp to restore the default.

Syntax

dscp dscp-value

undo dscp

Default

The DSCP value of packets sent to collectors is 0.

Views

Subscription view

Predefined user roles

network-admin

Parameters

dscp-value: Specifies a DSCP value for packets sent to collectors, in the range of 0 to 63.

Usage guidelines

A greater DSCP value represents a higher priority.

If you execute this command multiple times in the same view, the most recent configuration takes effect.

Examples

# Set the DSCP value of packets sent to collectors to 12 for subscription A.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] subscription A

[Sysname-telemetry-subscription-A] dscp 12

encoding

Use encoding to specify the encoding format for pushed data.

Use undo encoding to restore the default.

Syntax

encoding { gpb | json }

undo encoding

Default

The encoding format for pushed data is JSON.

Views

Subscription view

Predefined user roles

network-admin

Parameters

gpb: Specifies the GPB encoding format. This keyword is available only when the device uses the three-layer telemetry data model architecture to push data.

json: Specifies the JSON encoding format.

Usage guidelines

The device supports JSON encoding for all data available for subscription. However, it does not support GPB encoding for all data. With GPB encoding, the device will not push data that cannot be GPB encoded. When you choose GPB encoding for a subscription, make sure all data in the subscription can be encoded in GPB.

Examples

# Specify the three-layer architecture for telemetry data models and use GPB to encode data for subscription A.

<Sysname> system-view

[Sysname] grpc data-model 3-layer

[Sysname] telemetry

[Sysname-telemetry] subscrption A

[Sysname-telemetry-subscription-A] encoding gpb

Related commands

grpc data-model

filter

Use filter to configure a filter for a flex-mode sensor path.

Use undo filter to delete a filter from a flex-mode sensor path.

Syntax

filter filter-name

undo filter filter-name

Default

No filters are configured for sensor paths.

Views

Flex-mode sensor path view

Predefined user roles

network-admin

Parameters

filter-name: Specify a filter name, a case-sensitive string of 1 to 31 characters.

Usage guidelines

You can use this command to specify a filter only for periodic sensor paths. A period sensor path can have only one filter.

To add filtering conditions to a filter, use the condition command.

Examples

# Enable flexible sensor mode, add the ifmgr/devicecapabilities sensor path to sensor group test, and then configure a filter for the sensor path.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] grpc sensor-mode flex

[Sysname-telemetry] sensor-group test

[Sysname-telemetry-sensor-group-test] sensor-path-flex ifmgr/devicecapabilities

[Sysname-telemetry-sensor-group-test-path] filter filter1

[Sysname-telemetry-sensor-group-test-path-filter]

Related commands

condition

grpc log dial-out

Use grpc log dial-out to enable gRPC logging in dial-out mode.

Use undo grpc log dial-out to disable gRPC logging in dial-out mode.

Syntax

grpc log dial-out { all | { event | sample }* }

undo grpc log dial-out { all | { event | sample }* }

Default

In dial-out mode, gRPC logging is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

all: Specifies all data collection types.

event: Specifies event-triggered data collection.

sample: Specifies periodical data collection.

Usage guidelines

To identify gRPC issues, enable gRPC data collection logging in dial-out mode.

This command generates gRPC data collection logs in dial-out mode and sends them to the information center. With the information center, you can configure log destinations and output rules. For more information about the information center, see Network Management and Monitoring Configuration Guide.

gRPC logging in dial-out mode is unavailable for gNMI subscriptions.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Enable gRPC logging for periodical data collection in dial-out mode.

<Sysname> system

[Sysname] grpc log dial-in gnmi get

grpc sensor-mode

Use grpc sensor-mode to set the gRPC sensor mode.

Use undo grpc sensor-mode to restore the default gRPC sensor mode.

Syntax

grpc sensor-mode { flex | simple }

undo grpc sensor-mode

Default

Simple sensor mode applies.

Views

Telemetry view

Predefined user roles

network-admin

Parameters

flex: Enable flexible sensor mode.

simple: Enable simple sensor mode.

Usage guidelines

The device supports flexible sensor mode and simple sensor mode for flexible filtering and simple filtering, respectively.

Depending on the sensor mode, you can configure the sensor paths in a sensor group with simple filtering conditions or flexible filtering conditions.

·     In flexible sensor mode, you can set the operator between filtering conditions on a sensor path to AND or OR.

·     In simple sensor mode, the operator between filtering conditions on a sensor path is fixed at AND. The device pushes only data that matches all filtering conditions from the sensor path.

The sensor path configuration procedure differs depending on the sensor mode.

·     In flexible sensor mode, use the following procedure to configure a sensor path and its filtering conditions:

a.     Execute the sensor-path-flex command to add the sensor path to the sensor group and enter flex-mode sensor path view. In some situations, the sensor paths specified by using this method are called flex-mode sensor paths for clarity.

b.     Execute the filter command to create a filter for the sensor path.

c.     Execute the condition command to add filtering conditions to the filter.

d.     Execute the operator command to set the operator between the filtering conditions.

-     To push data that matches all conditions, set the operator to and.

-     To push data that matches any filtering conditions, set the operator to or.

·     In simple sensor mode, use the following procedure to configure a sensor path and its filtering conditions:

a.     Execute the sensor path command to add the sensor path to the sensor group. When you execute the command, you can specify a filtering condition. In some situations, the sensor paths specified by using this method are called simple-mode sensor paths for clarity.

b.     To specify multiple filtering conditions on the sensor path, repeat the command with different filtering conditions.

The operator between filtering conditions on the sensor path is fixed at AND. The device pushes only data that matches all filtering conditions from the sensor path.

Flexible filtering and simple filtering are mutually exclusive. Before you change the sensor mode from simple to flexible, you must delete all sensor groups or delete all simple-mode sensor paths from all sensor groups. Likewise, before you change the sensor mode from flexible to simple, you must delete all sensor groups or delete all flex-mode sensor paths.

Examples

# Enable simple sensor mode.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] grpc sensor-mode flex

Related commands

operator

sensor path

sensor-path-flex

ipv4-address

Use ipv4-address to add an IPv4 collector to a destination group.

Use undo ipv4-address to remove an IPv4 collector from a destination group.

Syntax

ipv4-address ipv4-address [ port port-number ] [ vpn-instance vpn-instance-name ]

undo ipv4-address ipv4-address [ port port-number ] [ vpn-instance vpn-instance-name ]

Default

A destination group does not have IPv4 collectors.

Views

Destination group view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies the IPv4 address of the collector.

port port-number: Specifies the listening port of the collector, in the range of 1 to 65535. The default is 50051.

vpn-instance vpn-instance-name: Specifies the VPN instance to which the collector belongs. The vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. If the collector belongs to the public network, do not specify this option.

Usage guidelines

One collector must have a different address, port, or VPN instance than the other collectors.

To add multiple collectors to a destination group, execute this command multiple times.

A destination group can have a maximum of five collectors.

To modify the collector configuration for a destination group that is already used by a subscription, you must remove the destination group from the subscription first.

Examples

# Add a collector that uses IPv4 address 192.168.21.21 and the default port number to destination group collector1.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] destination-group collector1

[Sysname-telemetry-destination-group-collector1] ipv4-address 192.168.21.21

Related commands

destination-group (subscription view)

subscription

ipv6-address

Use ipv6-address to add an IPv6 collector to a destination group.

Use undo ipv6-address to remove an IPv6 collector from a destination group.

Syntax

ipv6-address ipv6-address [ port port-number ] [ vpn-instance vpn-instance-name ]

undo ipv6-address ipv6-address [ port port-number ] [ vpn-instance vpn-instance-name ]

Default

A destination group does not have IPv6 collectors.

Views

Destination group view

Predefined user roles

network-admin

Parameters

ipv6-address: Specifies the IPv6 address of the collector. It cannot be an IPv6 link-local address. For more information about IPv6 link-local addresses, see IPv6 basics configuration in Layer 3—IP Services Configuration Guide.

port port-number: Specifies the listening port of the collector, in the range of 1 to 65535. The default is 50051.

vpn-instance vpn-instance-name: Specifies the VPN instance to which the collector belongs. The vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. If the collector belongs to the public network, do not specify this option.

Usage guidelines

One collector must have a different address, port, or VPN instance than the other collectors.

To add multiple collectors to a destination group, execute this command multiple times.

A destination group can have a maximum of five collectors.

To modify the collector configuration for a destination group that is already used by a subscription, you must remove the destination group from the subscription first.

Examples

# Add a collector that uses IPv6 address 1::1 and the default port number to destination group collector1.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] destination-group collector1

[Sysname-telemetry-destination-group-collector1] ipv6-address 1::1

Related commands

destination-group (subscription view)

subscription

operator

Use operator to set the logical operator on the filtering conditions in a filter.

Use undo operator to restore the default.

Syntax

operator { and | or }

undo operator

Default

By default, the AND operator applies to the filtering conditions in a filter.

Views

Filter view

Predefined user roles

network-admin

Parameters

and: Specifies the logical AND operator. The device pushes only data that matches all the filtering conditions in the filter.

or: Specifies the OR operator. The device pushes data that matches any filtering conditions in the filter.

Examples

# In flexible sensor mode, add the ifmgr/devicecapabilities sensor path to sensor group test, configure a filter for the sensor path, and set the operator between the filtering conditions in the filter to OR.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] grpc sensor-mode flex

[Sysname-telemetry] sensor-group test

[Sysname-telemetry-sensor-group-test] sensor-path-flex ifmgr/devicecapabilities

[Sysname-telemetry-sensor-group-test-path] filter filter1

[Sysname-telemetry-sensor-group-test-path-filter] operator or

Related commands

filter

protocol

Use protocol to specify a transport protocol for the device to send packets to collectors.

Use undo protocol to restore the default.

Syntax

protocol { grpc | udp }

undo protocol

Default

The device uses gRPC as the transport protocol to send packets to collectors.

Views

Subscription view

Predefined user roles

network-admin

Parameters

grpc: Specifies gRPC as the transport protocol. gRPC uses TCP at the transport layer

udp: Specifies UDP as the transport protocol.

Usage guidelines

If you execute this command multiple times, the most recent configuration takes effect.

For a subscription that has sensor group and destination group bindings, you must first remove all the sensor groups and destination groups from it before you execute this command.

Examples

# Specify UDP as the transport protocol for subscription A.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] subscription A

[Sysname-telemetry-subscription-A] protocol udp

sensor-path-flex

Use sensor-path-flex to add a flex-mode sensor path and enter its view.

Use undo sensor-path-flex to delete a flex-mode sensor path.

Syntax

sensor-path-flex path

undo sensor-path-flex path

Default

No sensor paths are configured.

Views

Sensor group view

Predefined user roles

network-admin

Parameters

path: Specifies a data path by its full name. The data path name is case insensitive. For information about the available paths, execute the sensor-path-flex ? command.

Usage guidelines

To execute this command, first execute the grpc sensor-mode flex command in telemetry view to enable flexible sensor mode.

The device supports a total maximum of 128 sensor paths in total.

You can execute the sensor-group command in subscription view to specify a sensor group for a subscription. To modify the sensor path configuration for a sensor group that is used in a subscription, you must first remove the sensor group from the subscription.

For the ifmgr/statistics sensor path, you can alternatively specify ifindex attribute values in the path to filter data.

·     You can specify condition nodes to do node-based filtering or include ifindex attribute values in sensor paths to do index-based filtering, but not both.

·     Use the [ifindex=”index”] format to specify index-based filters in the path. The index argument is a case-insensitive string that represents the type and number of an interface or its index.

·     You can specify a maximum of 64 ifindex attribute values in a sensor path. The device pushes data from the sensor path if one of the ifindex attribute values is met.

·     The end character for theindex argument can be a wildcard character (*), for example, sensor-path-flex ifmgr/statistics[ifindex="ten-gigabitethernet3/0/*"].

Examples

# In flexible sensor mode, add the ifmgr/devicecapabilities sensor path to sensor group test.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] grpc sensor-mode flex

[Sysname-telemetry] sensor-group test

[Sysname-telemetry-sensor-group-test] sensor-path-flex ifmgr/devicecapabilities

[Sysname-telemetry-sensor-group-test-path]

Related commands

grpc sensor-mode

sensor-group (subscription view)

sensor path

Use sensor path to configure a sensor path.

Use undo sensor path to delete a sensor path.

Syntax

sensor path path [ condition node node operator operator value value | depth depth ]

undo sensor path path [ condition node node operator operator ]

Default

No sensor paths exist.

Views

Sensor group view

Predefined user roles

network-admin

Parameters

path: Specifies a data path by its full name. The data path name is case insensitive. For information about the available paths, execute the sensor path ? command.

condition: Adds a data filtering condition. The device pushes only data that matches the comparison-based filtering condition. If you do not specify a condition, the device does not filter data. This keyword is available only for periodic sensor paths.

node node: Specifies a node by its full name, a case-insensitive string. For information about the available nodes, enter sensor path condition path node ?.

operator operator: Specifies an operator for the condition. Supported operators vary by node. The following are available operators:

·     eq—Equal to.

·     ge—Greater than or equal to.

·     gt—Greater than.

·     le—Less than or equal to.

·     lt—Less than.

·     ne—Not equal to.

value value: Specifies the reference value.

depth depth: Sets the retrieval level for the sensor path. This option takes effect if the sensor path is a periodic path. The value range for the depth is 1 to 3. The default depth is 1.

·     If the depth is set to 1, the device collects data from all columns under the specified path.

·     If the depth is set to 2, the device collects data from all columns and subtables under the specified path.

·     If the depth is set to 3, the device collects data from all columns, subtables, and subtables under the subtables, under the specified path.

Usage guidelines

The device supports a maximum of 128 sensor paths in total.

You can repeat this command to configure a sensor path with different filtering conditions. A sensor path can have a maximum of five data filtering conditions. The device pushes data from the sensor path to collectors only when all the specified conditions are met.

For the ifmgr/statistics sensor path, you can alternatively specify ifindex attribute values in the path to filter data. When you use this method, the following restrictions and guidelines apply:

·     You can specify condition nodes to do node-based filtering or include ifindex attribute values in sensor paths to do index-based filtering, but not both.

·     Use the [ifindex=”index”] format to specify index-based filters in the path. The index argument is a case-insensitive string that represents the type and number or index of an interface.

·     The end character for the index argument can be a wildcard character (*), for example, sensor path ifmgr/statistics[ifindex="Ten-GigabitEthernet3/0/*"].

·     You can specify a maximum of 64 ifindex attribute values in a sensor path. The device pushes data from the sensor path if one of the ifindex attribute values is met.

To modify the sensor path configuration for a sensor group that is already used by a subscription, you must remove the sensor group from the subscription first.

Examples

# Configure sensor path ifmgr/devicecapabilities for sensor group test.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] sensor-group test

[Sysname-telemetry-sensor-group-test] sensor path ifmgr/devicecapabilities

# Configure sensor path device/base for sensor group test so the device pushes data of the sensor path only when the uptime is greater than or equal to 377.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] sensor-group test

[Sysname-telemetry-sensor-group-test] sensor path device/base condition node uptime operator ge value 377

Related commands

sensor-group (subscription view)

sensor-group (subscription view)

Use sensor-group to specify a sensor group for a subscription.

Use undo sensor-group to remove a sensor group from a subscription.

Syntax

sensor-group group-name [ sample-interval [ msec ] interval ]

undo sensor-group group-name

Default

A subscription does not have a sensor group.

Views

Subscription view

Predefined user roles

network-admin

Parameters

group-name: Specifies a sensor group by its name, a case-sensitive string of 1 to 31 characters.

sample-interval: Specifies that the sensor group collect and push data at intervals. If you do not specify this keyword, the sensor group collects and pushes data only when triggered by events.

[ msec ] interval: Specifies the data sampling interval.

·     If you do not specify the msec keyword, the data sampling interval is set in seconds. The value range is 1 to 86400.

·     If you specify the msec keyword, the data sampling interval is set in milliseconds. The interval value must be 10 or a multiple of 100 in the range of 100 to 900.

Usage guidelines

Specify the sample-interval interval option for periodic sensor paths and only for periodic sensor paths.

·     If you specify the option for event-triggered sensor paths, the sensor paths do not take effect.

·     If you do not specify the option for periodic sensor paths, the device does not collect or push data.

The specified sensor group must have been created by using the sensor-group command in telemetry view.

As a best practice, set the data sampling interval to 1 second or a higher value. If you set the data sampling interval to 10 or 100 milliseconds, the collected statistics might not be incomplete because of hardware limitations.

When you set the data sampling interval to 10 milliseconds, follow these restrictions and guidelines:

·     The 10 milliseconds data sampling interval applies only to the ifmgr/statistics sensor paths specified with the [ifindex="index"] filter, for example, sensor path ifmgr/statistics[ifindex="Ten-GigabitEthernet3/0/1"]. The device will collect data from all other sensor paths in the sensor group at the minimum data sampling interval for each of them.

·     To collect data from the ifmgr/statistics sensor path at 10 milliseconds, the transport protocol for the subscription must be UDP. To set the transport protocol for a subscription, use the protocol command.

·     You can add ifmgr/statistics paths with interface-based filtering conditions in the sensor group to sample data from up to four interfaces per slot in total.

Examples

# Specify sensor group test for subscription A. Set the data sampling interval to 10 seconds.

<Sysname> system-view

[Sysname] telemetry

[Device-telemetry] subscription A

[Device-telemetry-subscription-A] sensor-group test sample-interval 10

Related commands

protocol

sensor-group (telemetry view)

sensor-group (telemetry view)

Use sensor-group to create a sensor group and enter its view, or enter the view of an existing sensor group.

Use undo sensor-group to delete a sensor group.

Syntax

sensor-group group-name

undo sensor-group group-name

Default

No sensor groups exist.

Views

Telemetry view

Predefined user roles

network-admin

Parameters

group-name: Specifies the sensor group name, a case-sensitive string of 1 to 31 characters.

Usage guidelines

The device supports a maximum of 32 sensor groups.

To delete a sensor group that is already used by a subscription, you must remove the sensor group from the subscription first.

Examples

# Create a sensor group named test.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] sensor-group test

[Sysname-telemetry-sensor-group-test]

Related commands

sensor-group (subscription view)

subscription

source-address

Use source-address to specify the source IP address for packets sent to collectors.

Use undo source-address to restore the default.

Syntax

source-address { ipv4-address | interface interface-type interface-number | ipv6 ipv6-address }

undo source-address

Default

The device uses the primary IP address of the output interface in the route to the collectors as the source address.

Views

Subscription view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies an IPv4 address.

interface interface-type interface-number: Specifies an interface by its type and number. In the current software version, you must specify a loopback interface. The device will use the interface's primary IPv4 address as the source address. If the interface does not have a primary IPv4 address, the device selects the first secondary IPv4 address of the interface. If the interface does not have any IPv4 addresses, the device uses the primary IP address of the output interface in the route to the collectors.

ipv6 ipv6-address: Specifies an IPv6 address.

Usage guidelines

If you execute this command multiple times, the most recent configuration takes effect.

Changing the source address causes the device to reconnect to the gRPC server.

Examples

# Specify the source IPv4 address of 169.254.1.1 for packets sent to collectors.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] subscription A

[Sysname-telemetry-subscription-A] source-address 169.254.1.1

subscription

Use subscription to create a subscription and enter its view, or enter the view of an existing subscription.

Use undo sensor-group to delete a subscription.

Syntax

subscription subscription-name

undo subscription subscription-name

Default

No subscription exists.

Views

Telemetry view

Predefined user roles

network-admin

Parameters

subscription-name: Specifies the subscription name, a case-sensitive string of 1 to 31 characters.

Usage guidelines

The device supports a maximum of 10 subscriptions.

Examples

# Configure a subscription named A.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] subscription A

[Sysname-telemetry-subscription-A]

Related commands

destination-group (subscription view)

sensor-group (subscription view)

telemetry

Use telemetry to enter telemetry view.

Syntax

telemetry

Views

System view

Predefined user roles

network-admin

Usage guidelines

In telemetry view, you can configure telemetry parameters.

Examples

# Enter telemetry view.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry]

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网