mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Merge branch 'testing' of https://github.com/LordHepipud/icinga-module-windows into testing
This commit is contained in:
commit
97197e16c8
2 changed files with 6 additions and 1 deletions
|
|
@ -339,8 +339,10 @@ function Get-Icinga-Object()
|
|||
Import-IcingaLib '\';
|
||||
|
||||
# Initialise base configuration for our module
|
||||
<#
|
||||
$Icinga2 = & (Join-Path -Path $PSScriptRoot -ChildPath '\core\init.ps1') `
|
||||
-RootDirectory $PSScriptRoot `
|
||||
-ModuleName $MyInvocation.MyCommand.Name;
|
||||
|
||||
Export-ModuleMember @Icinga2;
|
||||
#>
|
||||
|
|
@ -52,6 +52,8 @@ function Get-IcingaDiskPartitions()
|
|||
}
|
||||
}
|
||||
|
||||
$DiskArray = New-IcingaPerformanceCounterStructure -CounterCategory 'LogicalDisk' -PerformanceCounterHash (New-IcingaPerformanceCounterArray @('\LogicalDisk(*)\% free space'));
|
||||
|
||||
$diskPartitionSize = Get-Partition -DriveLetter $driveLetter;
|
||||
|
||||
$PartitionDiskByDriveLetter.Add(
|
||||
|
|
@ -60,6 +62,7 @@ function Get-IcingaDiskPartitions()
|
|||
'Disk' = $diskDisk;
|
||||
'Partition' = $diskPartition;
|
||||
'Size' = $diskPartitionSize.Size;
|
||||
'Free Space' = $DiskArray.Item([string]::Format('{0}:', $driveLetter))."% free space".value;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue