Exporter implementation#42
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new command-line interface (CLI) and inter-process communication mechanism to the agent, allowing users to start and stop metric exports via commands. It also refactors the build system and agent binary for improved usability and maintainability. The most important changes are grouped below.
Agent CLI and Export Functionality:
main.cc) that allows sending "export start" and "export stop" commands to the running agent process using a POSIX message queue. The agent now distinguishes between CLI and daemon modes based on the executable name, and creates a hardlink (voltad) for the daemon. [1] [2] [3]MessageQueueabstraction for POSIX message queues, supporting both sender and receiver roles, with notification and message handling logic. [1] [2]Exporterclass that manages exporting collected metrics to a CSV file, with start/stop control via message queue commands. Exported metrics include device information and timestamps. [1] [2] [3]Scheduler, enabling runtime control of metric export and reflecting export status in the dashboard. [1] [2] [3] [4]Build System and Configuration:
volta_agenttovolta, and updated all related references inCMakeLists.txt. Added logic to create a hardlink namedvoltadfor agent mode. [1] [2] [3] [4]/var/lib/volta/dumps) to the agent configuration, with support for override. [1] [2]These changes collectively enable dynamic metric export control via CLI commands, improve agent usability, and modernize the build and configuration setup.