StorageGRID Webscale provides highly scalable S3-compatible object storage. One system can be composed of hundreds of StorageGRID Webscale nodes deployed across Docker, VMWare, engineered systems (appliances), and even in the cloud. StorageGRID Webscale 11.0 makes managing heterogenous nodes easier by introducing a new metrics database engine that collects system and services level attributes and makes them available through a centralized metrics management APIs. With this feature, customers can now extract various metrics directly from StorageGRID and build custom dashboards for monitoring their grid’s system status, health, performance, ILM operations, etc.

API Documentation

The metrics API is part of the existing StorageGRID Management API framework. Once you log in to the Grid Manager, you will find the documentation for the metrics API by accessing Help > API Docs on the web-based interface.
Here are the new metrics API calls available:

The swagger API documentation interface allows you to create and try specific operations. Once you input the desired values into the parameters section and click “Try It Out!”, the requested operation is executed against the Management API of your grid. The API documentation page also displays the corresponding command in cURL as well as the actual requested URL. Either of these can be used in a script or a request to automate operations against the Management API.

Sample queries

Here are some sample queries you can try out in the swagger docs page. The /grid/metric-names operation can be used to list out all the available metrics that StorageGRID tracks. The /grid/metric-query operation can be used to query the metrics database.

Description Query
Free space for object storage on each node storagegrid_storage_utilization_usable_space_bytes
Percentage of free space for object storage on all nodes sum(storagegrid_storage_utilization_usable_space_bytes) / sum(storagegrid_storage_utilization_total_space_bytes)
All object storage utilization metrics for a node named “DC1-S1” {__name__=~"storagegrid_storage_utilization.+",instance="DC1-S1"}
Average number of objects known by all nodes avg(storagegrid_content_objects)
State of each software service node_service_state
Services requested to be stopped and are stopped (0 == node_service_state) and (0 == node_service_desired_state)
Free space on partition /var/local for all nodes node_filesystem_free{mountpoint="/var/local"}

Another useful query is the /grid/metric-labels operation, which can be used to list metrics labels such as node names. Try /grid/metric-labels/instance/values for list of all node names.

Command line interaction

You can use these commands to authorize an account’s username/password to login, persist the session information in a cookies file (cookie.jar), and then call the metric API. Below is an example to authorize credentials and list the names of the nodes using the metrics-labels operation. Most API integrations would use the "Authorization: Bearer [Token]" header instead of the cookie mechanism because it is typically not considered safe to persistently store authorization information.

$ curl -X POST --header "Content-Type: application/json" --header "Accept: application/json" -d "{"username": "myname","password": "mypassword","cookie": true}" "" -k -c cookie.jar 

$ curl -X GET --header "Accept: application/json" "" -k -b cookie.jar

The result looks like this:


Access Control

Customers also have the option to allow certain sets of users in their organization to only have permission to monitor the grid. In addition to the root user account, which has unrestricted access, they can create groups that have a subset of privileges with only the metrics-query privileges and assign users to the group. This may be useful to expose metrics to other teams in the organization without giving them full access to the grid.

If desired, create a group with metrics-query permissions, navigate to Configuration > Admin Groups. Click the 'Add' button, select the appropriate group type (Local or Federated) and click 'Save'. Enter the group information, select the desired management permissions from the list and click 'Save' to persist your changes.

Users can also be local or federated. To create one or more local users that belong to a local group, navigate to Configuration > Admin Users on the GMI. Click the 'Create' button, enter the user information, select the newly-added metrics query group and click 'Save' to persist your changes.

StorageGRID Webscale 11.0 introduces a centralized metrics management API. With this feature, customers can now extract various metrics directly from StorageGRID and build custom dashboards for monitoring their grid’s system status, health, performance, ILM operations, etc.

If you want to learn more about StorageGRID Webscale, check out our other posts or contact your local sales team to access a demo system available on the internet.

About Alvin Lam

Alvin spends most of his day leading an engineering team working on next-generation storage software. His corporate mission is to do the exact opposite of Dilbert cartoons. Outside of his day-to-day role, Alvin works with code and snacks competitively. He is currently Director of Engineering for NetApp StorageGRID Webscale and holds a degree in Computer Engineering from the University of British Columbia.

Pin It on Pinterest