Create a Custom Telemetry Collector
This topic describes the steps that are required to create a custom telemetry collector.
In this topic, we'll walk you through creating your own custom telemetry service using power-related metrics as an example.
Step 1. Execute the CLI Command
Starting in Apstra version 4.2.0, you can run CLI show commands for Junos devices
directly from the Apstra GUI. Although you can run show
commands without opening a CLI session, its primary purpose is to help you
create your own custom telemetry collectors.
You can execute CLI commands from within a staged or active blueprint (shown in our example), or from the Devices > Managed Devices page.
Before you get started, identify the CLI command that you want to use for the
output values. In this procedure, we're using the show chassis
power
command as an example.
To execute the CLI command:
Step 2. Identify the Keys and Values of Interest from the CLI Output
show
command to view the power utilization for your
devices.Step 3. Create a Service Schema
A service defines your schema. You can create a service for a schema with a single output value or multiple output values. This procedure shows how to create a schema with multiple output values.
To create a service schema:
Step 4. Create a Telemetry Collector
So far, you've defined the data you want to collect and determined how the data will be organized and structured. Our final step is to create a telemetry collector for our service.
A service is composed of one or multiple collectors. In this example, the service has a single collector.
When you define the integer (number) values for a collector, you might need to enter a value expression for the collector to function. This is because Junos occasionally reports number data as a string. Before the collector can be processed, you must perform a conversion from string to integer on the Apstra side.
To define the integer (number) values for a collector, enter int(value) into the Value Expression field, then click Submit.
You can also use additional operators as shown in the figure below. Calculating the Thermal_Output, for example, multiplies the used capacity by 3.41. For more information, see Calculating System Thermal Output.
