- Adding Custom Data to the Oracle Solaris 11.4 StatsStore and System Web Interface
- Adding Data to the Oracle Solaris StatsStore
- Adding Data: Steps and Best Practices
- How to Add Data
How to Add Data
- Decide what data to provide.
Provide only data that users are likely to want in order to use the application as effectively as possible or to troubleshoot problems. Adding all available data to the statistics store might cause administrators to spend more time finding the data they really need.
-
What are the most meaningful metrics for this application?
-
What information are users most likely to need to diagnose a performance degradation?
-
Can you provide useful data about how the application is interacting with users, with other applications, or with the operating system?
-
- Decide the best form in which to provide the data.
In most cases, you should provide counter data. See Type of Data to Provide for more information.
- Define the statistics.
Create metadata files that define your statistics as described in Adding Resources and Statistics to the Statistics Store Namespace.
-
Give each statistic a descriptive SSID (
id
) and an informative description. -
Set the value of
stability
tostable
so that all users can browse the data. Similarly, be very judicious about specifying authorizations required to read data. Anyone who is authorized to use your application should be able to browse the data about the application. -
Specify any resources, partitions, and topology mappings that are needed.
See the
ssid-metadata
(7) man page for best practices for naming resources, statistics, and partitions. -
- Modify your application to update values for the statistics that you created in metadata.
Use the interfaces described in Interfaces for Providing Statistic Values.
If you are not using static resources, your application might need to create resources as well. See Adding Resources Dynamically.
- Record data values.
Recording data values causes the values to be stored in the statistics store so that users can retrieve current and historical values. When your application writes data values, each value overwrites the previous value unless the values are being requested.
-
Users can record values by displaying a sheet that contains those statistics in the System Web Interface while the application is writing the values.
-
Users can record values by running the
sstore capture
command while the application is writing the values. -
An application can record values by calling
sstore_data_read
() while the application is writing the values. -
To persistently record values whenever the values are written, create and enable a collection as described in Creating a Collection.
-
- Create charts and graphs of the data.
How will your users use this information? Decide how the information should be organized into groups of charts and graphs for most effective use in the System Web Interface. What type of visualization is most appropriate for this data?
Typically, each statistic is shown on a separate visualization. Related statistics can be shown on the same visualization if the statistics are in the same units and can be shown in the same time scale.
Related events can be included on the same visualization with other data for visualizations with a time axis.
Will your users want to see some system-provided statistics along with your application statistics? You can include visualizations for those statistics on the same sheet with your application statistics for easier visual correlation.
Create metadata files that describe your visualizations as described in Creating Visualizations. Give each visualization and sheet a useful title and description.