Merge pull request #7540 from KAMI911/master

Add file age check for Windows command definition
This commit is contained in:
Michael Friedrich 2019-12-03 17:06:23 +01:00 committed by GitHub
commit 46f0e24702
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 0 deletions

View File

@ -1725,6 +1725,21 @@ Name | Description
users\_win\_warn | **Optional**. The warning threshold.
users\_win\_crit | **Optional**. The critical threshold.
### file-age-windows <a id="windows-plugins-file-age-windows"></a>
Check command object for `check_file_age.cmd` command file and `check_file_age.cmd.ps1` plugin.
Custom variables:
Name | Description
:---------------------|:------------
file_age_win_file | **Required**. File name and location
file_age_win_warning | **Required**. The warning threshold of file age in seconds.
file_age_win_critical | **Required**. The critical threshold of file age in seconds.
All variables are required and all variables are positional. The variable order is: file warning critical.
The check_file_age.cmd and the check_file_age.cmd.ps1 files are available for [download](https://github.com/KAMI911/icinga2-basic/tree/master/plugins).
## Plugin Check Commands for NSClient++ <a id="nscp-plugin-check-commands"></a>

View File

@ -0,0 +1,28 @@
object CheckCommand "file-age-windows" {
command = [ PluginDir + "/check_file_age.cmd" ]
arguments = {
"file" = {
skip_key = true
order = 0
value = "$file_age_win_file$"
description = "File name and location"
required = true
}
"warning" = {
skip_key = true
order = 1
value = "$file_age_win_warning$"
description = "Warning threshold of file age in seconds"
required = true
}
"critical" = {
skip_key = true
order = 2
value = "$file_age_win_critical$"
description = "Critical threshold of file age in seconds"
required = true
}
}
}