Go to main content

man pages section 5: File Formats

Exit Print View

Updated: Thursday, June 13, 2019
 
 

analytics (5)

Name

analytics - file format for analytics visualizations and sheets

Description

Visualizations and sheets for the analytics web application are pre-defined by using JSON files. These files are loaded during start and refresh of svc:/system/webui/server:default, and are made available to all users of Analytics. This allows delivery of visualizations and sheets at system deployment time, in addition to interactively through the BUI application.

Analytics attempts to use the most appropriate visualization for the ssids in a visualization. However, manual customizations are also available for visualization selection, time periods, so on.

A sheet is made of up sections, which in turn contain groups of visualizations.

A single file can deliver visualizations only, groups of visualizations, sections containing groups of visualizations, or complete sheet definitions including sections, groups and visualizations.

Each sheet/section/group/visualization name must be unique amongst all delivered objects. Object names should include a unique identifier by vendor, and local customizations can use the "site" convention.

All JSON files with the .json file extension, and which match the visualization or sheet schema in /usr/lib/webui/analytics/sheets are loaded. ISV-delivered visualizations and sheets should be placed in the "vendor" subdirectory under the ISV name. The "site" is reserved for local additions.

Failure to load any visualizations or sheets on service startup will place the svc:/system/webui/server:default service in degraded, and error messages will appear in the service's log file, accessible with svcs –Lv svc:/system/webui/server:default.

FORMAT

The entire definition of the allowed fields is defined by the schema files in /usr/lib/webui/analytics/sheets/.

A minimal sheet definition is as shown below:

{
    "v1": {
        "visualizations": [
                    {
            "ssids": [ "//:class.cpu//:stat.xcalls//:op.rate" ],
            "uniqueName": "site/CPU Crosscalls"
        }
                ],
                "groups": [
                    {
                        "visualizations": [ "site/CPU Crosscalls" ],
            "uniqueName": "site/CPU Crosscalls"
        }
    ],
                "sections": [
                    {
                       "visualizations": [ "site/CPU Crosscalls" ],
                        "uniqueName": "site/CPU Crosscalls"
                    }
                ],
                "sheets": [
                    {
                        "visualizations": [ "site/CPU Crosscalls" ],
                        "uniqueName": "site/CPU Crosscalls"
                    }
                ]
     }
   }

The value of uniqueName can only contain alphanumeric characters, plus ' ', '-', '/', and '.'. All other characters are explicitly disallowed.

The value of uniqueName is used as a reference between a sheet's sections, a section's groups, a group's visualizations and the visualization definition. It is also used as the visible name for the sheet or visualization. Multiple sheets may refer to the same visualization.

Sheets may also define a description, where the character set is not restricted.

Layout, style of graph, and color/line preferences for individual ssids may be specified.

Examples

Example 1 Single Chart With one SSID, and a Sheet to Contain it

The following example shows a single chart with one ssid and a sheet to store the ssid.

{
     "v1": {
        "visualizations": [
                    {
            "ssids": [ "//:class.cpu//:stat.xcalls//:op.rate" ],
            "uniqueName": "site/CPU Crosscalls"
        }
                ],
                "groups": [
                    {
                        "visualizations": [ "site/CPU Crosscalls" ],
                        "uniqueName": "site/CPU Crosscalls"
                    }
                ],
                "sections": [
                    {
                        "visualizations": [ "site/CPU Crosscalls" ],
                        "uniqueName": "site/CPU Crosscalls"
                    }
                ],
                "sheets": [
                    {
                        "visualizations": [ "site/CPU Crosscalls" ],
            "uniqueName": "site/CPU Crosscalls"
        }
                ]
            }
     }

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Uncommitted

See Also

soljsonvalidate(1), analytics(7), webui(7)