Skip to content

Commit

Permalink
Add a check command for check_file_age.
Browse files Browse the repository at this point in the history
Add a deprecation note for check_ldaps to check_ldap.

refs #6225
  • Loading branch information
dgoetz committed Nov 2, 2015
1 parent a2c09a1 commit fa4103b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
18 changes: 17 additions & 1 deletion doc/7-icinga-template-library.md
Expand Up @@ -247,6 +247,22 @@ dummy_state | **Optional.** The state. Can be one of 0 (ok), 1 (warning), 2
dummy_text | **Optional.** Plugin output. Defaults to "Check was successful.".


### <a id="plugin-check-command-file-age"></a> file_age

Check command object for the `check_file_age` plugin.

Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):

Name | Description
-----------------------|--------------------------------------------------------------------------------------------------------
file_age_file | **Required.** File to monitor.
file_age_warning_time | **Optional.** File must be no more than this many seconds old as warning threshold. Defaults to "240s".
file_age_critical_time | **Optional.** File must be no more than this many seconds old as critical threshold. Defaults to "600s".
file_age_warning_size | **Optional.** File must be at least this many bytes long as warning threshold. No default given.
file_age_critical_size | **Optional.** File must be at least this many bytes long as critical threshold. Defaults to "0B".
file_age_ignoremissing | **Optional.** Return OK if the file does not exist. Defaults to false.


### <a id="plugin-check-command-fping4"></a> fping4

Check command object for the `check_fping` plugin.
Expand Down Expand Up @@ -465,7 +481,7 @@ imap_timeout | **Optional.** The timeout in seconds.

### <a id="plugin-check-command-ldap"></a> ldap

Check command object for the `check_ldap` plugin.
Check command object for the `check_ldap` plugin. Use the plugin also for monitoring ldaps connections instead of the deprecated `check_ldaps`.

Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):

Expand Down
35 changes: 35 additions & 0 deletions itl/command-plugins.conf
Expand Up @@ -1774,3 +1774,38 @@ object CheckCommand "negate" {

vars.negate_timeout_result = "UNKNOWN"
}

object CheckCommand "file_age" {
import "plugin-check-command"

command = [ PluginDir + "/check_file_age" ]

arguments = {
"-w" = {
value = "$file_age_warning_time$"
description = "File must be no more than this many seconds old (default: 240s)"
}
"-c" = {
value = "$file_age_critical_time$"
description = "File must be no more than this many seconds old (default: 600s)"
}
"-W" = {
value = "$file_age_warning_size$"
description = "File must be at least this many bytes long"
}
"-C" = {
value = "$file_age_critical_size$"
description = "File must be at least this many bytes long (default: 0B)"
}
"-i" = {
set_if = "$file_age_ignoremissing$"
description = "return OK if the file does not exist"
}
"-f" = {
value = "$file_age_file$"
description = "File to monitor"
}
}

vars.file_age_ignoremissing = false
}

0 comments on commit fa4103b

Please sign in to comment.