Create your first system

The first step is to create a system. Here is how to do it.

Create a Data Source in the created system

Now that you’ve created your system, you should add a Data Source, to describe what signals you can monitor and record on your system.

Create trigger

The next step is to create a trigger, with condition on signals you’ve just created.

Request implementation

Now, you can request necessary implementation for the Heex Agent to work and read your systems’ signal. Here, it is fake signals.

Build the Agent SDK and generate an event

Prerequisites

Setting Up Your Heex Environment

Get an API key to download and use the cli

  1. Go to Account settings
  2. Create an API key
  3. You can now copy it

Get the Heex CLI

  1. Download the CLI with the following command:
curl -X GET "https://api.app.heex.io/v1/cli/download?operating_system=$(( $(uname -m | grep -q 'x86_64' && echo 1 || echo 2) ))" -H "secret_key: <API_KEY>" -o heex && chmod +x heex 

Replace API_KEY with your API key

  1. Now you can use the CLI with the ./heex command.

For more details, go to the following page CLI

Get the Heex SDK

  1. Download the Heex SDK with the following command
./heex sdk download --api-key <API_KEY> --unzip
  1. Now, you should build the SDK with the following command
./heex sdk build

For more details, go to the following page SDK

Code implementations

Go to getStarted directory. Either chose the Python or C++ directory depending on what you want to use.

Create monitor (Python/C++)

  1. Open the Monitor source file.
  2. Replace the monitorUuid (monitor_uuid in python) variable with the implementation ID of your monitor.

Create recorder (Python/C++)

  1. Open the recorder source file.

  2. Replace the recorderUuid (recorder_uuid in python) variable with the implementation ID you get on the cloud for the recorder.

  3. Add a label: In the generateRequestedLabels function add as many labels as you want as shown by the example.

  4. Add a recording: Create a recording sample by using echo "This is Smart Data!" > file.txt. Provide the path of this file in the generateRequestedFilePaths function (filepath = "/path/get-started/cpp/file.txt").

Build [only for C++]

Make sure you have built the SDK before this step!

Then run the following commands in the get-started/cpp directory:

cmake -DCMAKE_BUILD_TYPE=Release -S . -B build -DHEEX_SDK_DIR=/path/to/Heex_SDK_<version>
cmake --build build --config Release -j2

Notify your implementations to deploy

Go to the web platform and validate your implementations in the developer’s page. Now your system should be in state “To deploy”.

Launch the Heex Agent

  • Download the systemConf of your system (This step will be made automatically in your production systems). Run the following command from the Heex_SDK directory:
./heex system get --system-id s-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--output-file ./kernel/systemConfs/systemConf-getstarted.json \
--api-key ku-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Add credentials for your system:
./heex system add-credentials \
--system-id s-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
--api-key ku-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
  • Launch Heex: go inside the Heex_SDK folder and run:
./kernel/heexOrchestrator -c ./kernel/systemConfs/systemConf-getstarted.json
  • Launch Monitors and Recorders

    Go in the get-started/cpp directory and open two terminals:

    1. On the first one, start the Recorder using ./GetStartedRecorder

    📝 Note:

    Note that it is important to start the recorder first.

    1. On the second terminal start the Monitor using ./GetStartedMonitor

    ℹ️ Note: CONGRATULATIONS!

    You just generated 1 event!

    Find your event on the web application, in the events part.