Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Using the Streaming API

General

The streaming API fetches both test and monitor data. It is not possible to single out one of these categories.

The streaming API does not fetch data from script-based tests (those represented by a rectangle instead of a jigsaw piece in the Control Center GUI), such as Ethernet service activation tests and transparency tests.

Kafka Topic Names

The Kafka topic names for the streaming API are as follows, where %s is the short name of the Control Center account (indicated when creating the account):

Examples of Using the Streaming API

The examples that follow are found in the tarball paa-streaming-api-client-examples.tar.gz contained within the Control Center tarball.

First, there is a basic example demonstrating how the metrics and their metadata are streamed separately and simply print the received messages to the console. You can run it as follows:

There is also a more advanced example where metrics and metadata messages are correlated. Use this command to run it:

You need to use sudo to run Docker commands such as the ones above. Optionally, you can follow the Linux post-installation steps to be able to run Docker commands without sudo. For details, go to docs.docker.com/engine/install/linux-postinstall.