Analytics Settings
The properties described in the following table enable you to collect all analytic data, set the number of hours of data to retain, and set a hostname lookup policy.
| Property | Description |
|---|---|
|
|
Retention interval in hours for per-second data |
|
|
Retention interval in hours for per-minute data |
|
|
Retention interval in hours for per-hour data |
|
|
Hostname lookup policy |
Get Settings
This command gets the current values of analytics properties.
Example Request:
GET /api/analytics/v1/settings HTTP/1.1 Authorization: Basic Tm8gcGVla2luZyE= Host: zfs-storage.example.com:215 Accept: application/json
Example Result:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 131
X-Zfssa-Analytics-Api: 1.0
{
"settings": {
"href": "/api/analytics/v1/settings",
"retain_hour_data": 600,
"retain_minute_data": 400,
"retain_second_data": 200,
"hostname_lookup": true
}
}Modify Settings
The modify settings command is used to modify analytics settings, such as data retention values and the hostname lookup policy.
Example Request:
PUT /api/analytics/v1/settings HTTP/1.1
Authorization: Basic Tm8gcGVla2luZyE=
Host: zfs-storage.example.com:215
Content-Type: application/json
Content-Length: 60
{"retain_hour_data":600, "retain_minute_data":400, "retain_second_data":200, "hostname_lookup":true}Example Result:
HTTP/1.1 202 Accepted
Content-Type: application/json
Content-Length: 101
X-Zfssa-Analytics-Api: 1.0
{
"settings": {
"href": "/api/analytics/v1/settings",
"retain_hour_data": 600,
"retain_minute_data": 400,
"retain_second_data": 200,
"hostname_lookup": true
}
}