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
291fc617b6
2 changed files with 6 additions and 1 deletions
|
|
@ -339,8 +339,10 @@ function Get-Icinga-Object()
|
||||||
Import-IcingaLib '\';
|
Import-IcingaLib '\';
|
||||||
|
|
||||||
# Initialise base configuration for our module
|
# Initialise base configuration for our module
|
||||||
|
<#
|
||||||
$Icinga2 = & (Join-Path -Path $PSScriptRoot -ChildPath '\core\init.ps1') `
|
$Icinga2 = & (Join-Path -Path $PSScriptRoot -ChildPath '\core\init.ps1') `
|
||||||
-RootDirectory $PSScriptRoot `
|
-RootDirectory $PSScriptRoot `
|
||||||
-ModuleName $MyInvocation.MyCommand.Name;
|
-ModuleName $MyInvocation.MyCommand.Name;
|
||||||
|
|
||||||
Export-ModuleMember @Icinga2;
|
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;
|
$diskPartitionSize = Get-Partition -DriveLetter $driveLetter;
|
||||||
|
|
||||||
$PartitionDiskByDriveLetter.Add(
|
$PartitionDiskByDriveLetter.Add(
|
||||||
|
|
@ -60,6 +62,7 @@ function Get-IcingaDiskPartitions()
|
||||||
'Disk' = $diskDisk;
|
'Disk' = $diskDisk;
|
||||||
'Partition' = $diskPartition;
|
'Partition' = $diskPartition;
|
||||||
'Size' = $diskPartitionSize.Size;
|
'Size' = $diskPartitionSize.Size;
|
||||||
|
'Free Space' = $DiskArray.Item([string]::Format('{0}:', $driveLetter))."% free space".value;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue