Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/director/Invoke-IcingaCheckDirectory.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/director/Plugins_Bundle.json

Large diffs are not rendered by default.

140 changes: 95 additions & 45 deletions config/icinga/Invoke-IcingaCheckDirectory.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,73 @@ object CheckCommand "Invoke-IcingaCheckDirectory" {
import "PowerShell Base"

arguments += {
"-Path" = {
description = "Used to specify a path. e.g. 'C:\\Users\\Icinga\\Downloads'"
value = "$IcingaCheckDirectory_String_Path$"
order = 2
"-CriticalLargestFile" = {
description = "Checks the largest file size found for the given filters and input and returns critical for the provided threshold. Follows the Icinga plugin threshold guidelines."
value = "$IcingaCheckDirectory_Object_CriticalLargestFile$"
order = 11
}
"-FileSizeGreaterThan" = {
description = "String that expects input format like '20MB', which translates to the filze size 20 MB. Allowed units: B, KB, MB, GB, TB. Thereby all files with a size of 20 MB or larger are considered within the check."
value = "$IcingaCheckDirectory_String_FileSizeGreaterThan$"
order = 20
}
"-C" = {
value = "try { Use-Icinga -Minimal; } catch { Write-Output 'The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details'; Write-Output 'Error:' $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable 'icinga-powershell-*' )`r`n'Module-Path:'`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command 'Invoke-IcingaCheckDirectory' "
order = 0
}
"-WarningAverageFile" = {
description = "Checks the resulting file count of the provided filters and input and returns warning for the provided threshold. Follows the Icinga plugin threshold guidelines."
value = "$IcingaCheckDirectory_Object_WarningAverageFile$"
order = 12
}
"-WarningLargestFile" = {
description = "Checks the largest file size found for the given filters and input and returns warning for the provided threshold. Follows the Icinga plugin threshold guidelines."
value = "$IcingaCheckDirectory_Object_WarningLargestFile$"
order = 10
}
"-CreationYoungerThan" = {
description = "String that expects input format like '20d', which translates to 20 days. Allowed units: ms, s, m, h, d, w, M, y. Thereby all files which have a creation date younger then 20 days are considered within the check."
value = "$IcingaCheckDirectory_String_CreationYoungerThan$"
order = 19
}
"-Warning" = {
description = "Checks the resulting file count of the provided filters and input and returns warning for the provided threshold. Follows the Icinga plugin threshold guidelines."
value = "$IcingaCheckDirectory_Object_Warning$"
order = 5
}
"-ThresholdInterval" = {
description = "Change the value your defined threshold checks against from the current value to a collected time threshold of the Icinga for Windows daemon, as described here: https://icinga.com/docs/icinga-for-windows/latest/doc/service/10-Register-Service-Checks/ An example for this argument would be 1m or 15m which will use the average of 1m or 15m for monitoring."
value = "$IcingaCheckDirectory_String_ThresholdInterval$"
order = 100
}
"-Verbosity" = {
description = "Changes the behavior of the plugin output which check states are printed: 0 (default): Only service checks/packages with state not OK will be printed 1: Only services with not OK will be printed including OK checks of affected check packages including Package config 2: Everything will be printed regardless of the check state 3: Identical to Verbose 2, but prints in addition the check package configuration e.g (All must be [OK])"
value = "$IcingaCheckDirectory_Int32_Verbosity$"
order = 22
}
"-ChangeTimeEqual" = {
description = "String that expects input format like '20d', which translates to 20 days. Allowed units: ms, s, m, h, d, w, M, y. Thereby all files which have been changed 20 days ago are considered within the check."
value = "$IcingaCheckDirectory_String_ChangeTimeEqual$"
order = 14
}
"-CreationOlderThan" = {
description = "String that expects input format like '20d', which translates to 20 days. Allowed units: ms, s, m, h, d, w, M, y. Thereby all files which have a creation date older then 20 days are considered within the check."
value = "$IcingaCheckDirectory_String_CreationOlderThan$"
order = 10
"-CountFolderAsFile" = {
set_if = "$IcingaCheckDirectory_Switchparameter_CountFolderAsFile$"
order = 99
}
"-FileSizeGreaterThan" = {
description = "String that expects input format like '20MB', which translates to the filze size 20 MB. Allowed units: B, KB, MB, GB, TB. Thereby all files with a size of 20 MB or larger are considered within the check."
value = "$IcingaCheckDirectory_String_FileSizeGreaterThan$"
order = 12
"-WarningTotalSize" = {
description = "Checks the total folder size of all files of the provided filters and input and returns warning for the provided threshold. Follows the Icinga plugin threshold guidelines."
value = "$IcingaCheckDirectory_Object_WarningTotalSize$"
order = 6
}
"-CriticalSmallestFile" = {
description = "Checks the smallest file size found for the given filters and input and returns critical for the provided threshold. Follows the Icinga plugin threshold guidelines."
value = "$IcingaCheckDirectory_Object_CriticalSmallestFile$"
order = 9
}
"-Path" = {
description = "Used to specify a path. e.g. 'C:\\Users\\Icinga\\Downloads'"
value = "$IcingaCheckDirectory_String_Path$"
order = 2
}
"-NoPerfData" = {
set_if = "$IcingaCheckDirectory_Switchparameter_NoPerfData$"
Expand All @@ -29,36 +77,32 @@ object CheckCommand "Invoke-IcingaCheckDirectory" {
"-ChangeOlderThan" = {
description = "String that expects input format like '20d', which translates to 20 days. Allowed units: ms, s, m, h, d, w, M, y. Thereby all files which have a change date older then 20 days are considered within the check."
value = "$IcingaCheckDirectory_String_ChangeOlderThan$"
order = 8
order = 16
}
"-ChangeYoungerThan" = {
description = "String that expects input format like '20d', which translates to 20 days. Allowed units: ms, s, m, h, d, w, M, y. Thereby all files which have a change date younger then 20 days are considered within the check."
value = "$IcingaCheckDirectory_String_ChangeYoungerThan$"
"-CriticalTotalSize" = {
description = "Checks the total folder size of all files of the provided filters and input and returns critical for the provided threshold. Follows the Icinga plugin threshold guidelines."
value = "$IcingaCheckDirectory_Object_CriticalTotalSize$"
order = 7
}
"-Critical" = {
description = "Checks the resulting file count of the provided filters and input and returns critical for the provided threshold. Follows the Icinga plugin threshold guidelines."
value = "$IcingaCheckDirectory_Object_Critical$"
order = 4
}
"-CriticalAverageFile" = {
description = "Checks the average file size found for the given filters and input and returns critical for the provided threshold. Follows the Icinga plugin threshold guidelines."
value = "$IcingaCheckDirectory_Object_CriticalAverageFile$"
order = 13
}
"-FileSizeSmallerThan" = {
description = "String that expects input format like '5MB', which translates to the filze size 5 MB. Allowed units: B, KB, MB, GB, TB. Thereby all files with a size of 5 MB or less are considered within the check."
value = "$IcingaCheckDirectory_String_FileSizeSmallerThan$"
order = 13
}
"-C" = {
value = "try { Use-Icinga -Minimal; } catch { Write-Output 'The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details'; Write-Output 'Error:' $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable 'icinga-powershell-*' )`r`n'Module-Path:'`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command 'Invoke-IcingaCheckDirectory' "
order = 0
}
"-ThresholdInterval" = {
description = "Change the value your defined threshold checks against from the current value to a collected time threshold of the Icinga for Windows daemon, as described here: https://icinga.com/docs/icinga-for-windows/latest/doc/service/10-Register-Service-Checks/ An example for this argument would be 1m or 15m which will use the average of 1m or 15m for monitoring."
value = "$IcingaCheckDirectory_String_ThresholdInterval$"
order = 100
order = 21
}
"-CreationTimeEqual" = {
description = "String that expects input format like '20d', which translates to 20 days. Allowed units: ms, s, m, h, d, w, M, y. Thereby all files which have been created 20 days ago are considered within the check."
value = "$IcingaCheckDirectory_String_CreationTimeEqual$"
order = 9
}
"-ChangeTimeEqual" = {
description = "String that expects input format like '20d', which translates to 20 days. Allowed units: ms, s, m, h, d, w, M, y. Thereby all files which have been changed 20 days ago are considered within the check."
value = "$IcingaCheckDirectory_String_ChangeTimeEqual$"
order = 6
order = 17
}
"-FileNames" = {
description = "Used to specify an array of filenames or expressions to match against results to filter for specific files. e.g '*.txt', '*.sql', finds all files ending with .txt and .sql"
Expand All @@ -82,26 +126,32 @@ object CheckCommand "Invoke-IcingaCheckDirectory" {
}}
order = 3
}
"-Critical" = {
description = "Used to specify a Critical threshold. Follows the Icinga plugin threshold"
value = "$IcingaCheckDirectory_Object_Critical$"
order = 4
"-WarningSmallestFile" = {
description = "Checks the smallest file size found for the given filters and input and returns warning for the provided threshold. Follows the Icinga plugin threshold guidelines."
value = "$IcingaCheckDirectory_Object_WarningSmallestFile$"
order = 8
}
"-CreationYoungerThan" = {
description = "String that expects input format like '20d', which translates to 20 days. Allowed units: ms, s, m, h, d, w, M, y. Thereby all files which have a creation date younger then 20 days are considered within the check."
value = "$IcingaCheckDirectory_String_CreationYoungerThan$"
order = 11
"-CreationOlderThan" = {
description = "String that expects input format like '20d', which translates to 20 days. Allowed units: ms, s, m, h, d, w, M, y. Thereby all files which have a creation date older then 20 days are considered within the check."
value = "$IcingaCheckDirectory_String_CreationOlderThan$"
order = 18
}
"-ChangeYoungerThan" = {
description = "String that expects input format like '20d', which translates to 20 days. Allowed units: ms, s, m, h, d, w, M, y. Thereby all files which have a change date younger then 20 days are considered within the check."
value = "$IcingaCheckDirectory_String_ChangeYoungerThan$"
order = 15
}
"-ShowFileList" = {
set_if = "$IcingaCheckDirectory_Switchparameter_ShowFileList$"
order = 99
}
"-Recurse" = {
set_if = "$IcingaCheckDirectory_Switchparameter_Recurse$"
order = 99
}
"-Warning" = {
description = "Used to specify a Warning threshold. Follows the Icinga plugin threshold"
value = "$IcingaCheckDirectory_Object_Warning$"
order = 5
}
}
vars.IcingaCheckDirectory_Switchparameter_CountFolderAsFile = false
vars.IcingaCheckDirectory_Switchparameter_NoPerfData = false
vars.IcingaCheckDirectory_Switchparameter_Recurse = false
vars.IcingaCheckDirectory_Switchparameter_ShowFileList = false
}
Loading