This Platform Telemetry Agent for Observability as a Service (ObaaS) manages and updates node metric and log configurations, re-executing metric and log collectors with the latest configuration.
To develop Platform Telemetry Agent, the following prerequisites are required:
The required Go version for the agents is outlined here.
Run the make ptabuild command to build the platform telemetry agent binary. The compiled binary can be found in the build/artifacts directory.
Example:
$ cd platform-telemetry-agent/
$ make ptabuild
$ ls build/artifacts/
platform-telemetry-agentRun the make package command to build the platform telemetry agent Debian package. The package can be found in the build/artifacts directory.
Example:
$ cd platform-telemetry-agent/
$ make package
$ ls build/artifacts/
package platform-telemetry-agent_<VERSION>_amd64.buildinfo platform-telemetry-agent_<VERSION>_amd64.deb
platform-telemetry-agent_<VERSION>_amd64.build platform-telemetry-agent_<VERSION>_amd64.changesRun the make tarball command to generate a tarball of the platform telemetry agent code. The tarball can be found in the build/artifacts directory.
Example
$ cd platform-telemetry-agent/
$ make tarball
$ ls build/artifacts/
platform-telemetry-agent-<VERSION> platform-telemetry-agent-<VERSION>.tar.gzTo run the platform telemetry agent binary after compiling:
./build/artifacts/platform-telemetry-agent -config configs/platform-telemetry-agent.yaml
The platform telemetry agent Debian package can be installed using apt:
sudo apt install -y ./build/artifacts/platform-telemetry-agent_<VERSION>_amd64.debTo uninstall the platform telemetry agent, use apt:
sudo apt-get purge -y platform-telemetry-agent-
Status:
sudo systemctl status platform-telemetry-agent -
Start:
sudo systemctl start platform-telemetry-agent -
Stop:
sudo systemctl stop platform-telemetry-agent
To view logs:
sudo journalctl -u platform-telemetry-agent -f
-
Build platform telemetry agent binary and mock binaries:
make build -
Run unit tests:
make test -
Run integration tests:
make integration_test -
Run linters:
make lint -
Get code coverage from unit and intergration tests:
make cover -
Run package test:
make package_test
Apache-2.0