Use Api to monitor ZFS Replication

yena

Renowned Member
Nov 18, 2011
385
6
83
Hello,
can i monitor the replication status in a cluster using Proxmox API ?

Thanks!
 
Hello,

"pvesh get /nodes/{node}/replication" gives the current configuration for the replication.
But is there a way to get the working status (working or not) and the last valid available replication date ?

Thanks
 
check the API viewer - there are API endpoints in /nodes/{node}/replication/{id} for log and status for each replication job.
 
Thank you for your answer.
But replication is usefull in case of a node failure. AFAIK the "/nodes/{node}/replication/{id}/status" API is not working if {node} is down. It would be very usefull to get this information either on any working node of the cluster or at least on the replication destination(s) node(s).
 
the state is only stored on the source node. what you can do though is check the replication snapshot's timestamp (e.g., if you have replicated a guest to different target nodes and want to know which one is more current).
 
It is what i was planning to do. But that would be much better to have it in the PM GUI :)