Proxmox API + Getting LXC/VM last update

MoldyTaint

New Member
Dec 3, 2022
15
3
3
Hello!

Currently I am working on a small script that runs in the command line that gets information on my proxmox cluster, what's running, etc. I have it pulling all my nodes, vm's, lxc's, etc and does really well. I am currently trying to figure out the best approach to utilizing the Proxmox API to get when each LXC etc was last updated

I am currently using these endpoints
GET /nodes
GET /nodes/{node}/qemu
GET /nodes/{node}/qemu/{vmid}/agent
GET /nodes/{node}/lxc
GET /nodes/{node}/lxc/{vmid}/status/current
GET /nodes/{node}/lxc/{vmid}/exec

Along with
self.proxmox.nodes(node).qemu(vmid).agent.get('exec', command=
To try and pull when it was last updated.

I will admit, I am failing. I am still new to programming and am trying my hardest. Is there a better endpoint I could be using for this?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!