mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fix assignment indentation for variables/objects
This commit is contained in:
parent
ac02ec7e3e
commit
3e5a97d52b
8 changed files with 60 additions and 60 deletions
|
|
@ -1,11 +1,11 @@
|
|||
@{
|
||||
RootModule = 'icinga-powershell-framework.psm1'
|
||||
ModuleVersion = '1.2.0'
|
||||
GUID = 'fcd7a805-a41b-49f9-afee-9d17a2b76d42'
|
||||
Author = 'Lord Hepipud'
|
||||
CompanyName = 'Icinga GmbH'
|
||||
Copyright = '(c) 2020 Icinga GmbH | MIT'
|
||||
Description = 'Icinga for Windows module which allows to entirely monitor the Windows Host system.'
|
||||
RootModule = 'icinga-powershell-framework.psm1'
|
||||
ModuleVersion = '1.2.0'
|
||||
GUID = 'fcd7a805-a41b-49f9-afee-9d17a2b76d42'
|
||||
Author = 'Lord Hepipud'
|
||||
CompanyName = 'Icinga GmbH'
|
||||
Copyright = '(c) 2020 Icinga GmbH | MIT'
|
||||
Description = 'Icinga for Windows module which allows to entirely monitor the Windows Host system.'
|
||||
PowerShellVersion = '4.0'
|
||||
FunctionsToExport = @(
|
||||
'Use-Icinga',
|
||||
|
|
@ -20,17 +20,17 @@
|
|||
'Get-IcingaFrameworkRootPath',
|
||||
'Get-IcingaPowerShellModuleFile'
|
||||
)
|
||||
CmdletsToExport = @()
|
||||
CmdletsToExport = @()
|
||||
VariablesToExport = '*'
|
||||
AliasesToExport = @( 'icinga' )
|
||||
PrivateData = @{
|
||||
PSData = @{
|
||||
Tags = @( 'icinga', 'icinga2', 'IcingaPowerShellFramework', 'IcingaPowerShell', 'IcingaforWindows', 'IcingaWindows')
|
||||
LicenseUri = 'https://github.com/Icinga/icinga-powershell-framework/blob/master/LICENSE'
|
||||
ProjectUri = 'https://github.com/Icinga/icinga-powershell-framework'
|
||||
AliasesToExport = @( 'icinga' )
|
||||
PrivateData = @{
|
||||
PSData = @{
|
||||
Tags = @( 'icinga', 'icinga2', 'IcingaPowerShellFramework', 'IcingaPowerShell', 'IcingaforWindows', 'IcingaWindows')
|
||||
LicenseUri = 'https://github.com/Icinga/icinga-powershell-framework/blob/master/LICENSE'
|
||||
ProjectUri = 'https://github.com/Icinga/icinga-powershell-framework'
|
||||
ReleaseNotes = 'https://github.com/Icinga/icinga-powershell-framework/releases'
|
||||
};
|
||||
Version = 'v1.2.0';
|
||||
}
|
||||
HelpInfoURI = 'https://github.com/Icinga/icinga-powershell-framework'
|
||||
HelpInfoURI = 'https://github.com/Icinga/icinga-powershell-framework'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,6 @@ function ConvertTo-IcingaIPv4BinaryString()
|
|||
|
||||
return @{
|
||||
'value' = $IP;
|
||||
'name' = 'IPv4'
|
||||
'name' = 'IPv4'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,6 @@ function ConvertTo-IcingaIPv6BinaryString()
|
|||
|
||||
return @{
|
||||
'value' = $IP;
|
||||
'name' = 'IPv6'
|
||||
'name' = 'IPv6'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,9 +150,9 @@ function Get-IcingaCheckCommandConfig()
|
|||
if ($parameter.type.name -eq 'SwitchParameter') {
|
||||
$Basket.Command[$Data.Name].arguments.Add(
|
||||
[string]::Format('-{0}', $parameter.Name), @{
|
||||
'set_if' = $IcingaCustomVariable;
|
||||
'set_if' = $IcingaCustomVariable;
|
||||
'set_if_format' = 'string';
|
||||
'order' = $Order;
|
||||
'order' = $Order;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
@ -236,21 +236,21 @@ function Get-IcingaCheckCommandConfig()
|
|||
if ($Basket.Datafield.Values.varname -ne $IcingaCustomVariable) {
|
||||
$Basket.Datafield.Add(
|
||||
[string]$FieldID, @{
|
||||
'varname' = $IcingaCustomVariable;
|
||||
'caption' = $parameter.Name;
|
||||
'varname' = $IcingaCustomVariable;
|
||||
'caption' = $parameter.Name;
|
||||
'description' = $parameter.Description.Text;
|
||||
'datatype' = $IcingaDataType;
|
||||
'format' = $NULL;
|
||||
'originalId' = [string]$FieldID;
|
||||
'datatype' = $IcingaDataType;
|
||||
'format' = $NULL;
|
||||
'originalId' = [string]$FieldID;
|
||||
}
|
||||
);
|
||||
|
||||
if ($IsDataList) {
|
||||
$Basket.Datafield[[string]$FieldID].Add(
|
||||
'settings', @{
|
||||
'datalist' = $DataListName;
|
||||
'datalist' = $DataListName;
|
||||
'data_type' = 'string';
|
||||
'behavior' = 'strict';
|
||||
'behavior' = 'strict';
|
||||
}
|
||||
);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ function Get-IcingaNetworkInterface()
|
|||
$InterfaceData.Add(
|
||||
$Key, @{
|
||||
'Binary IP String' = (ConvertTo-IcingaIPBinaryString -IP $IP).value;
|
||||
'Mask' = $Mask;
|
||||
'Interface' = $Info.ifIndex;
|
||||
'Mask' = $Mask;
|
||||
'Interface' = $Info.ifIndex;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,34 +57,34 @@ function Get-IcingaServices()
|
|||
|
||||
$ServiceData.Add(
|
||||
$service.Name, @{
|
||||
'metadata' = @{
|
||||
'DisplayName' = $service.DisplayName;
|
||||
'ServiceName' = $service.ServiceName;
|
||||
'Site' = $service.Site;
|
||||
'Container' = $service.Container;
|
||||
'metadata' = @{
|
||||
'DisplayName' = $service.DisplayName;
|
||||
'ServiceName' = $service.ServiceName;
|
||||
'Site' = $service.Site;
|
||||
'Container' = $service.Container;
|
||||
'ServiceHandle' = $service.ServiceHandle;
|
||||
'Dependent' = $DependentServices;
|
||||
'Depends' = $DependingServices;
|
||||
'Dependent' = $DependentServices;
|
||||
'Depends' = $DependingServices;
|
||||
};
|
||||
'configuration' = @{
|
||||
'CanPauseAndContinue' = $service.CanPauseAndContinue;
|
||||
'CanShutdown' = $service.CanShutdown;
|
||||
'CanStop' = $service.CanStop;
|
||||
'Status' = @{
|
||||
'raw' = [int]$service.Status;
|
||||
'CanShutdown' = $service.CanShutdown;
|
||||
'CanStop' = $service.CanStop;
|
||||
'Status' = @{
|
||||
'raw' = [int]$service.Status;
|
||||
'value' = $service.Status;
|
||||
};
|
||||
'ServiceType' = @{
|
||||
'raw' = [int]$service.ServiceType;
|
||||
'ServiceType' = @{
|
||||
'raw' = [int]$service.ServiceType;
|
||||
'value' = $service.ServiceType;
|
||||
};
|
||||
'ServiceHandle' = $service.ServiceHandle;
|
||||
'StartType' = @{
|
||||
'raw' = [int]$service.StartType;
|
||||
'ServiceHandle' = $service.ServiceHandle;
|
||||
'StartType' = @{
|
||||
'raw' = [int]$service.StartType;
|
||||
'value' = $service.StartType;
|
||||
};
|
||||
'ServiceUser' = $ServiceUser;
|
||||
'ExitCode' = $ServiceExitCode;
|
||||
'ServiceUser' = $ServiceUser;
|
||||
'ExitCode' = $ServiceExitCode;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
#>
|
||||
|
||||
[hashtable]$IcingaExitCode = @{
|
||||
Ok = 0;
|
||||
Warning = 1;
|
||||
Critical = 2;
|
||||
Unknown = 3;
|
||||
Ok = 0;
|
||||
Warning = 1;
|
||||
Critical = 2;
|
||||
Unknown = 3;
|
||||
};
|
||||
|
||||
[hashtable]$IcingaExitCodeText = @{
|
||||
|
|
|
|||
|
|
@ -5,19 +5,19 @@
|
|||
#>
|
||||
|
||||
[hashtable]$Permission = @{
|
||||
PerformanceCounter = 'A Plugin failed to fetch Performance Counter information. This may be caused when the used Service User is not permitted to access these information. To fix this, please add the User the Icinga Agent is running on into the "Performance Log Users" group and restart the service.';
|
||||
CacheFolder = "A plugin failed to write new data into the configured cache directory. Please update the permissions of this folder to allow write access for the user the Icinga Service is running with or use another folder as cache directory.";
|
||||
CimInstance = 'The user you are running this command as does not have permission to access the requested Cim-Object. To fix this, please add the user the Agent is running with to the "Remote Management Users" groups and grant access to the WMI branch "root/cimv2" and add the permission "Remote enable".';
|
||||
WMIObject = 'The user you are running this command as does not have permission to access the requested Wmi-Object. To fix this, please add the user the Agent is running with to the "Remote Management Users" groups and grant access to the WMI branch "root/cimv2" and add the permission "Remote enable".';
|
||||
PerformanceCounter = 'A Plugin failed to fetch Performance Counter information. This may be caused when the used Service User is not permitted to access these information. To fix this, please add the User the Icinga Agent is running on into the "Performance Log Users" group and restart the service.';
|
||||
CacheFolder = "A plugin failed to write new data into the configured cache directory. Please update the permissions of this folder to allow write access for the user the Icinga Service is running with or use another folder as cache directory.";
|
||||
CimInstance = 'The user you are running this command as does not have permission to access the requested Cim-Object. To fix this, please add the user the Agent is running with to the "Remote Management Users" groups and grant access to the WMI branch "root/cimv2" and add the permission "Remote enable".';
|
||||
WMIObject = 'The user you are running this command as does not have permission to access the requested Wmi-Object. To fix this, please add the user the Agent is running with to the "Remote Management Users" groups and grant access to the WMI branch "root/cimv2" and add the permission "Remote enable".';
|
||||
};
|
||||
|
||||
[hashtable]$Inputs = @{
|
||||
PerformanceCounter = 'A plugin failed to fetch Performance Counter information. Please ensure the counter is written properly and available on your system.';
|
||||
EventLogLogName = 'Failed to fetch EventLog information. Please specify a valid LogName.';
|
||||
EventLog = 'Failed to fetch EventLog information. Please check your inputs for EntryTypes and other categories and try again.';
|
||||
ConversionUnitMissing = 'Unable to parse input value. You have to add an unit to your input value. Example: "10GB". Allowed units are: "B, KB, MB, GB, TB, PB, KiB, MiB, GiB, TiB, PiB".';
|
||||
CimClassNameUnknown = 'The provided class name you try to fetch with Get-CimInstance is not known on this system.';
|
||||
WmiObjectClassUnknown = 'The provided class name you try to fetch with Get-WmiObject is not known on this system.';
|
||||
PerformanceCounter = 'A plugin failed to fetch Performance Counter information. Please ensure the counter is written properly and available on your system.';
|
||||
EventLogLogName = 'Failed to fetch EventLog information. Please specify a valid LogName.';
|
||||
EventLog = 'Failed to fetch EventLog information. Please check your inputs for EntryTypes and other categories and try again.';
|
||||
ConversionUnitMissing = 'Unable to parse input value. You have to add an unit to your input value. Example: "10GB". Allowed units are: "B, KB, MB, GB, TB, PB, KiB, MiB, GiB, TiB, PiB".';
|
||||
CimClassNameUnknown = 'The provided class name you try to fetch with Get-CimInstance is not known on this system.';
|
||||
WmiObjectClassUnknown = 'The provided class name you try to fetch with Get-WmiObject is not known on this system.';
|
||||
};
|
||||
|
||||
[hashtable]$Configuration = @{
|
||||
|
|
|
|||
Loading…
Reference in a new issue