# 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 ```json { "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. 1. **randomPublicIP** - Generates a random public IP addresss ```json { "ipAddress": "{{ randomPublicIP }}" // e.g., "203.0.113.42" } ``` 2. **randomUserAgent** - Returns a random browser user agent ```json { "userAgent": "{{ randomUserAgent }}" // e.g., "Mozilla/5.0 (Windows NT 10.0; Win64; x64)..." } ``` 3. **randomInt** - Generates a random integer between min and max ```json { "score": "{{ randomInt 1 100 }}" // e.g., "75" } ``` 4. **randomIPSet** - Returns a random IP from a predefined set ```json { "staticIP": "{{ randomIPSet }}" // e.g., "8.8.8.8" } ``` 5. **randomName** - Generates a random full name ```json { "name": "{{ randomName }}" // e.g., "John Smith" } ``` 6. **randomSUCCESSorFAILURE** - Returns either "SUCCESS" or "FAILURE" ```json { "status": "{{ randomSUCCESSorFAILURE }}" // e.g., "SUCCESS" } ``` 7. **uuid** - Generates a random UUID ```json { "id": "{{ uuid }}" // e.g., "550e8400-e29b-41d4-a716-446655440000" } ``` 5. **randomPrivateIP** - Generates a random private IP address ```json { "internalIP": "{{ randomPrivateIP }}" // e.g., "192.168.1.100" } ``` 6. **randomFloatFromList** - Returns a random float from provided list ```json { "price": "{{ randomFloatFromList 10.99 15.99 20.99 }}" // e.g., 15.99 } ``` 7. **randomStringFromList** - Returns a random string from provided list ```json { "color": "{{ randomStringFromList \"red\" \"blue\" \"green\" }}" // e.g., "blue" } ``` 8. **randomBool** - Returns a random boolean value ```json { "isActive": "{{ randomBool }}" // e.g., true or false } ``` 9. **timestampUnixMiliSeconds** - Current Unix timestamp in milliseconds ```json { "unixTimeMS": "{{ timestampUnixMiliSeconds }}" // e.g., "1699459445000" } ``` 10. **timestampDateTime** - Current timestamp as DateTime ```json { "dateTime": "{{ timestampDateTime }}" // e.g., "2024-11-08T15:04:05.000Z" } ``` 11. **timestampUnix** - Current Unix timestamp ```json { "unixTime": "{{ timestampUnix }}" // e.g., "1699459445" } ``` 12. **timestampCurrentDate** - Current date in YYYY-MM-DD format ```json { "date": "{{ timestampCurrentDate }}" // e.g., "2024-11-08" } ``` 13. **timestampISO8601** - Current timestamp in ISO8601 format with milliseconds ```json { "timestamp": "{{ timestampISO8601 }}" // e.g., "2024-11-08T15:04:05.999999Z" } ``` 14. **timestampRFC3339** - Current timestamp in RFC3339 format ```json { "timestamp": "{{ timestampRFC3339 }}" // e.g., "2024-11-08T15:04:05Z07:00" } ``` 15. **loremIpsum** - Generates Lorem Ipsum text with specified word count ```json { "description": "{{ loremIpsum 10 }}" // e.g., "lorem ipsum dolor sit amet..." } ``` 16. **randomSystemType** - Returns a random system type ```json { "systemType": "{{ randomSystemType }}" // e.g., "Laptop" } ``` 17. **randomOS** - Returns a random operating system name ```json { "operatingSystem": "{{ randomOS }}" // e.g., "Windows 10" } ``` 18. **randomMACAddress** - Generates a random MAC address ```json { "macAddress": "{{ randomMACAddress }}" // e.g., "00:1A:2B:3C:4D:5E" } ```