Skip to content

Exporter implementation#42

Merged
FW-Nagorko merged 7 commits into
develfrom
agent/exporter
Jun 22, 2026
Merged

Exporter implementation#42
FW-Nagorko merged 7 commits into
develfrom
agent/exporter

Conversation

@FW-Nagorko

Copy link
Copy Markdown
Collaborator

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:

  • Added a CLI mode to the agent (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]
  • Implemented a MessageQueue abstraction for POSIX message queues, supporting both sender and receiver roles, with notification and message handling logic. [1] [2]
  • Added an Exporter class 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]
  • Integrated the exporter and message queue into the agent's Scheduler, enabling runtime control of metric export and reflecting export status in the dashboard. [1] [2] [3] [4]

Build System and Configuration:

  • Renamed the agent binary and CMake target from volta_agent to volta, and updated all related references in CMakeLists.txt. Added logic to create a hardlink named voltad for agent mode. [1] [2] [3] [4]
  • Added a default dump directory path (/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.

@varev-dev varev-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🚀

@FW-Nagorko FW-Nagorko merged commit 419166d into devel Jun 22, 2026
1 check passed
@FW-Nagorko FW-Nagorko deleted the agent/exporter branch June 22, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants