diff --git a/agent-local/proxmox b/agent-local/proxmox index fd1f73a..a35ade4 100755 --- a/agent-local/proxmox +++ b/agent-local/proxmox @@ -34,11 +34,15 @@ my $conn = PVE::API2Client->new( csrftoken => $csrftoken, ); -my $clustername = $conn->get("/api2/json/cluster/ha/config")->{'data'}->{'children'}[0]{'name'}; -if (!defined($clustername)) { - $clustername = $hostname; +foreach my $child (@{$conn->get("/api2/json/cluster/status")->{'data'}}) { + if ($child->{'type'} eq "cluster") { + $clustername = $child->{'name'}; + } } +if (!defined($clustername)) { + $clustername = $hostname; +} print "<<>>\n"; diff --git a/debian/changelog b/debian/changelog index a82b5bc..91f8777 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +librenms-agent (1.0.3) stable; urgency=low + + - Fix the proxmox-agent for Proxmox VE 4.0 + + -- Mark Schouten Wed, 04 Nov 2015 14:33:00 +0200 + librenms-agent (1.0.2) stable; urgency=low - Include a Proxmox-agent