]> granicus.if.org Git - icinga2/commitdiff
Add "random" CheckCommand for test and demo purposes
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 19 Mar 2015 13:36:53 +0000 (14:36 +0100)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 19 Mar 2015 13:36:53 +0000 (14:36 +0100)
fixes #8816

doc/7-icinga-template-library.md
itl/command-icinga.conf
lib/methods/methods-itl.conf

index 1fff9de1115de7ae2917b738e61cc5af448cd31b..77c448d77936ef83ffbe8786d75a14b21a736b48 100644 (file)
@@ -69,6 +69,14 @@ Name         | Description
 ido_type     | **Required.** The type of the IDO connection object. Can be either "IdoMysqlConnection" or "IdoPgsqlConnection".
 ido_name     | **Required.** The name of the IDO connection object.
 
+### <a id="itl-random"></a> random
+
+Check command for the built-in `random` check. This check returns random states
+and adds the check source to the check output.
+
+For test and demo purposes only. The `random` check command does not support
+any vars.
+
 # <a id="plugin-check-commands"></a> Plugin Check Commands
 
 The Plugin Check Commands provides example configuration for plugin check commands
index 063e66ca8aa94c34cb658fa98cdbff35dccf9f5b..a44fcc71b28f87a5d5c61f459901ad6eddd8fb68 100644 (file)
@@ -31,3 +31,6 @@ object CheckCommand "cluster-zone" {
        vars.cluster_zone = "$host.name$"
 }
 
+object CheckCommand "random" {
+       import "random-check-command"
+}
index b7e1dd9b58bb71f6024d0bf3a247ab587c12778d..ad7c91579edfb743b270cd02850f25845b6f3713 100644 (file)
@@ -44,3 +44,7 @@ template NotificationCommand "plugin-notification-command" {
 template EventCommand "plugin-event-command" {
        execute = PluginEvent
 }
+
+template CheckCommand "random-check-command" {
+       execute = RandomCheck
+}