Event Generator - Custom Templates
Generates structured test events using predefined templates for testing pipelines.
Requirements
- The Demo connector does not require any credentials, making it a straightforward plug-and-play connector.
Details
This demo input connector generates simulated data from Okta System Logs / Tenable Assets / Tenable Vulnerabilities.
Configuration
The following configuration defines the input parameters. Each field's specifications, such as type, requirements, and descriptions, are detailed below.
Settings
| Setting | Type | Required | Description |
|---|---|---|---|
| Rate | int | Yes | The rate at which to generate records (between 1 and 1000) per second. |
| Custom Template | string | Yes | A custom template using the functions we provide to generate demo data. |
Secrets
None.
Example of a Custom Template
{
"data": {
"configurationFindings": {
"nodes": [
{
"id": "23ieoqbfdnoenwqs",
"targetExternalId": "{{ randomName }}",
"targetObjectProviderUniqueId": "08b52ca9c8a44c0593d6b3f56235c291",
"firstSeenAt": "{{ timestampRFC3339 }}",
"severity": "{{ randomStringFromList "LOW" "MEDIUM" "HIGH" }}",
"result": "{{ randomStringFromList "FAIL" "PASS" }}",
"status": "{{ randomStringFromList "OPEN" "CLOSED" "IN_PROGRESS" }}",
"remediation": "Follow the steps below to ensure that each [Pod](https://kubernetes.io/docs/concepts/workloads/pods) runs containers with allowed additional capabilities: \r\n* The following capabilities are not allowed. \r\n* `securityContext.capabilities.drop` key is set to `ALL`.",
"resource": {
"id": "{{ uuid }}",
"providerId": "{{ uuid }}",
"name": "{{ randomName }}",
"nativeType": "Pod",
"type": "{{ randomStringFromList "POD" "VM" }}",
"region": null,
"subscription": {
"id": "{{ uuid }}",
"name": "{{ randomStringFromList "Wiz - DEV Outpost" "Wiz - PROD" }}",
"externalId": "08b52ca9c8a44c0593d6b3f56235c291",
"cloudProvider": "{{ randomStringFromList "Azure" "AWS" "GCP" }}"
},
"projects": "{{ randomName }}",
"tags": [
{
"key": "pod-template-hash",
"value": "{{ randomName }}"
},
{
"key": "app.kubernetes.io/name",
"value": "{{ randomName }}"
},
{
"key": "app.kubernetes.io/instance",
"value": "{{ randomName }}"
}
]
},
"rule": {
"id": "{{ uuid }}",
"graphId": "08b52ca9c8a44c0593d6b3f56235c291",
"name": "{{ randomName }}",
"description": "{{ loremIpsum 15 }}",
"remediationInstructions": "{{ loremIpsum 10 }}",
"functionAsControl": {{ randomBool }}
},
"securitySubCategories": [
{
"id": "{{ uuid }}",
"title": "{{ randomName }}",
"category": {
"id": "08b52ca9c8a44c0593d6b3f56235c291",
"name": "{{ randomName }}",
"framework": {
"id": "08b52ca9c8a44c0593d6b3f56235c291",
"name": "{{ randomName }}"
}
}
},
{
"id": "08b52ca9c8a44c0593d6b3f56235c291",
"title": "{{ randomName }}",
"category": {
"id": "08b52ca9c8a44c0593d6b3f56235c291",
"name": "{{ randomName }}",
"framework": {
"id": "08b52ca9c8a44c0593d6b3f56235c291",
"name": "{{ randomName }}"
}
}
}
]
}
],
"pageInfo": {
"hasNextPage": {{ randomBool }},
"endCursor": "{{ uuid }}"
}
}
}
}
Supported functions for custom templates with examples
Given below are functions we support - indiciated in function_name. Uploading a custom demo template using these functions would allow you to to generate demo data.
- randomPublicIP - Generates a random public IP addresss
{
"ipAddress": "{{ randomPublicIP }}" // e.g., "203.0.113.42"
}
- randomUserAgent - Returns a random browser user agent
{
"userAgent": "{{ randomUserAgent }}" // e.g., "Mozilla/5.0 (Windows NT 10.0; Win64; x64)..."
}
- randomInt - Generates a random integer between min and max
{
"score": "{{ randomInt 1 100 }}" // e.g., "75"
}
- randomIPSet - Returns a random IP from a predefined set
{
"staticIP": "{{ randomIPSet }}" // e.g., "8.8.8.8"
}
- randomName - Generates a random full name
{
"name": "{{ randomName }}" // e.g., "John Smith"
}
- randomSUCCESSorFAILURE - Returns either "SUCCESS" or "FAILURE"
{
"status": "{{ randomSUCCESSorFAILURE }}" // e.g., "SUCCESS"
}
- uuid - Generates a random UUID
{
"id": "{{ uuid }}" // e.g., "550e8400-e29b-41d4-a716-446655440000"
}
- randomPrivateIP - Generates a random private IP address
{
"internalIP": "{{ randomPrivateIP }}" // e.g., "192.168.1.100"
}
- randomFloatFromList - Returns a random float from provided list
{
"price": "{{ randomFloatFromList 10.99 15.99 20.99 }}" // e.g., 15.99
}
- randomStringFromList - Returns a random string from provided list
{
"color": "{{ randomStringFromList \"red\" \"blue\" \"green\" }}" // e.g., "blue"
}
- randomBool - Returns a random boolean value
{
"isActive": "{{ randomBool }}" // e.g., true or false
}
- timestampUnixMiliSeconds - Current Unix timestamp in milliseconds
{
"unixTimeMS": "{{ timestampUnixMiliSeconds }}" // e.g., "1699459445000"
}
- timestampDateTime - Current timestamp as DateTime
{
"dateTime": "{{ timestampDateTime }}" // e.g., "2024-11-08T15:04:05.000Z"
}
- timestampUnix - Current Unix timestamp
{
"unixTime": "{{ timestampUnix }}" // e.g., "1699459445"
}
- timestampCurrentDate - Current date in YYYY-MM-DD format
{
"date": "{{ timestampCurrentDate }}" // e.g., "2024-11-08"
}
- timestampISO8601 - Current timestamp in ISO8601 format with milliseconds
{
"timestamp": "{{ timestampISO8601 }}" // e.g., "2024-11-08T15:04:05.999999Z"
}
- timestampRFC3339 - Current timestamp in RFC3339 format
{
"timestamp": "{{ timestampRFC3339 }}" // e.g., "2024-11-08T15:04:05Z07:00"
}
- loremIpsum - Generates Lorem Ipsum text with specified word count
{
"description": "{{ loremIpsum 10 }}" // e.g., "lorem ipsum dolor sit amet..."
}
- randomSystemType - Returns a random system type
{
"systemType": "{{ randomSystemType }}" // e.g., "Laptop"
}
- randomOS - Returns a random operating system name
{
"operatingSystem": "{{ randomOS }}" // e.g., "Windows 10"
}
- randomMACAddress - Generates a random MAC address
{
"macAddress": "{{ randomMACAddress }}" // e.g., "00:1A:2B:3C:4D:5E"
}