Skip to main content
Version: 1.2.0

Example: Ingesting Data

This section will help you get started with devices to ingest data with specific protocols, walking you through a common use case.

info

For a detailed discussion of devices, see this section.

Scenario

Use UDP as the listening protocol.

Setup and Trial

Loading include…

We will create a device that will receive data from Syslog using an insecure UDP connection.

Create the device configuration

Create a file named from-syslog-udp.yml in our working directory, and then open it with a text editor to enter the following:

from-syslog-udp.yml
devices:
- id: 1
name: from_syslog_udp
type: syslog
status: true
properties:
protocol: udp
address: 127.0.0.1
port: 514

This YAML code specifies that this is a Syslog device, that it will use UDP as its protocol, and that it will be listening on port 514. You can enter any integer as the id value.

Loading include…

However, we also need to define a target that the ingested data willl be directed to, and a route combining the device and the target.

Create a file named to-console.yml and add the following target definition to it:

to-console.yml
targets:
- name: to_console
status: true
type: console

Now create a file named syslog-to-console.yml and add the following route definition to it.

syslog-to-console.yml
routes:
- name: syslog_to_console
devices:
- name: from_syslog_udp
targets:
- name: to_console
info

To see the ingested data, your must route the stream to a specific destination! For a detailed discussion of Routes, see this section.

We are now ready to try our configuration.

Run the UDP device

Open a terminal and enter the following in the command line to start Director:

.\vmetric-director -background

This will start Director as a background process which you can verify as indicated before. Now enter:

.\vmetric-director -console

The -console switch will print status messages to the terminal.

After you press Enter, you will see a stream of initialization messages and our device will be spawned off, waiting to receive Syslog messages.

Run the configuration

We can now run the reception using Director's cross-platform generator mode.

Open a new terminal and enter the following in the command line:

  • Using generator mode
.\vmetric-director -generator -now -mode syslog -count 1 -address "127.0.0.1:514" -message="Hello world"
Loading include…

If you are using the generator mode, after you press Enter the program will start sending our message, one at a time, to Syslog. It will signal that it sent the message with a prompt like this:

1 message sent successfully in 11 ms with 0 error(s) at 2025-06-02 01:54:02.0349011 +0300 +03 m=+2.821324601
2 messages sent successfully since 2025-06-02 01:54:00 +0300 +03

After sending a limited number of messages—say 5 of them—press Ctrl+C to exit the process.

If you now switch back to Director's terminal, you will see each sent message (i.e. "Hello world") as received on the console:

<1> 2025-06-02T08:33:28+03:00 VirtualMetric Test[3872]: Hello world

Monitoring

Check that the example worked by verifying:

  • Messages appeared in Director's console output
  • No error files in the directory indicated here

If you see the "Hello world" messages displayed, data ingestion is working correctly.


In the next section, we will create a secure device to ingest the data.