mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-25 22:55:15 +02:00
enh(mode+debug+test): replace the default value of --filter-status + enh troubleshoot + tests
REFS: CTOR-856
This commit is contained in:
parent
31639eae1d
commit
782b517c04
@ -111,7 +111,7 @@ sub new {
|
|||||||
'ps-display' => { name => 'ps_display' },
|
'ps-display' => { name => 'ps_display' },
|
||||||
'filter-vm:s' => { name => 'filter_vm' },
|
'filter-vm:s' => { name => 'filter_vm' },
|
||||||
'filter-note:s' => { name => 'filter_note' },
|
'filter-note:s' => { name => 'filter_note' },
|
||||||
'filter-status:s' => { name => 'filter_status', default => 'running' }
|
'filter-status:s' => { name => 'filter_status', default => 'Running' }
|
||||||
});
|
});
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
@ -218,17 +218,20 @@ sub manage_selection {
|
|||||||
foreach my $node (@$decoded) {
|
foreach my $node (@$decoded) {
|
||||||
if (defined($self->{option_results}->{filter_vm}) && $self->{option_results}->{filter_vm} ne '' &&
|
if (defined($self->{option_results}->{filter_vm}) && $self->{option_results}->{filter_vm} ne '' &&
|
||||||
$node->{name} !~ /$self->{option_results}->{filter_vm}/i) {
|
$node->{name} !~ /$self->{option_results}->{filter_vm}/i) {
|
||||||
$self->{output}->output_add(long_msg => "skipping '" . $node->{name} . "': no matching filter.", debug => 1);
|
$self->{output}->output_add(long_msg => "skipping '" . $node->{name} . "': no matching filter vm.", debug => 1);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if (defined($self->{option_results}->{filter_status}) && $self->{option_results}->{filter_status} ne '' &&
|
if (defined($self->{option_results}->{filter_status}) && $self->{option_results}->{filter_status} ne '' &&
|
||||||
$node_vm_state->{ $node->{state} } !~ /$self->{option_results}->{filter_status}/i) {
|
$node_vm_state->{ $node->{state} } !~ /$self->{option_results}->{filter_status}/i) {
|
||||||
$self->{output}->output_add(long_msg => "skipping '" . $node->{name} . "': no matching filter.", debug => 1);
|
$self->{output}->output_add(long_msg => "skipping '" . $node->{name}
|
||||||
|
. "': node state " . $node->{state} . " (" . $node_vm_state->{ $node->{state} }
|
||||||
|
. ") does not match filter /" . $self->{option_results}->{filter_status}
|
||||||
|
. "/i", debug => 1);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if (defined($self->{option_results}->{filter_note}) && $self->{option_results}->{filter_note} ne '' &&
|
if (defined($self->{option_results}->{filter_note}) && $self->{option_results}->{filter_note} ne '' &&
|
||||||
defined($node->{note}) && $node->{note} !~ /$self->{option_results}->{filter_note}/i) {
|
defined($node->{note}) && $node->{note} !~ /$self->{option_results}->{filter_note}/i) {
|
||||||
$self->{output}->output_add(long_msg => "skipping '" . $node->{name} . "': no matching filter.", debug => 1);
|
$self->{output}->output_add(long_msg => "skipping '" . $node->{name} . "': no matching filter note.", debug => 1);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,767 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 3,
|
||||||
|
"name": "VSERVER01",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": null,
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": null,
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": null,
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": null,
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": null,
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": null,
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER02",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER03",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER04",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": "OK",
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER05",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER06",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER07",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER08",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER09",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER09",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": "OK",
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER10",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER11",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER12",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER13",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER14",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER15",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "",
|
||||||
|
"integration_services_state": "",
|
||||||
|
"state": 2,
|
||||||
|
"name": "VSERVER16",
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Guest Service Interface",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Heartbeat",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Key-Value Pair Exchange",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Shutdown",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "Time Synchronization",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"primary_operational_status": "OK",
|
||||||
|
"secondary_operational_status": null,
|
||||||
|
"service": "VSS",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"integration_services_version": "0.0"
|
||||||
|
}
|
||||||
|
]
|
@ -13,19 +13,35 @@ ${CMD} ${CENTREON_PLUGINS}
|
|||||||
... --command=cat
|
... --command=cat
|
||||||
... --command-path=/usr/bin
|
... --command-path=/usr/bin
|
||||||
... --no-ps
|
... --no-ps
|
||||||
... --command-options=${CURDIR}/nodeintegrationservice-2022.json
|
|
||||||
|
|
||||||
|
|
||||||
*** Test Cases ***
|
*** Test Cases ***
|
||||||
HyperV 2022 ${tc}/3
|
HyperV 2022-1 ${tc}
|
||||||
[Documentation] Apps Microsoft HyperV 2022
|
[Documentation] Apps Microsoft HyperV 2022
|
||||||
[Tags] applications microsoft hyperv virtualization
|
[Tags] applications microsoft hyperv virtualization
|
||||||
${command} Catenate
|
${command} Catenate
|
||||||
... ${CMD}
|
... ${CMD}
|
||||||
|
... --command-options=${CURDIR}/nodeintegrationservice-2022-1.json
|
||||||
... --filter-vm='${filter_vm}'
|
... --filter-vm='${filter_vm}'
|
||||||
|
|
||||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||||
|
|
||||||
Examples: tc filter_vm expected_result --
|
Examples: tc filter_vm expected_result --
|
||||||
... 1 ${EMPTY} CRITICAL: 1 problem(s) detected
|
... 1 ${EMPTY} CRITICAL: 1 problem(s) detected
|
||||||
... 2 VSERVER05 OK: VM 'VSERVER05' 0 problem(s) detected - VM 'VSERVER05' 0 problem(s) detected
|
... 2 VSERVER05 OK: VM 'VSERVER05' 0 problem(s) detected - VM 'VSERVER05' 0 problem(s) detected
|
||||||
... 3 VSERVER07 CRITICAL: VM 'VSERVER07' 1 problem(s) detected
|
... 3 VSERVER07 CRITICAL: VM 'VSERVER07' 1 problem(s) detected
|
||||||
|
HyperV 2022-2 ${tc}
|
||||||
|
[Documentation] Apps Microsoft HyperV 2022
|
||||||
|
[Tags] applications microsoft hyperv virtualization
|
||||||
|
${command} Catenate
|
||||||
|
... ${CMD}
|
||||||
|
... --command-options=${CURDIR}/nodeintegrationservice-2022-2.json
|
||||||
|
... --filter-vm='${filter_vm}'
|
||||||
|
|
||||||
|
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||||
|
|
||||||
|
Examples: tc filter_vm expected_result --
|
||||||
|
... 1 ${EMPTY} OK: All integration services are ok
|
||||||
|
... 2 VSERVER05 OK: VM 'VSERVER05' 0 problem(s) detected - VM 'VSERVER05' 0 problem(s) detected
|
||||||
|
... 3 VSERVER07 OK: VM 'VSERVER07' 0 problem(s) detected - VM 'VSERVER07' 0 problem(s) detected
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user