1
0
mirror of https://github.com/librenms/librenms-agent.git synced 2024-05-09 09:54:52 +00:00

Fix the proxmox-agent for Proxmox VE 4.0

This commit is contained in:
Mark Schouten
2015-11-04 14:30:21 +01:00
parent 25fcd5ae76
commit 65540872e7
2 changed files with 13 additions and 3 deletions

View File

@ -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 "<<<app-proxmox>>>\n";

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
librenms-agent (1.0.3) stable; urgency=low
- Fix the proxmox-agent for Proxmox VE 4.0
-- Mark Schouten <mark@tuxis.nl> Wed, 04 Nov 2015 14:33:00 +0200
librenms-agent (1.0.2) stable; urgency=low
- Include a Proxmox-agent