From b9d9b65a1d381b4410b64a6054a30cb5ab864a66 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl <5060861-schtobia@users.noreply.gitlab.com> Date: Wed, 28 Sep 2022 12:28:23 +0200 Subject: [PATCH] added initial --- .gitignore | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 2 ++ README.md | 28 +++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f0b69a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,68 @@ + +### CMake +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps + +### Vim +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +### C++ +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..0ae4414 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,2 @@ +# CMake configuration for demo project +cmake_minimum_required(VERSION 3.16) diff --git a/README.md b/README.md new file mode 100644 index 0000000..4fb38ce --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# Data collector + +## Task +Implement a service that collects system information upon reception of a trigger event. +The trigger event is raised when existence of a file with a certain name in a specified directory is detected. + +The following features must be implemented: +* Trigger detection + * Detect creation of a file in a somehow specified directory + * Make the directory configurable via commandline parameter + * Only trigger on files with names following this format: + * Starts with `core..` + * Ends with `lz4` + * Contains one or more hexadecimal id separated by dots + * Example: `core.ServiceName.3057.57dd721409bc4ab4b38a3c33a36a608a.3717.1647975805000000.lz4` +* Collected data shall be: + * Individual files, as well as whole directories and their contents, recursively, configured via command line parameter +* Store the collected data in a configurable directory, create a `tar`-archive of the aforementioned contents + * Give the resulting file a unique name. +* Add tests to make sure your application is working, + * How tests are implemented is up to you + +## Things to keep in mind +* Implement your collection in a way such that it can be extended to collect other data of various forms later. +* Use modern C++! +* Use the platform of your choice (Linux, BSD, MacOS, Windows, etc.) + * We use Linux but everything else is cool, too. +