Devices: Quick Start
This guide will walk you through configuring your first device in Director using a syslog server for illustration.
Configuration
Director searches the <vm_root>/config
directory recursively for files with .yaml
or .yml
extensions. You can organize your configurations in several ways:
Using the |
|
Using the |
|
Choose the grouping that best fits your needs—Director will find them regardless of the folder structure.
Basic UDP Setup
1. Create The Configuration File
Create a syslog configuration in your preferred location (e.g. config/devices/syslog.yaml
):
- id: 1
name: syslog_udp
type: syslog
properties:
protocol: udp
address: 0.0.0.0
port: 514
2. Test The Configuration
You can test the configuration using either Director's cross-platform companion Generator or traditional tools:
- Windows
- Linux
- macOS / Solaris / AIX
Using VirtualMetric Generator
vmetric-generator -mode=syslog -address=127.0.0.1:514 -message="Test Message"
Using VirtualMetric Generator
vmetric-generator -mode=syslog -address=127.0.0.1:514 -message="Test Message"
Using System Logger
logger -n 127.0.0.1 -P 514 "Test message"
Using System Logger
logger -n 127.0.0.1 -P 514 "Test message"
Secure TCP Setup
1. Prepare TLS Certificates
- Windows
- Linux
- macOS / Solaris / AIX
Using VirtualMetric Director
vmetric-director -pfx2pem=./cert-file.pfx # Windows
Using VirtualMetric Director
vmetric-director -pfx2pem=./cert-file.pfx
Using OpenSSL
openssl genrsa -out server.key 2048
openssl req -new -x509 -key server.key -out server.crt -days 365
Using VirtualMetric Director
vmetric-director -pfx2pem=./cert-file.pfx
Using OpenSSL
openssl genrsa -out server.key 2048
openssl req -new -x509 -key server.key -out server.crt -days 365
This generates the key.pem
and cert.pem
files.
Always use TLS encryption in production environments, especially over untrusted networks. Ensure proper file permissions are set on certificate files:
- Private key (
key.pem
) should be readable only by the Director process - Certificate file (
cert.pem
) can be world-readable
2. Create Secure Configuration
Update or create your configuration file, e.g. config/devices/secure_syslog.yaml
:
- id: 2
name: syslog_secure
type: syslog
properties:
protocol: tcp
address: 0.0.0.0
port: 6514
tls:
status: true
cert_name: cert.pem
key_name: key.pem
framing: octet
max_connections: 1000
timeout: 300
batch_size: 5000
queue:
interval: 2
The cert.pem
and key.pem
are generated via pfx2pem
.
3. Place TLS Certificates
Copy the certificate files to your Director root directory:
- Windows
- Linux
- macOS / Solaris / AIX
cp cert.pem key.pem <vm_root>/
cp cert.pem key.pem <vm_root>/
cp cert.pem key.pem <vm_root>/
4. Test Secure Configuration
Test the secure connection:
- Windows
- Linux
- macOS / Solaris / AIX
echo "Test secure message" | openssl s_client -connect 127.0.0.1:6514
echo "Test secure message" | openssl s_client -connect 127.0.0.1:6514
echo "Test secure message" | openssl s_client -connect 127.0.0.1:6514
Performance Tuning
For high-volume environments, add the following to your configuration:
reuse: true
workers: 4
buffer_size: 32768
flush_interval: 5
Monitoring
Check Director's logs for success messages on launching and initialization, connection acceptance, and configuration validation.
Worker counts, buffer sizes, and batch settings can be adjusted based on your message volume.
Next Steps
Configure and use message forwarding, advanced authentication options, and pipelines.