Built-in variables
Reference of variables you can use in Splunk Synthetic Monitoring, with examples of how to use each variable.
Splunk Synthetic Monitoring provides built-in variables for use in your synthetic tests. Use the variable name to reference a variable in a test during setup.
Random variables
Splunk Synthetic Monitoring provides the following set of random variables you can use in your tests:
Variable |
Description |
Example |
---|---|---|
|
A random string of hexadecimal digits |
|
|
A random 10-digit integer |
|
Date-and-time variables
Splunk Synthetic Monitoring provides the following set of date and time variables you can use in your tests:
Variable |
Description |
Example |
---|---|---|
|
Today’s date, in |
|
|
The current year |
|
|
The current month, in |
|
|
The current day of the month, in |
|
|
The current time, in |
|
Location variables
Splunk Synthetic Monitoring provides the following set of location variables you can use in your tests:
Variable |
Description |
Example |
---|---|---|
|
The region of the current location |
|
|
The public IP address of the current location |
|
|
The name of the current location |
|
|
The name of the current location, formatted as a parameter |
|
|
The latitude value of the current location |
|
|
The longitude value of the current location |
|
|
The coordinates of the current location |
|
Request variables for API Tests
Splunk Synthetic Monitoring provides the following set of request variables you can use in your API Tests:
Variable |
Description |
Example |
---|---|---|
|
The JSON response body |
|
|
The size of the JSON response body, in megabytes |
|
|
The HTTP response code of the API Test |
|
|
Response time of the request, in milliseconds |
|
|
DNS time of the request, in milliseconds |
|
|
Time to first byte of the request, in milliseconds |
|
Use a variable in a test
While creating or editing a test, the right-hand Variables tab shows a list of built-in variables and existing global variables you can use. Select the name of a variable to copy it to your keyboard and paste it in the field of your choice.