Merge branch 'master' of https://github.com/centreon/centreon-plugins
This commit is contained in:
commit
b4a46f4b0d
|
@ -199,6 +199,10 @@ sub manage_selection {
|
|||
$self->{output}->option_exit();
|
||||
}
|
||||
|
||||
if (!defined($decoded->{LinkStatus})) {
|
||||
$self->{output}->add_option_msg(short_msg => "No database replication");
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
$self->{global}->{LinkStatus} = $map_link_status{$decoded->{LinkStatus}};
|
||||
|
||||
$self->{sites}->{$decoded->{Site1}} = {
|
||||
|
|
|
@ -161,16 +161,32 @@ sub manage_selection {
|
|||
$self->{output}->option_exit();
|
||||
}
|
||||
|
||||
foreach my $site (@{$decoded}) {
|
||||
$self->{sites}->{$site->{SiteCode}} = {
|
||||
display => $site->{SiteCode},
|
||||
SiteName => $site->{SiteName},
|
||||
Type => $map_type{$site->{Type}},
|
||||
Mode => $map_mode{$site->{Mode}},
|
||||
Status => $map_status{$site->{Status}},
|
||||
SecondarySiteCMUpdateStatus => $site->{SecondarySiteCMUpdateStatus},
|
||||
if (ref($decoded) eq "ARRAY") {
|
||||
foreach my $site (@{$decoded}) {
|
||||
$self->{sites}->{$site->{SiteCode}} = {
|
||||
display => $site->{SiteCode},
|
||||
SiteName => $site->{SiteName},
|
||||
Type => $map_type{$site->{Type}},
|
||||
Mode => $map_mode{$site->{Mode}},
|
||||
Status => $map_status{$site->{Status}},
|
||||
SecondarySiteCMUpdateStatus => $site->{SecondarySiteCMUpdateStatus},
|
||||
};
|
||||
}
|
||||
} else {
|
||||
$self->{sites}->{$decoded->{SiteCode}} = {
|
||||
display => $decoded->{SiteCode},
|
||||
SiteName => $decoded->{SiteName},
|
||||
Type => $map_type{$decoded->{Type}},
|
||||
Mode => $map_mode{$decoded->{Mode}},
|
||||
Status => $map_status{$decoded->{Status}},
|
||||
SecondarySiteCMUpdateStatus => $decoded->{SecondarySiteCMUpdateStatus},
|
||||
};
|
||||
}
|
||||
|
||||
if (scalar(keys %{$self->{sites}}) <= 0) {
|
||||
$self->{output}->add_option_msg(short_msg => "No sites found.");
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -44,7 +44,10 @@ $ProgressPreference = "SilentlyContinue"
|
|||
Try {
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$module = ${env:ProgramFiles(x86)} + "\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1"
|
||||
$module = ${env:ProgramFiles} + "\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1"
|
||||
If (-Not (Test-Path $module)) {
|
||||
$module = ${env:ProgramFiles(x86)} + "\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1"
|
||||
}
|
||||
Import-Module $module
|
||||
|
||||
New-PSDrive -Name SCCMDrive -PSProvider "AdminUI.PS.Provider\CMSite" -Root $env:COMPUTERNAME -Description "SCCM Site" | Out-Null
|
||||
|
|
|
@ -44,7 +44,10 @@ $ProgressPreference = "SilentlyContinue"
|
|||
Try {
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$module = ${env:ProgramFiles(x86)} + "\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1"
|
||||
$module = ${env:ProgramFiles} + "\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1"
|
||||
If (-Not (Test-Path $module)) {
|
||||
$module = ${env:ProgramFiles(x86)} + "\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1"
|
||||
}
|
||||
Import-Module $module
|
||||
|
||||
New-PSDrive -Name SCCMDrive -PSProvider "AdminUI.PS.Provider\CMSite" -Root $env:COMPUTERNAME -Description "SCCM Site" | Out-Null
|
||||
|
|
|
@ -320,17 +320,17 @@ Filter on a specific type (Must be a PromQL filter, Default: 'mode=~".*"')
|
|||
=item B<--warning-*>
|
||||
|
||||
Threshold warning.
|
||||
Can be: 'node-idle', 'node-wait', 'node-irq', 'node-nice',
|
||||
Can be: 'node-idle', 'node-wait', 'node-interrupt', 'node-nice',
|
||||
'node-softirq', 'node-steal', 'node-system', 'node-user',
|
||||
'cpu-idle', 'cpu-wait', 'cpu-irq', 'cpu-nice', 'cpu-softirq',
|
||||
'cpu-idle', 'cpu-wait', 'cpu-interrupt', 'cpu-nice', 'cpu-softirq',
|
||||
'cpu-steal', 'cpu-system', 'cpu-user'.
|
||||
|
||||
=item B<--critical-*>
|
||||
|
||||
Threshold critical.
|
||||
Can be: 'node-idle', 'node-wait', 'node-irq', 'node-nice',
|
||||
Can be: 'node-idle', 'node-wait', 'node-interrupt', 'node-nice',
|
||||
'node-softirq', 'node-steal', 'node-system', 'node-user',
|
||||
'cpu-idle', 'cpu-wait', 'cpu-irq', 'cpu-nice', 'cpu-softirq',
|
||||
'cpu-idle', 'cpu-wait', 'cpu-interrupt', 'cpu-nice', 'cpu-softirq',
|
||||
'cpu-steal', 'cpu-system', 'cpu-user'.
|
||||
|
||||
=item B<--extra-filter>
|
||||
|
|
Loading…
Reference in New Issue