Listing variables in Morpheus

If you want to see available variables in Morpheus, a nice way to do this is to use a Morpheus task that will dump the variables for you.
A python task is a handy way to do this as all of the Morpheus variables are grouped under a single python dictionary called morpheus.
Create a python task in Morpheus with the following content (assumes python3):

import json
print(json.dumps(morpheus))

Now run the task on an instance and it will dump all of the variables. You can view the output by clicking on the History tab of your instance and viewing the task output. You might want to copy the JSON output into your favourite JSON formatter to make it easier to read.
You can also run the task in other contexts, for example against a server, docker host, locally etc.

8 Likes