Configuring telemetry collectors

This task configures telemetry streaming to an external collector—for monitoring and analysis.

  1. In privileged EXEC mode, enter configure terminal.
    device# configure terminal
  2. Enter the telemetry collector command, specifying a collector name.
    device(config)# telemetry collector collector_1
  3. Enter the ip port command, specifying the IPv4 address and port of the collector.
    device(config-collector-collector_1#) ip 10.168.112.10 port 1
  4. Enter the profile command to add one or more telemetry profiles.
    device(config-collector-collector_1)# profile system-profile  default_system_utilization_statistics
    device(config-collector-collector_1)# profile interface-profile default_interface_statistics
  5. To specify a VRF context other than mgmt-vrf, enter the use-vrf command.
  6. Enter the encoding command to specify the encoding format.
    device(config-collector-collector_1)# encoding ?
    Possible completions:
      gpb    Google protobuf encoding
      json   JSON encoding
    device(config-collector-collector_1)# encoding json
    
  7. Enter the activate command to activate the collector.
    device(config-collector-collector_1)# activate
  8. To confirm the configuration, enter the show running-configuration telemetry collector command.
    device(config-collector-collector_1)# do show running-configuration telemetry collector
    telemetry collector <collector-profile-1>
      ip <ipv4address1> port <portNum>
      profile system-utilization default_system_utilization_statistics
      profile interface default_interface_statistics
      use-vrf mgmt-vrf
      encoding json
      activate  
    
    
  9. To display the status of a telemetry collector, enter the show telemetry collector command.
    device(config-collector-collector_1)# do show telemetry collector collector_1 
    Telemetry data is streamed to collector_1 on 10.128.116.10 and port 1, with transport as tcp.
    
    Profiles Streamed                      Interval   Uptime      Last Streamed
    -------------------                    ---------  ----------  ---------------
    default_interface_statistics           120 sec    05/10:23    2017-01-15: :05:07:33
    default_system_utilization_statistics  300 sec    05/10:23    2017-01-15: :05:07:33
    !
  10. To display the status of active telemetry collector sessions, enter the show telemetry collector summary command.
    device# show telemetry collector summary
    Activated Collectors:
    --------------------
    Name              IP Address:Port       Streaming/Connection Status
    -------------     --------------------  ---------------------------
     coll1            10.24.65.182:9000     connection_failed
    

Example

The following example configures and activates a telemetry collector.

device# configure terminal
device(config)# telemetry collector collector_1 
device(config-collector-collector_1)# profile system-profile default_system_utilization_statistics
device(config-collector-collector_1)# profile interface-profile default_interface_statistics
device(config-collector-collector_1)# ip 10.168.112.10 port 1
device(config-collector-collector_1)# encoding json 
device(config-collector-collector_1)# activate