Skip to content
This new developer portal is under construction. For complete documentation, please refer to the old developer portal.

Telemetry Configuration

This section explains how to enable and manage telemetry for an Algorand node, allowing node operators to gather performance and usage insights. Telemetry can be configured by parameters such as whether telemetry is enabled, what URI the logs should be sent to, and/or credentials for an Elasticsearch server. The node automatically applies these settings at startup, or at runtime.

Telemetry Config refers to the configuration settings that manage remote logging and data collection for Algorand nodes. It enables node operators to control the transmission of performance and usage data, which helps improve the software and identify potential issues. By configuring telemetry, node operators can choose to enable or disable the sending of this data, contributing to the ongoing enhancement and troubleshooting of the Algorand network.

Initialization

When a node is run using the algod command, before the script starts the server, it configures its telemetry based on the appropriate logging.config file. The algoh command, which hosts algod, configures logging and telemetry before calling algod. These commands can override the config file’s telemetry enable field’s value using the -t flag. When a node’s telemetry is enabled, a telemetry state (which wraps the node’s hook for the elasticsearch server to which the logs are saved) is added to the node’s logger, reflecting the fields contained within the appropriate config file.

Configuration

A node’s telemetry status can be managed using the diagcfg CLI, which modifies the node’s logging.config file. This file instructs the node’s construction of its TelemetryConfig struct, defining the following fields:

KeyData typeDescription
EnableboolDetermines whether Algorand remote logging is enabled for this node.
SendToLogboolDetermines whether telemetry entries should also be logged locally.
URIstringThe URI for the elastic search server to be logged to. Leave blank for default.
NamestringThe machine’s name for remote logging purposes.
GUIDstringA unique identifier for the node’s telemetry logging. Except in contrived circumstances, one GUID should exist across all nodes running on a machine.
MinLogLevellogrus.LogLevelThe lowest event significance that should be logged.
ReportHistoryLevellogrus.LogLevelThe logrus importance level at which the node’s history will be reported. It must be greater than or equal to MinLogLevel.
FilePathstringThe location to which the logging.config file instance of the struct will be saved.
UserNamestringThe username credential for establishing an elastic telemetry hook.
PasswordstringThe password credential for establishing an elastic telemetry hook.

An Algorand node host can configure their node’s telemetry before running it by modifying the logging.config file in their node’s data directory, or deleting this file and modifying their ~/.algorand/logging.config file. In addition, the user can alter a running node’s telemetry status using the diagcfg CLI

Config File Location

The file named logging.config informs the initial configuration of a node’s telemetry. There will typically be at least two logging.config files on a machine running a node: one for each node the machine runs, stored in that node’s data directory, and a global config file stored in ~/.algorand/. This global file is generally only accessed when a node-specific config file cannot be found.

However, the diagcfg telemetry command tree, which replaces the functionality of goal logging, updates or creates both the local and global config files when executing any command that changes the node’s telemetry state. It only fails to create the local file if no dataDir is provided, in which case there’s presumably also no node running.