PORTAL LAYOUT

Widget are positioned on the portal page using a grid layout. The dimensions of the grid are specified under the [configuration] tag.

[configuration]
  width-units = 3
  height-units = 2

In this example, the page is split into 3 columns and 2 rows.

The default grid dimensions are 6×4. The default widget size is 1×1 and can be adjusted with width-units and height-units settings.

To display multiple widgets on one row, group them using the [group] tag.

[configuration]
  width-units = 3
  height-units = 2
 
#1st line
[group]
  [widget]
  [widget]
  [widget]
 
#2nd line
[group]
  [widget]
  [widget]
  [widget]

As an alternative to creating groups for each row, add the widgets-per-row setting under the [group] tag.

[configuration]
  width-units = 3
  height-units = 2
 
[group]
  widgets-per-row = 3
  [widget]
  [widget]
  [widget]
  [widget]
  [widget]
  [widget]
3x2 Grid Layout (manual grouping)

6_widget_portal

Chart Lab: View

2x3 Group Layout (per row grouping)

portal-per-row

Chart Lab: View

[configuration] Settings

NameExampleDescriptionChart Lab
titletitle = CPU Busy PortalName of portal.
width-units width-units = 2Amount of horizontal blocks (9 by default).View
height-unitsheight-units = 2Amount of vertical blocks (4 by default).View
offset-rightoffset-right = 50Determines the margin on the portal.
Offset can be used with: top, right, bottom, left.
Values specified in px.
View
urlurl = http://hostname:portLink to ATSD server.
url-parametersurl-parameters = db=12&adapter=7Extra connection configurations.
context-pathcontext-path = /api/v1Default context-path is /api/v1/.

Context path replaces the API context path which is set to /api/v1 by default. The context path is used by widgets a prefix before method path. If method-path is /series/query and context-path is /api/v1, then the request path will be /api/v1/series/query.

View
method-pathmethod-path = /series/queryDefault method path is specific for data type.
/series/query
/properties/query
/messages/query
/alerts/query

See the context-path description above.

update-intervalupdate-interval = 5 minutePolling interval at which new data is requested from the server by all widgets on the portal. For example update-interval = 5 minute.
The default value is 1 minute.
The setting can be overridden for each widget separately.
Chart updates are disabled if the endtime parameter for the portal or the widget is set to a fixed date. For example: endtime = 2016-06-27T00:00:00Z.
View
View
batch-updatebatch-update = trueSending series to the server in packets (false by default).
If equal to true, then the series, if during the last request to the server there was an error, will be sent one by one.
View
batch-sizebatch-size = 1Maximum amount of series in one request to the server (8 by default).
If 0 is indicated, then the limit for the amount is not set.
Only accepted when batch-update is equal to true.
View
timespantimespan = 2 hourAllows to adjust the time-span that the whole portal displays, i.e. 1 hour, 1 day, all.
This can be set for the whole portal or for each widget individually.
View
starttimestarttime = 2015-04-01Specifies the date and time from which the values for the series are loaded.
This can be set for the whole portal or for each widget individually.
Syntax is shared with endtime.
NOTE: starttime is inclusive and endtime is exclusive.
This means that startime = 2015-09-14 10:00:00 will include data points that occurred exactly at 10:00:00 and later.
Endtime = 2015-09-14 11:00:00 will include data points that occurred up to 10:59:59, excluding points that occurred at 11:00:00 and later.
Possible values are described on the End Time page.
View
endtimeendtime = previous_working_daySpecifies the date and time until which the values for the series are loaded.
This can be set for the whole portal or for each widget individually.
NOTE: starttime is inclusive and endtime is exclusive.
This means that startime = 2015-09-14 10:00:00 will include data points that occurred exactly at 10:00:00 and later.
Endtime = 2015-09-14 11:00:00 will include data points that occurred up to 10:59:59, excluding points that occurred at 11:00:00 and later.
Possible values are described on the End Time page.
View
timezonetimezone = UTCSet the timezone for the data being loaded into the portal.
If UTC is not set, then the portal is displayed in the local time zone.
Possible values: UTC
View
dialog-maximizedialog-maximize = trueif set to true the dialog window will open full-screen.
Dialog window can be opened by clicking on the widget title.
Possible values: true, false
Default value: true
View
periodsperiods = 20 minute, 4 hourAdd custom aggregation periods to aggregation controls in the top-right corner of the widget.View
buttonsbuttons = updateAdd buttons to widget title (header), visible only on mouse-over.
Possible values: update, reset.
Update stops/resumes the loading of fresh data into the widget.
Reset is only available for table widgets, resets the sorting of columns.
View
scriptscript = defaultChartConfig.colors = ['olive']JavaScript code, evaluated before the addition of widgets into the DOM of the browser.
Allows to reallocate the style of elements, give meaning by default for certain types of widgets or change a certain widget
(if you show this parameter in the tag [widget], then the argument widget will be given, being itself the main object of this widget and containing it main methods).
View

Freemarker expressions are supported when creating portals. Learn how to use freemarker expressions in ATSD.

Configuration Example:

[configuration]
title = Title
width-units = 6
height-units = 3
url = http://atsd_server:port
url-parameters = db=12&adapter=7

Comments

Single-line comments

Single line comment starts with #. Text after # will be ignored.

[widget]
        type = chart   
        #metric field will be inherited by all series in the widget
	metric = nmon.cpu_total.busy%

A hash symbol in the middle of the line (preceded by any character other than tab or whitespace) is escaped and treated as regular text.

[widget]
        type = chart   
        #next line does not contain any comments because hash is preceded by characters other than tab or whitespace.
	title = Hello # World

Multi-line comments

Multi-line comments start with /* and end with */.

Any text between /* and */ will be ignored.

[widget]
        type = chart
    /*   
     type = bar
     title = Hello
    */  
	metric = nmon.cpu_total.busy%

Placeholders

You can insert placeholders into the configuration text to populate them with values of request parameters. Placeholders have the {placeholderName} format. The value of the placeholder is parsed from the query string from any parameter starting with p_, e.g. p_placeholderName.

[series]
entity = {id}
metric = cpu_busy

Invoked with ‘?p_id=nurswgvml002’ the above configuration is converted into the following text:

[series]
entity = nurswgvml002
metric = cpu_busy

Script parameter in the [configuration] tag

Script parameter can be used for a variety of purposes. It is recommended for advanced users.

Adding styles to a class:

script = d3.select('head').append('style').html('.axi-chart-series-alert{ stroke: red; stroke-width: 1.5; }')

Displaying no more than 5 elements for the control of all Time Charts. Open in the dialog box:

defaultDialogChart.script = widget.chart.panels.expand(5)

Hiding the Stack button for all Bar Charts. Not open in the dialog box:

defaultBarConfig.script = if (!dialog) widget.panels[0].destroy()