Robots

Your robot can make use of the built-in Ark TelemetyStage to allow it to send and store telemetry on the Catalog. See the telemetry page for more details.

Registering a Robot

A robot can begin sending data via telemetry without any special registration process. However, if you wish to take advantage of things such as automatic offloading or robot secrets, you need to complete the registration process.

By setting the authentication_file_path configuration variable in the TelemetryStageConfig, the robot will attempt to authenticate from the contents of that file. If the file is empty or invalid, it will attempt to register itself with the catalog.

If a robot is trying to register itself, it will display (in the debug log) and publish (over registration_requests channel) a message with a secret code. You can use the ark-telemetry-robot-tool to complete the registration:

~/ark$ ./build/ark-telemetry-robot-tool --list-robot-registrations

This will list all pending robot registrations. You can approve the registration by looking at the code, making sure it matches expectations, and entering:

/build/ark-telemetry-robot-tool --approve-registration <CODE> --organization <ORG GUID>

This will cause the robot to receive a set of credentials and write them to the given file. It will periodically reauthenticate with those credentials. If that file is lost, a new registration will need to take place.

Secrets

Secrets can be assigned to a robot and stored in the catalog. These will be pulled down from an authenticated robot and published on the secrets channel. To create or list secrets, use the ark-telemetry-robot-tool:

~/ark$ ./build/ark-telemetry-robot-tool --organization <ORG GUID> --robot <SERIAL> --list-secrets
Secret1 = Value1
Secret2 = Value2

You can store arbitrary strings in the secret values. Creating them looks like this:

~/ark$ ./build/ark-telemetry-robot-tool --set-secret 'Secret1=Value1' --organization <ORG GUID> --robot <SERIAL>

You can also delete previously set secrets with the --remove-secret flag.

Access Tokens

Once a robot has authenticated, it will publish its access token on the tokens channel. This allows other stages (such as the offload stage) to receive these tokens and use them for authentication when offloading logs. See the offload stage documentation for more.