Exploring Experiments Journal

In this lesson, we will re-run an experiment as we did before, but this time we will generate a journal file for it which is stored in JSON format.

Chaos Toolkit allows us to create a journal file with information generated during an experiment.

Using the definition of health-http.yaml#

To generate data, we need to run an experiment. Let’s take a look at the definition of a familiar one.

We have already explored that experiment, so there’s probably no need to go through it. Even if you forgot it, you should have enough experience to deduce what it does yourself. Remember, the subject of this section is not to learn new ways to define experiments and destroy stuff, but to create reports. For that, we need data or, if we switch to Chaos Toolkit terminology, we need a journal.

Running chaos experiment with the --journal-path argument#

We’ll run the experiment in a similar way as before, but with a twist.

We added a new argument --journal-path, set to the path to the file journal-health-http.json. That’s where the journal data containing the information gathered throughout the experiment was stored. As you can guess from the file extension, that data was stored in the JSON format.

Inspecting the generated JSON file#

Let’s take a look at the file.

The output is too big to be presented in a lesson, so I will let you explore it from your screen. I don’t think you need me to guide you through it. With your current experience, you should be able to deduce what each of the sections in the journal is.

I don’t expect many people to want to read JSON output. However, it could be useful in its current form if we’d like machines to interpret it and, maybe, perform some additional actions. Machines love JSON; humans don’t, at least not for reading.

So, if we’re looking for a machine-readable output of the outcomes of an experiment, the journal is excellent. It is very easy to parse. However, in our case, that’s not the final outcome we’re looking for. We’re yet to discover how we can convert this into something that is more user friendly and easier for humans to read. In the next section, we’re going to try to figure out how to convert this JSON into a report, which could be in different formats. We’re yet to see which one we’re going to use.


The next lesson will show how to generate a report using the journal.

Deploying the Application
Creating Experiment Report
Mark as Completed
Report an Issue