Run a SimData simulation

Run a Simdata simulation from the command line as follows:

java -jar simdata-<version>.jar -s <simulation_file> -c <scene_file>

For example, to run the SimData example simulation, enter:

java -jar simdata-1.0.0.jar -s webserver.simulation -c webserver.json

Before you send event data via HEC

When sending output from your simulation to an HTTP Event Collector (HEC) data input (the SplunkHEC option in the scene file), make sure you do the following before running SimData:

  1. Start your instance of Splunk Enterprise.
  2. Enable HEC.
  3. Create an HEC data input for the simulation.
  4. Configure the scene file with the HEC token and index name.

Changing variables at runtime

When demonstrating the Splunk platform with simulated data, you often need to change the value of certain simulation variables at runtime to generate different behaviors. For example, to demonstrate how Splunk Enterprise can help IT operators monitor or diagnose web request failures, the simulated web traffic data starts with a successful scenario.

To trigger a change in a well-behaved system, you can signal failed web requests in a number of ways. For example:

  • Set a flag variable in a Webserver entity to indicate that the web server should respond with failures.
  • Define a maximum request queue size variable in the Webserver entity. Reducing the value simulates the decreased capacity of the web server and may cause web request failures.
  • Define a web request response-time variable. Increasing the value simulates the increased delay of web requests and may cause web request failures.

For more, see the controls section in the SimData scene configuration reference.

Using the simulation control UI

SimData provides a web-based user interface for you to update the value of variables at runtime at http://localhost:11013 or the port you specify using the SimData CLI. You can disable this web server by passing the --no-web flag. For more, see the SimData CLI reference.

This UI exposes controls for bots of entity types with runtime variable controls. Each entity type has a set of controls to modify the state of all bots of that type. Additionally, each bot has its own set of controls to modify the state of only that bot. The simulation control UI refreshes the state of bots every second.