+ Description: "\n## Session variables\n\nThis section describes the session variables that can be used with some of the actions.\n\n<details>\n<summary><a name=\"session_variables\"></a>Session variables</summary>\n\nSome action parameters support session variables. A session variable is defined by putting the variable, prefixed by a dot, within double curly brackets, such as `{{.UserName}}`.\n\nThe following session variables are supported in actions:\n\n* `UserName`: The simulated username. This is not the same as the authenticated user, but rather how the username was defined by [Login settings](#login_settings). \n* `Session`: The enumeration of the currently simulated session.\n* `Thread`: The enumeration of the currently simulated \"thread\" or \"concurrent user\".\n\nThe following variable is supported in the filename of the log file:\n\n* `ConfigFile`: The filename of the config file, without file extension.\n\nThe following functions are supported:\n\n* `now`: Evaluates Golang [time.Now()](https://golang.org/pkg/time/). \n* `hostname`: Hostname of the local machine.\n* `timestamp`: Timestamp in `yyyyMMddhhmmss` format.\n* `uuid`: Generate an uuid.\n* `env`: Retrieve a specific environment variable. Takes one argument - the name of the environment variable to expand.\n\n### Example\n```json\n{\n \"action\": \"ElasticCreateApp\",\n \"label\": \"Create new app\",\n \"settings\": {\n \"title\": \"CreateApp {{.Thread}}-{{.Session}} ({{.UserName}})\",\n \"stream\": \"mystream\",\n \"groups\": [\n \"mygroup\"\n ]\n }\n},\n{\n \"label\": \"OpenApp\",\n \"action\": \"OpenApp\",\n \"settings\": {\n \"appname\": \"CreateApp {{.Thread}}-{{.Session}} ({{.UserName}})\"\n }\n},\n{\n \"action\": \"elasticexportapp\",\n \"label\": \"Export app\",\n \"settings\": {\n \"appmode\" : \"name\",\n \"app\" : \"CreateApp {{.Thread}}-{{.Session}} ({{.UserName}})\",\n \"savetofile\": true,\n \"exportname\": \"Exported app {{.Thread}}-{{.Session}} {{now.UTC}}\"\n }\n}\n\n```\n\n```json\n{\n \"action\": \"createbookmark\",\n \"settings\": {\n \"title\": \"{{env \\\"TITLE\\\"}}\",\n \"description\": \"This bookmark contains some interesting selections\"\n }\n}\n```\n</details>\n",
0 commit comments