12-Telemetry Command Reference

HomeSupportReference GuidesCommand ReferencesH3C S6805 & S6825 & S6850 & S9850 Command References-Release 66xx-6W10312-Telemetry Command Reference
01-gRPC commands
Title Size Download
01-gRPC commands 108.91 KB

gRPC commands

Generic gRPC commands

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-related settings.

Disabling the gRPC service deletes all gRPC-related settings.

Examples

# Enable the gRPC service.

<Sysname> system

[Sysname] grpc enable

gRPC dial-in mode commands

display grpc

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

Syntax

display grpc

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display gRPC dial-in mode information.

<Sysname> display grpc

gRPC status : enabled.

gRPC port : 50051

gRPC idle-timeout : 3 minutes

Session count: 1.

  Session ID: 1

    User name: test

    Login time:2018-01-05 06:46:43 Idle time : 2 mins 56 s

    Client IP address : 169.254.100.170:40810

    Received RPCs        : 0         Received error RPCs : 0

    Received subscription: 0         Output notifications: 0

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.

gRPC idle-timeout

Setting for the gRPC session idle timeout timer.

Session count

Number of gRPC sessions.

Idle time

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

Received error RPCs

Number of received erroneous gRPC requests.

Received subscription

Number of received gRPC subscription requests.

 

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 }* }

 

NOTE:

This command is supported only in Release 6616 and later.

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 issues with gNMI operations in dial-in mode, use this feature.

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 logging feature takes effect on all specified types of gNMI operations.

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 }* }

 

NOTE:

This command is supported only in Release 6616 and later.

Default

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

Views

System view

Predefined user roles

network-admin

Parameters

all: Specifies both CLI and Get RPCs.

cli: Specifies the CLI RPCs.

get: Specifies the Get RPCs.

Usage guidelines

To identify issues with RPC operations in dial-in mode, use this feature.

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 logging feature takes effect on all specified types of RPC operations.

Examples

# Enable gRPC logging for Get RPCs 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 disconnects all sessions established between the gRPC server and its gRPC clients. The gRPC clients must reinitiate the sessions.

If the specified port number is not available (for example, the port number is already used), the gRPC service reboots to use the original port number.

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

Examples

# Set the gRPC service port number to 50052.

<Sysname> system

[Sysname] grpc port 50052

Related commands

grpc enable

gRPC dial-out mode commands

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.

You cannot use a destination group in both a gRPC subscription and a gNMI subscription.

You can specify a maximum of five destination groups for a subscription.

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)

subscription

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. Configuring too many destination groups might degrade the system performance.

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 for packets sent to collectors.

Use undo dscp to restore the default.

Syntax

dscp dscp-value

undo dscp

Default

The DSCP value for packets sent to collectors is 0.

Views

Subscription view

Predefined user roles

network-admin

Parameters

dscp-value: Specifies the 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 for packets sent to collectors to 12 for subscription A.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] subscription A

[Sysname-telemetry-subscription-A] dscp 12

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 }* }

 

NOTE:

This command is supported only in Release 6616 and later.

Default

In dial-out mode, gRPC logging is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

all: Specifies all sampling types.

event: Specifies event-triggered sampling.

sample: Specifies periodical sampling.

Usage guidelines

To identify issues with gRPC operations in dial-out mode, use this feature.

This command generates gRPC sampling 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.

If you execute this command multiple times, the logging feature takes effect on all specified sampling types.

Examples

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

<Sysname> system

[Sysname] grpc log dial-in gnmi get

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 represents the VPN instance name, a case-sensitive string of 1 to 31 characters. If the collector belongs to the public network, do not specify this option.

Usage guidelines

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

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

You can specify a maximum of five collectors for a destination group.

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. The IPv6 address cannot be a link-local address. For more information about 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 represents the VPN instance name, a case-sensitive string of 1 to 31 characters. If the collector belongs to the public network, do not specify this option.

Usage guidelines

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

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

You can specify a maximum of five collectors for a destination group.

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

push-mode

Use push-mode to set the data push mode for a subscription.

Use undo push-mode to restore the default.

 

 

NOTE:

This command is supported only in Release 6635 and later.

 

Syntax

push-mode condition-triggered

undo push-mode

Default

The data push mode for a sensor path in a subscription is periodic or event-triggered.

Views

Subscription view

Predefined user roles

network-admin

Parameters

Condition-triggered: Specifies condition-triggered push mode. In this mode, the device periodically checks each sensor path in a sensor group and pushes the data from the sensor paths to collectors if the push conditions are met.

Usage guidelines

This command is available only for gNMI subscriptions.

For information about sensor paths that support condition-triggered data push or about their sensor path check interval and data push condition settings, contact H3C Support.

Examples

# Set the data push mode to condition-triggered for gNMI subscription A.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] subscription A gnmi

[Sysname-telemetry-subscription-A] push-mode condition-triggered

Related commands

subscription

sensor path

Use sensor path to configure a sensor path.

Use undo sensor path to delete a sensor path.

Syntax

sensor path path [ selection-nodes node-list ]

undo sensor path path

Default

No sensor paths exist.

Views

Sensor group view

Predefined user roles

network-admin

Parameters

path: Specifies a sensor path, a case-insensitive string of 1 to 255 characters. To view available sensor paths, enter a question mark (?) in the position of this argument.

selection-nodes: Pushes data from nodes in the specified data path. If you do not specify this keyword, the device pushes data from all nodes in the specified data path.

node-list: Specifies a space-separated list of up to 24 nodes by their names. To view available nodes in the sensor path, enter a question mark (?) in the position of this argument. For more information about path nodes, see the Columns sections in the NETCONF XML API references of the related module.

 

NOTE:

The selection-nodes node-list option is supported only in Release 6616 and later.

Usage guidelines

The selection-nodes node-list option is supported only for a non-gNMI subscription.

To configure multiple sensor paths, repeat this command. If you execute this command multiple times for the same sensor path, the most recent configuration takes effect.

The device supports a maximum of 128 sensor paths.

If the device does not support the specified sensor path, the command displays an error message.

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.

For sensor path interfaces/interface/subinterfaces/subinterface/ipv4/state/counter, if a lost data packet matches multiple packet loss types, this lost packet will be counted in all the matching packet loss types.

Examples

# Configure sensor path ifmgr/devicecapabilities/ in non-gNMI 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 ifmgr/statistics in non-gNMI sensor group test, and configure the device to push data only from nodes InRate and OutRate in the sensor path.

<Sysname> system-view

[Sysname] telemetry

[Sysname-telemetry] sensor-group test

[Sysname-telemetry-sensor-group-test] sensor path ifmgr/statistics selection-nodes inrate outrate

Related commands

sensor-group (subscription view)

sensor-group (telemetry view)

subscription

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 interval | suppress-time suppress-time ]

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 interval: Specifies the data push intervals at which the sensor group collects and pushes data. The value range is 1 to 86400 seconds. If you do not specify this keyword, the sensor group does not regularly collect data.

 

CAUTION

CAUTION:

·     If you are running the F6612 or an earlier version, do not set the data push interval to 256 or 65536. If you do that, the setting will change after you upgrade from the F6612 (or earlier) version to the F6620 (or later) version and you must reconfigure it.

·     If you downgrade from the F6620 (or later) version to the F6612 (or earlier) version, the push interval setting will change and you must reconfigure it.

 

suppress-time suppress-time: Specifies the data push suppression interval, in seconds. During the data push suppression interval, the device does not push the data from a sensor path even though conditions are met. The value range for the suppress-time argument is 1 to 300, and the default is 60.

 

 

NOTE:

The data push suppression interval is supported only in Release 6635 and later.

 

Usage guidelines

The sensor groups specified for a subscription automatically associate with the destination groups specified for the same subscription.

Before you specify sensor groups for a subscription, you must create them by using the sensor-group command in telemetry view.

For a gNMI subscription, you must specify gNMI sensor groups. For a non-gNMI subscription, you must specify non-gNMI sensor groups.

For the device to correctly push data from the sensor paths in a sensor group, make sure the subscription settings for them are compliant with Table 2.

Table 2 Compatibility of sensor path types and subscription settings

Sensor path type

Push mode

Sensor group specified with a data push interval (sample-interval)

Availability of data push suppression interval (suppress-time) for the sensor group

Periodical

Default

Yes

No

Event-triggered

Default

No

No

Condition-triggered

Condition-triggered

No

Yes

 

To change the data push or push suppression interval for a sensor group in a subscription that has specified destination groups:

1.     Remove the sensor group from the subscription.

2.     Add the sensor group to the subscription again, with the new data push or push suppression interval.

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

push-mode

sensor path

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 [ gnmi ]

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.

gnmi: Specifies a gNMI sensor group. If you do not specify this keyword, this command creates a non-gNMI sensor group.

 

NOTE:

The gnmi keyword is supported only in Release 6616 and later.

Usage guidelines

When you enter the view of an existing gNMI sensor group, you do not need to specify the gnmi keyword.

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 non-gNMI 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 IPv4 address of the output interface for 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 uses the primary IPv4 address of the output interface for the route to the collectors.

Usage guidelines

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

Changing the source IP address for packets sent to collectors causes the device to re-establish the connection 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 [ gnmi ]

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.

gnmi: Specifies a gNMI subscription. If you do not specify this keyword, this command creates a non-gNMI subscription.

 

NOTE:

The gnmi keyword is supported only in Release 6616 and later.

Usage guidelines

When you enter the view for an existing gNMI subscription, you do not need to specify the gnmi keyword.

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 Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网