Skip to content

4.2. Visualisation

cecrob edited this page Dec 1, 2022 · 4 revisions

Visualisation of Saffron results as Kibana dashboard

After installing and running ElasticSearch and Kibana as detailed in the previous section, it is now time to add the results of Saffron in Kibana for visualisation in the dashboard.

1 - Run Saffron

If not already done, in order to visualize the results of Saffron in Kibana, you first need to run Saffron on the corpus of your choice using the command line interface approach. Kibana will use the output folder where you keep the results given by Saffron (json files). We will refer to this folder as SAFFRON_OUTPUT.

2 - Edit the elk.sh file

All the steps to integrate the Saffron results are included in one file: SAFFRON_HOME/kibana/elk.sh

The script elk.sh contains all the steps to run an ELK pipeline for the visualisation of a saffron run. It does the following steps:

  • Prepare the date to be compatible with the ElasticSearch format.
  • Index the data to ElasticSearch.
  • Register the indices as Kibana index patterns
  • Import the generated saffron_dashboard.ndjson

Note: The port that will be used for the url of the Kibana dashboard in your browser is coded in the KIBANA variable by default on port 5601 in the elk.sh file. To configure a different port, please change this value, as well as the one from the server.port in kibana.yml.

3 - Run the elk.sh script

  1. Make sure both ElasticSearch and Kibana are running in the background.
  2. In the terminal, write the following command from $SAFFRON_HOME/kibana/ :

./elk.sh YOUR_INDEX YOUR_DIR

  • YOUR_INDEX is your chosen index name of saffron run in the ELK stack. A valid INDEX will consist of alphabets (in a lower case) and digits only.
  • YOUR_DIR is your path for the saffron output directory.
  1. Visualize the results in the Kibana dashboard by navigating to http://localhost:KIBANA_PORT/ and clicking on the “dashboard” icon on the left hand-side (replacing KIBANA_PORT by the port where Kibana is running)

4 - Access the dashboard visualisation