If you plan to put it on TV, check tv.html. This is a screenshot of it, monitoring 2 servers on the same page:

Web directory

The default web root directory is /usr/share/netdata/web where you will find examples such as tv.html, and demo.html as well as the main dashboard contained in index.html.
Note: index.html have a different syntax. Don't use it as a template for simple custom dashboards.

Example empty dashboard

If you need to create a new dashboard on an empty page, we suggest the following header:

what dashboard.js does?

jquery.min.js, (only if jquery is not already loaded for this web page)

bootstrap.min.js (only if bootstrap is not already loaded) and bootstrap.min.css.

You can disable this by adding the following before loading dashboard.js:

<script>var netdataNoBootstrap =true;</script>

jquery.nanoscroller.min.js, required for the scrollbar of the chart legends.

bootstrap-toggle.min.js and bootstrap-toggle.min.css, required for the settings toggle buttons.

font-awesome.min.css, for icons.

When dashboard.js loads will scan the page for elements that define charts (see below) and immediately start refreshing them. Keep in mind more javascript modules may be loaded (every chart library is a different javascript file, that is loaded on first use).

Prevent dashboard.js from starting chart refreshes

If your web page is not static and you plan to add charts using javascript, you can tell dashboard.js not to start processing charts immediately after loaded, by adding this fragment before loading it:

<script>var netdataDontStart =true;</script>

The above, will inform the dashboard.js to load everything, but not process the web page until you tell it to.
You can tell it to start processing the page, by running this javascript code:

NETDATA.start();

Be careful not to call the NETDATA.start() multiple times. Each call to this function will spawn a new thread that will start refreshing the charts.

If, after calling NETDATA.start() you need to update the page (or even get your javascript code synchronized with dashboard.js), you can call (after you loaded dashboard.js):

NETDATA.pause(function() {
// ok, it is paused// update the DOM as you wish// and then call this to let the charts refresh:NETDATA.unpause();
});

The default netdata server

dashboard.js will attempt to auto-detect the URL of the netdata server it is loaded from, and set this server as the default netdata server for all charts.

If you need to set any other URL as the default netdata server for all charts that do not specify a netdata server, add this before loading dashboard.js:

Adding charts

To add charts, you need to add a div for each of them. Each of these div elements accept a few data- attributes:

The chart unique ID

The unique ID of a chart is shown at the title of the chart of the default netdata dashboard. You can also find all the charts available at your netdata server with this URL: http://your.netdata.server:19999/api/v1/charts (example).

To specify the unique id, use this:

<divdata-netdata="unique.id"></div>

The above is enough for adding a chart. It most probably have the wrong visual settings though. Keep reading...

The duration of the chart

You can specify the duration of the chart (how much time of data it will show) using:

AFTER_SECONDS and BEFORE_SECONDS are numbers representing a time-frame in seconds.

The can be either:

absolute unix timestamps (in javascript terms, they are new Date().getTime() / 1000. Using absolute timestamps you can have a chart showing always the same time-frame.

relative number of seconds to now. To show the last 10 minutes of data, AFTER_SECONDS must be -600 (relative to now) and BEFORE_SECONDS must be 0 (meaning: now). If you want the chart to auto-refresh the current values, you need to specify relative values.

Chart sizes

WIDTH and HEIGHT can be anything CSS accepts for width and height (e.g. percentages, pixels, etc).
Keep in mind that for certain chart libraries, dashboard.js may apply an aspect ratio to these.

If you want dashboard.js to remember permanently (browser local storage) the dimensions of the chart (the user may resize it), you can add: data-id="SETTINGS_ID", where SETTINGS_ID is anything that will be common for this chart across user sessions.

Netdata server

Each chart can get data from a different netdata server. You can give per chart the netdata server using:

Data points

For the time-frame requested, dashboard.js will use the chart dimensions and the settings of the chart library to find out how many data points it can show.

For example, most line chart libraries are using 3 pixels per data point. If the chart shows 10 minutes of data (600 seconds), its update frequency is 1 second, and the chart width is 1800 pixels, then dashboard.js will request from the netdata server: 10 minutes of data, represented in 600 points, and the chart will be refreshed per second. If the user resizes the window so that the chart becomes 600 pixels wide, then dashboard.js will request the same 10 minutes of data, represented in 200 points and the chart will be refreshed once every 3 seconds.

If you need to have a fixed number of points in the data source retrieved from the netdata server, you can set:

Where PIXELS_PER_POINT is the number of pixels each data point should occupy.

Data grouping method

Netdata supports average (the default), sum and max grouping methods. The grouping method is used when the netdata server is requested to return fewer points for a time-frame, compared to the number of points available.

You can give it per chart, using:

<divdata-netdata="unique.id"data-method="max"
></div>

Changing rates

Netdata can change the rate of charts on the fly. So a charts that shows values per second can be turned to per minute (or any other, e.g. per 10 seconds), with this:

The above will provide the average rate per minute (60 seconds).
Use 60 for /minute, 3600 for /hour, 86400 for /day (provided you have that many data).

The data-gtime setting does not change the units of the chart. You have to change them yourself with data-units.

This works only for data-method="average".

netdata may aggregate multiple points to satisfy the data-points setting. For example, you request per minute but the requested number of points to be returned are not enough to report every single minute. In this case netdata will sum the per second raw data of the database to find the per minute for every single minute and then average them to find the average per minute rate of every X minutes. So, it works as if the data collection frequency was per minute.

Selecting dimensions

By default, dashboard.js will show all the dimensions of the chart.
You can select specific dimensions using this:

netdata supports coma (,) or pipe (|) separated simple patterns for dimensions. By default it searches for both dimension IDs and dimension NAMEs. You can control the target of the match with: data-append-options="match-ids" or data-append-options="match-names". Spaces in data-dimensions="" are matched in the dimension names and IDs.

Chart title

You can overwrite the title of the chart using this:

<divdata-netdata="unique.id"data-title="my super chart"
></div>

Chart units

You can overwrite the units of measurement of the dimensions of the chart, using this:

<divdata-netdata="unique.id"data-units="words/second"
></div>

Chart colors

dashboard.js has an internal palette of colors for the dimensions of the charts.
You can prepend colors to it (so that your will be used first) using this:

<divdata-netdata="unique.id"data-colors="#AABBCC #DDEEFF ..."
></div>

Extracting dimension values

dashboard.js can update the selected values of the chart at elements you specify. For example, let's assume we have a chart that measures the bandwidth of eth0, with 2 dimensions in and out. You can use this:

Syncing charts y-range

If you give the same data-common-max="NAME" to 2+ charts, then all of them will share the same max value of their y-range. If one spikes, all of them will be aligned to have the same scale. This is done for the cpu interrupts and and cpu softnet charts at the dashboard and also for the gauge and easypiecharts of the netdata home page.