Examples: User Notes
This chapter is intended to introduce you to the functionality of Directory by way providing of simple, illustrative examples.
The use cases provided are indeed simple in order not to confuse the uninitiated. However, there are a few details you have be aware of or keep in mind while carrying out the step-by-step procedures.
Configuration Files
To configure telemetry streams, DataStream uses YAML files.
On Windows, make sure file extensions are visible. To check this, go to File Explorer and select View > Show > File name extensions.
This is to avoid surprises like the system adding another extension to your YAML file's extension, e.g. file.yml.txt
, in which case VirtualMetric applications will not be able to recognize them.
Director parses all YAML files found under the <vm_root>/Director/config
folder and runs them. It ignores the filenames you use since that is only for your convenience: i.e. to organize your components as you see fit.
For more details of the management of configuration files, review this section.
Working Directory
For our purposes, and to keep things simple, we will be using the following folder as our working directory:
- PowerShell
- Bash
New-Item -Path <vm_root>\Director\config\Examples -ItemType Folder
mkdir <vm_root>/Director/config/Examples
We will be placing all our configuration and data source files needed for the examples in this folder. We will also specify our output files to be created here.
For the sanity of the example runs, make sure there are no YAML files under Director's config
directory (except for vmetric.yml
) and its subfolders.
There will be files placed under the config
directory by default during an automated installation. Make a backup of the config
folder, and then remove those files.
The only YAML files present throughout each example section should be those we deliberately create and place under our working directory.
Message Sender
In our examples, we will be handling log emssages, and we will have to send those messages by some mechanism. For that purpose, we will be using the generator mode of Director.
The generator mode needs to be run on a separate terminal, and is called like this:
.\vmetric-director -generator -now -count 10 -address ...
You are of course free to use some other traditional tool—such as logger
for Unix-based on platforms. Only make sure that it is not invasive, and only sends messages to the listeners on specific ports.
Logging Setup
Finally, a simple logging setup is in order for you to be able to check the status of your runs.
-
Go to
<vm_root>
, i.e. the path leading to the VirtualMetric folder -
Find Director's
config
directory, which is directly under it -
Open the file named
vmetric.yml
, -or- create it if it doesn't exist -
Make sure the settings in it match the following, -or- add them to the newly created one:
debug:
log:
status: true
level: 4
console:
status: true
Level 4
indicates that only error messages will be logged.
Director will generate the log of your runs and place it in the following directory:
- PowerShell
- Bash
<vm_root>\Director\storage\logs\
<vm_root>/Director/storage/logs/
Deleting the generated file is harmless. So long as the above debugging setting remains, it will be re-created with each run if there are any errors.
Examples
You can now proceed to the examples to explore the basics of configuring telemetry flows with DataStream applications.
See Director in action:
-
Example: Ingesting Data - Configure your first device to receive streaming data
-
Example: Secure Ingestion - Reconfigure your device to receive streaming data securely
-
Example: Forwarding Data - Configure your first target to send streaming data
-
Example: Reading JSON With a Pipeline - Configure your first pipeline to receive and process data
-
Example: A Syslog-To-JSON Data Stream - A full, end-to-end data stream in action
See Agent in action:
- Example: Log Collection with Agents - Configure your first Agent to collect log data from another machine