search for snapshots sorted by creation date
-
I think that should be doable with our REST API or at worst our existing API. Pinging @julien-f
-
@olivierlambert We are interested in that too. Any news?
It would be a wonderful integration to our icinga check for snapshots.
-
I think it's now possible since last release. Let me ping @julien-f
-
@olivierlambert Thank you.
-
Hello,
Yes, the list of VM snapshots in now exposed by the REST API, the path is
/rest/v0/vm-snapshots.The list of available collections is under the path
/rest/v0.More info in the documentation: https://xen-orchestra.com/docs/restapi.html
-
@julien-f thank you.
Is it possible to filter by creation date? -
@Steve_Sibilia Yes.
- Take a look at a specific snapshot to see the available fields, note
snapshot_timewhich is a Unix timestamp. - Use a filter (syntax documentation), example:
/rest/v0/vm-snapshots?filter=snapshot_time%3A>1669044124
- Take a look at a specific snapshot to see the available fields, note
-
@Steve_Sibilia hey, what icinga check are you using for snapshots? do you have any xcp-ng related icinga checks running?
-
@vmpr Hi, i wrote my own to find any vm with more than X snapshot which has an age of Y days.
If you are interested I can share it, I need a little bit of time to translate comments and help in english.
For xcp-ng i wrote onther check to get the size of hba storage SR's.
-
Any helper and use case is welcome, feel free to link to your Github or Gitlab repository!
-
@olivierlambert here it is: https://github.com/Stevesibilia/check_snapshot
Keep in mind i'm not a developer

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login