Create a Graph to Visualize Resource Statistics
Create the following sheet metadata file named util2.json
in the directory /usr/lib/webui/analytics/sheets/site/
:
{ "$schema": "file:///analytics-import.schema.json", "v1": { "groups": [ { "description": "Rate of change of the reads, writes, and errors counts for the util2 example", "uniqueName": "util2 statistics Group", "visualizations": [ "util2 writes", "util2 Customers" ] } ], "sections": [ { "groups": [ "util2 statistics Group" ], "uniqueName": "util2 statistics Section" } ], "sheets": [ { "description": "Resource statistics for the util2 example.", "sections": [ "util2 statistics Section" ], "tags": [ "data_attach", "static resources" ], "uniqueName": "util2 statistics" } ], "visualizations": [ { "description": "Rate of change of writes count for all resources", "ssids": [ "//:class.app/util2//:res.*//:stat.writes//:op.rate" ], "style": "time-series", "uniqueName": "util2 writes" }, { "description": "Rate of change of reads, writes, and errors count for Customers", "ssids": [ "//:class.app/util2//:res.inst/Customers//:stat.*//:op.rate" ], "style": "time-series", "uniqueName": "util2 Customers" } ] } }
This file defines a sheet with two visualizations. One visualization shows the rate of change of write operation counts for each resource. The second visualization shows the read, write, and error count rates of change for one resource.
Restart the webui/server:default
service and ensure the service is online and the visualization definitions were successfully read:
$ svcadm restart svc:/system/webui/server:default $ svcs webui/server STATE STIME FMRI online 15:47:13 svc:/system/webui/server:default $ svcs -Lx webui/server
When administrators open the Sheets view in the System Web Interface, they see a new sheet named util2 statistics, shown in the following figure. The visualization named util2 writes shows the rate of change of the writes count for the Customers resource, the Orders resource, and the Products resource. The visualization named util2 Customers shows the rate of change of the reads, writes, and errors counts for the Customers resource.
You can create partitions and use mapping to enable administrators to choose how they want to view the data. Instead of providing multiple visualizations with different views of the data, you can provide a single visualization that enables administrators to display the data in different ways. See Separating Data Into Partitions for more information.
Graph Showing Statistics for Resources
