#Snapshot Dashboard
1 messages · Page 1 of 1 (latest)
hi @foggy palm yes, that is the correct REST API to use to gather snapshot information, including size
@unborn cloud Thanks , let try to have conf file ,
@unborn cloud
Query has more details that what we need
/storage/volumes/{volume.uuid}/snapshots
How do i configure pass volume uuid in conf fille
`name: Snapshots
query: /api/storage/volumes/*/snapshots
object: snapshots_detail
counters:
-^^volume.name => volume
-^^volume.uuid => uuid
endpoints:
- query /api/storage/volumes/{volume.uuid}/snapshots
counters:
-^^uuid => snapshot_uuid
-^^name => snapshot_name
endpoints:
- query /api/storage/volumes/{volume.uuid}/snapshots/{uuid}
counters:
-^^volume.name => volume_name
-^^name => snapshot_name
-^^svm.name => svm
-^^create_time
-^^size => snapshot_size
export_options:
instance_keys:
- volume
- uuid
- svm
- snapshot_size
- snapshot_name`
@foggy palm
You can follow this template
name: Snapshot
query: api/storage/volumes/*/snapshots
object: snapshot
counters:
- ^^uuid => uuid
- ^^volume.uuid => volume_uuid
- ^name => snapshot
- ^svm.name => svm
- ^volume.name => volume
- create_time(timestamp) => create_time
- size => size
export_options:
instance_keys:
- uuid
- volume_uuid
instance_labels:
- svm
- volume
- snapshot
Please take this updated template as you would need all the labels in metrics.
name: Snapshot
query: api/storage/volumes/*/snapshots
object: snapshot
counters:
- ^^uuid => uuid
- ^^volume.uuid => volume_uuid
- ^name => snapshot
- ^svm.name => svm
- ^volume.name => volume
- create_time(timestamp) => create_time
- size => size
export_options:
include_all_labels: true
@patent sundial Thank you , will run and let you know
@patent sundial i see this is working but not did not get data from all svm that i have ,
Also noticed size is not same in rest call and in exporter
I have checked prometheus and rest call values for couple of snapshots and they are matching.
% curl -s http://localhost:13008/metrics |grep snapshot_size | grep snapshot-75661f95-038c-4371-954e-8fb9c6518a52
snapshot_size{datacenter="rest",cluster="umeng-aff300-01-02",snapshot="snapshot-75661f95-038c-4371-954e-8fb9c6518a52",svm="astra_300",volume="trident_pvc_be8b6f8d_4aeb_4222_ba47_84966ecc59b2",uuid="72fd2a46-f4e2-4440-a7e8-49d419190a4a",volume_uuid="2d9401a2-ce28-11ed-b61b-00a098d39e12"} 45977600
% ./bin/harvest rest -p sar show data --api storage/volumes/2d9401a2-ce28-11ed-b61b-00a098d39e12/snapshots --field="name=snapshot-75661f95-038c-4371-954e-8fb9c6518a52"
[
{
"poller": "sar",
"addr": "x.x.x.x",
"api": "storage/volumes/2d9401a2-ce28-11ed-b61b-00a098d39e12/snapshots",
"version": "9.13.1",
"cluster_name": "umeng-aff300-01-02",
"records": [
{
"create_time": "2023-03-30T01:04:50+12:00",
"logical_size": 203251712,
"name": "snapshot-75661f95-038c-4371-954e-8fb9c6518a52",
"provenance_volume": {
"uuid": "2d9401a2-ce28-11ed-b61b-00a098d39e12"
},
"size": 45977600,
"svm": {
"name": "astra_300",
"uuid": "835c0d25-ceb0-11eb-80e3-00a098d39e12"
},
"uuid": "72fd2a46-f4e2-4440-a7e8-49d419190a4a",
"version_uuid": "72fd2a46-f4e2-4440-a7e8-49d419190a4a",
"volume": {
"name": "trident_pvc_be8b6f8d_4aeb_4222_ba47_84966ecc59b2",
"uuid": "2d9401a2-ce28-11ed-b61b-00a098d39e12"
}
}
],
"num_records": 1,
"poll_ms": 1160
}
]
@patent sundial still it does not report from other SVM in same cluster
is there something spcial we need to do for unit conversion ? i m tried bytes but value show as MB/GB/TB but not KB ,
@foggy palm when you say other SVMs, do you mean to say data are not coming from other node SVM or admin SVM ? Or couple of data SVMs' data are also not coming in the REST response/Harvest metrics ?
The unit of this size metric is in bytes from ONTAP and Harvest export them as-is and generally unit conversion would be in Grafana panels and Grafana would show them TB/GB/MB/KB based on the value.
Also, When you say size is not same for exported data and rest call, Could you share specific Rest o/p and exported data o/p where it's not same ?
@patent sundial
- Other SVM are data type only ( when manully run rest api it does how but it does not show in harvest , checking logs from harvest to see )
- Yup i used bytes in unit and it should convert it to TB/GB/MB/KB but it does not do well
3.Size is now matching probably i was looking at different values.
Thanks for update.
For 1, Could you share harvest logs for that poller with us @ ng-harvest-files@netapp.com?
For 2, Could share more light on units conversion part, what kind of issue/problem you may have faced ?
For 3, Seems we are good here.
@foggy palm in addition to the log files that @muted shuttle asked for, there was a REST pagination bug we fixed in an earlier release of Harvest. Can you let us know which version of Harvest you are using?
@unborn cloud @muted shuttle Sure
@unborn cloud Version is harvest version 23.08.0-1 (commit 874a1f87) (build date 2023-08-21T08:36:53-0400) linux/amd64
that's good, you'll have the pagination fix
i sent email with subject snapshot details
Thanks @foggy palm , we have received the logs, checking for any abnormality in that.
@patent sundial i suspect rest call consider default SVM only ?
This wildcard * Rest call would not give all the snapshots data from the cluster. I have shared the template in mail to get the all the snapshot data via Rest private cli
@patent sundial Thank you let me run new template that you shared
@patent sundial This is working , Thank you
@patent sundial @unborn cloud could you please share the snapshot template using pri cli? there used to be a snapshot template in zapi but not in recent releases
@kindred cairn can you let me know how you installed Harvest? native, compose, nabox, etc.?
using docker image in K8s version 24.02.0
there is snapshotpolicy.yaml, query: api/private/cli/snapshot/policy
so for snapshots, is api/private/cli/snapshot equvelent to "snap show"? is there document on pri api? if so i may be able to write a template myself 😀
i'm nearly done validating the template and will share in a moment. Yes, how to use private CLI is documented https://netapp.github.io/harvest/nightly/configure-rest/#ontap-private-cli and yes api/private/cli/snapshot is equivalent to snap show
i did a curl call it returned a list of snapshots but not much details, such as creation time and size
{
"records": [
{
"vserver": "flc1-01-lab-phx-storage",
"volume": "vol0",
"snapshot": "nightly.1"
},
{
"vserver": "flc1-01-lab-phx-storage",
"volume": "vol0",
"snapshot": "hourly.5"
},
See if this helps https://github.com/NetApp/harvest/discussions/2970