Custom dashboards and charts

You can create custom dashboards in AFA that include built-in charts, custom charts, or both, by defining them directly in XML.

Note: For more details, see AlgoSec Reporting Tool.

Configure custom charts

When creating a dashboard with custom charts, you must configure the custom charts before you configure the dashboard itself.

  • You specify the title of the chart.

  • You specify the type of chart.

  • You specify the variable for which the chart displays data.

  • You specify the Y-axis values the chart displays.

  • For bar charts, you also specify the following:

    • The number of devices displayed in the chart.
    • Whether the chart starts with displaying the devices with the most of the variable or the least of the variable.
    • The direction of the chart.
  • For trend charts, you also specify how many days back the chart displays.

Add a custom chart

  1. Open a terminal and log in using the username "afa" and the related password.
  2. Create a new file in /home/afa/.fa/charts.

  3. Name the file chart_name.xml, where chart_name is the name you choose for the chart.

  4. Add the CHART tag to the file, using the information in Chart tag reference. For an example, see Chart Example.
  5. Save the file.

Chart tag reference

This reference describes the use of the chart tag and its sub-tags.

Tag syntax is presented as follows:

  • All parameters and content are presented in italics.
  • All optional elements of the tag appear in square brackets [ ].

Note: All tags, parameters, and content are case sensitive, and must be in lower case.

Configure a custom dashboard

Configure a custom dashboard by specifying the charts that the dashboard includes, the relevant device group, and the number of charts that appear in a row.

Do the following:

  1. Open a terminal and log in as user afa.

  2. Create a new file in /home/afa/.fa/dashboards.

  3. Name the file <dashboard_name>.xml, where <dashboard_name> is the name you choose for the dashboard.

  4. Add the DASHBOARD tag to the file, with the additional CHARTS and CHART sub-tags.

    For more details, see Dashboard tag reference and Dashboard configuration example.

Dashboard tag reference

The following table describes the DASHBOARD tag and its subtags.

Tag name Description
DASHBOARD

Identifies the dashboard and specifies how charts are oriented. Includes the CHARTS sub-tag.

Parameters include:

  • name. String. The dashboard name. This name appears at the top of the dashboard.

  • columns. The number of charts that appear in each row of the dashboard.

    The charts will be filled in order of appearance, from left to right and top to bottom.

CHARTS

Defines all the charts that appear in the dashboard.

Includes several CHART sub-tags.

CHART

Defines the type of data in the chart, and which device group's data appears in the chart.

Parameters include:

  • group. String. The name of the AFA device group that is analyzed in the chart.

  • definition_file. String. The name of the chart XML file.

    Specify a custom chart that you created and saved in the <AFA home dir>/.fa/dashboards/charts directory, or a built-in chart.

Dashboard configuration example

The following code shows an AFA dashboard configuration file, including a DASHBOARD tag and CHARTS and CHART sub-tags.

        <DASHBOARD columns="2" name="Summary">
 <CHARTS> 
  <CHART definition_file="total_risks_per_type_per_fw.xml" group="ALL_FIREWALLS"/>
  
        <CHART definition_file="security_rating_trend.xml" group="ALL_FIREWALLS"/>
  
        <CHART definition_file="rules_per_fw.xml" group="ALL_FIREWALLS"/>
  
        <CHART definition_file="covered_rules_per_fw.xml" group="ALL_FIREWALLS"/>
 
        </CHARTS>
        
</DASHBOARD>