Configuring and Querying Data Using gRPC

You can configure and query data using gRPC.

Prerequisites

  • There are reachable routes between the device and NMS.
  • The user is correctly configured and added to the administrator group, and the service type is HTTP.
  • An ACL has been created if it is needed for the gRPC service to control which clients can connect to the server. For details about how to create an ACL, see HUAWEI NetEngine 8000 F Series Router Product Documentation > Configuration Guide > Security > ACL.

  • An SSL policy has been bound to the gRPC service so that a secure SSL connection can be established between the server and client. For details about how to create an SSL policy, see "Configuring and Binding an SSL Policy" in Configuration Guide > Basic Configuration.

Context

In dial-in mode where the device functions as the gRPC server and the collector functions as the gRPC client, you can configure and query data through gRPC.

For details about how to subscribe to data using gRPC, see telemetry subscription sections.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run grpc

    The gRPC view is displayed.

  3. Run one of the following commands as required to enter the server view:

    • On an IPv4 network, run the grpc server command to enter the gRPC server view.
    • On an IPv6 network, run the grpc server ipv6 command to enter the gRPC IPv6 server view.

  4. Run source-ip ip-address [ vpn-instance vpn-instance-name ]

    A source IP address to be listened for is configured.

  5. (Optional) Run server-port port-number

    The number of a port to be listened for is configured.

  6. (Optional) Run acl { acl-name | acl-number }

    An ACL configured for the gRPC service.

  7. (Optional) Run idle-timeout time

    An idle timeout interval is set for the gRPC service.

  8. Run ssl-policy ssl-policy-name

    An SSL policy is configured for the gRPC service.

  9. (Optional) Run ssl-verify peer

    The server is configured to perform SSL verification on the client.

  10. Run server enable

    The gRPC service is enabled.

  11. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >