[pve-devel] [PATCH manager v3 09/19] api: replication: include 'hostname' field for notifications
    Lukas Wagner 
    l.wagner at proxmox.com
       
    Fri Feb 16 10:15:58 CET 2024
    
    
  
The field contains the hostname of the host (without any domain part)
which sends the notification. This field can be used in match-field
match rules.
Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
 PVE/API2/Replication.pm | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/PVE/API2/Replication.pm b/PVE/API2/Replication.pm
index 703640f5..192b8af3 100644
--- a/PVE/API2/Replication.pm
+++ b/PVE/API2/Replication.pm
@@ -142,6 +142,8 @@ my sub _handle_job_err {
     my $metadata_fields = {
 	type => "replication",
 	"replication-job" => $job->{id},
+	# Hostname (without domain part)
+	hostname => PVE::INotify::nodename(),
     };
 
     eval {
-- 
2.39.2
    
    
More information about the pve-devel
mailing list