This project aims to collect and process various system metrics (such as CPU, memory and network usage) very efficiently, so that they can be retrieved multiple times per second (for instance, every 50ms). It is designed to work with Snap Telemetry.
This repo is organized as the following:
- Two C++ libraries,
CircularArray
andMetroCollect
- Three standalone interfaces using the aforementioned libraries:
MetroCollectValues
(which collects and prints values),MetroCollectStats
(which collects, compute stats and print them) andMetroCollectFile
(which collects and write values into CSV format) - The Snap plugin interface,
MetroCollectSnap
, which can collect values, compute stats and send either of them to the Snap daemon. It works with a fork of the C++ Snap plugin library
Refer to USAGE.md for more information on how to use these programs.
MetroCollect's documentation is available on GitHub pages.
All OSs currently supported by plugin:
- Linux/amd64
A C++ 17 compiler such as GCC 7 is required.
The libraries and standalone interfaces do not have additional dependencies. The Snap plugin interface requires the C++ Snap plugin library and its dependencies, which should be installed on the system first. MetroCollect uses static linking of those libraries for the programs to be portable.
Refer to the DEPENDENCIES.md file for more information.
If the Snap and its dependencies are built in the /usr/local/lib
, execute ldconfig /usr/local/lib/
to allow the ld
linker to look for installed libraries there.
Then you can compile with CMake:
cd MetroCollect
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
make install
Other build configured types are Debug
, Release
, and RelWithDebInfo
(to profile with Linux Perf or GPerfTools).
The buildall.sh
script can be used to build MetroCollect Snap Plugin library and its dependencies automatically. It can either download the dependencies from GitHub or use local ones in the third_party
folder.
Refer to USAGE.md
The documentation can be built with Doxygen from the build
directory. It is installed in doc/html
.
cd MetroCollect
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make doc
make install
This repository is one of many plugins in Snap, a powerful telemetry framework. The full project is at http://github.com/intelsdi-x/snap. To reach out on other use cases, visit Slack.
Snap, along with this plugin, is an Open Source software released under the Apache 2.0 License.
- Author: Maxime Amossé, on behalf of Capital Fund Management