]> granicus.if.org Git - icinga2/commitdiff
Adding ports to checks pop/imap/smtp and new check dig
authorJan Wagner <waja@cyconet.org>
Sun, 22 Jun 2014 12:21:11 +0000 (14:21 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Tue, 24 Jun 2014 11:20:41 +0000 (13:20 +0200)
fixes #6531

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
doc/6-configuring-icinga-2.md
itl/command-plugins.conf

index 25810dab22170a7b36f42c3234efda06b58c8f94..c04eecbdbe59c1e87bed9777819adb6ec8ae261d 100644 (file)
@@ -1938,6 +1938,7 @@ Custom Attributes:
 Name                 | Description
 ---------------------|--------------
 smtp_address         | **Optional.** The host's address. Defaults to "$address$".
+smtp_port            | **Optional.** The port that should be checked. Defaults to 25.
 smtp_mail_from       | **Optional.** Test a MAIL FROM command with the given email address.
 
 #### <a id="plugin-check-command-ssmtp"></a> ssmtp
@@ -1961,6 +1962,7 @@ Custom Attributes:
 Name            | Description
 ----------------|--------------
 imap_address    | **Optional.** The host's address. Defaults to "$address$".
+imap_port       | **Optional.** The port that should be checked. Defaults to 143.
 
 #### <a id="plugin-check-command-simap"></a> simap
 
@@ -1982,6 +1984,7 @@ Custom Attributes:
 Name            | Description
 ----------------|--------------
 pop_address     | **Optional.** The host's address. Defaults to "$address$".
+pop_port        | **Optional.** The port that should be checked. Defaults to 110.
 
 #### <a id="plugin-check-command-spop"></a> spop 
 
@@ -2131,6 +2134,17 @@ dns_server           | **Optional.** The DNS server to query. Defaults to the se
 dns_expected_answer  | **Optional.** The answer to look for. A hostname must end with a dot.
 dns_authoritative    | **Optional.** Expect the server to send an authoritative answer.
 
+#### <a id="plugin-check-command-dig"></a> dig
+
+Check command object for the `check_dig` plugin.
+
+Custom Attributes:
+
+Name                 | Description
+---------------------|--------------
+dig_server           | **Optional.** The DNS server to query. Defaults to "127.0.0.1".
+dig_lookup           | **Optional.** The address that should be looked up.
+
 #### <a id="plugin-check-command-dhcp"></a> dhcp
 
 Check command object for the `check_dhcp` plugin.
index dc9ebc8688c769a97daf63fdb1cf2f8db8ad0eae..22c61907e0c78fb3a4d7aa238ae9afe72bd3b749 100644 (file)
@@ -221,6 +221,7 @@ object CheckCommand "smtp" {
 
        arguments = {
                "-H" = "$smtp_address$"
+               "-p" = "$smtp_port$"
                "-f" = "$smtp_mail_from$"
        }
 
@@ -248,6 +249,7 @@ object CheckCommand "imap" {
 
        arguments = {
                "-H" = "$imap_address$"
+               "-p" = "$imap_port$"
        }
 
        vars.imap_address = "$address$"
@@ -273,6 +275,7 @@ object CheckCommand "pop" {
 
        arguments = {
                "-H" = "$pop_address$"
+               "-p" = "$pop_port$"
        }
 
        vars.pop_address = "$address$"
@@ -487,6 +490,19 @@ object CheckCommand "dns" {
        vars.dns_expected_answer = "$address$"
 }
 
+object CheckCommand "dig" {
+       import "plugin-check-command"
+
+       command = PluginDir + "/check_dig"
+
+       arguments = {
+               "-H" = "$dig_server$",
+               "-l" = "$dig_lookup$",
+       }
+
+       vars.dig_server = "$address$"
+}
+
 object CheckCommand "nscp" {
        import "plugin-check-command"