mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-29 08:34:46 +02:00
fix servicehost
This commit is contained in:
parent
f50680278d
commit
1df4d636c8
@ -70,7 +70,7 @@ sub run {
|
|||||||
|
|
||||||
if (defined($entity_view->{'configManager.serviceSystem'})) {
|
if (defined($entity_view->{'configManager.serviceSystem'})) {
|
||||||
push @host_array, $entity_view->{'configManager.serviceSystem'};
|
push @host_array, $entity_view->{'configManager.serviceSystem'};
|
||||||
$host_names{$entity_view->{'configManager.serviceSystem'}->{value}} = $entity_view->{name};
|
$host_names{$entity_view->{'configManager.serviceSystem'}->{value}} = $entity_value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,10 +84,10 @@ sub run {
|
|||||||
return if (!defined($result2));
|
return if (!defined($result2));
|
||||||
|
|
||||||
foreach my $entity (@$result2) {
|
foreach my $entity (@$result2) {
|
||||||
my $hostname = $host_names{$entity->{mo_ref}->{value}};
|
my $host_id = $host_names{$entity->{mo_ref}->{value}};
|
||||||
|
|
||||||
foreach my $service (@{$entity->{serviceInfo}->{service}}) {
|
foreach my $service (@{$entity->{serviceInfo}->{service}}) {
|
||||||
push @{$data->{$entity->{mo_ref}->{value}}->{services}}, { key => $service->{key}, label => $service->{label}, policy => $service->{policy}, running => $service->{running} };
|
push @{$data->{$host_id}->{services}}, { key => $service->{key}, label => $service->{label}, policy => $service->{policy}, running => $service->{running} };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user