[icinga-checkins] icinga.org: icinga2/next: Adding ports to checks pop/imap/ smtp and new check dig

git at icinga.org git at icinga.org
Tue Jun 24 13:21:10 CEST 2014


Module: icinga2
Branch: next
Commit: 582824e291e69d9bdaafa7b8b73911eb25671347
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=582824e291e69d9bdaafa7b8b73911eb25671347

Author: Jan Wagner <waja at cyconet.org>
Date:   Sun Jun 22 14:21:11 2014 +0200

Adding ports to checks pop/imap/smtp and new check dig

fixes #6531

Signed-off-by: Gunnar Beutner <gunnar.beutner at netways.de>

---

 doc/6-configuring-icinga-2.md |   14 ++++++++++++++
 itl/command-plugins.conf      |   16 ++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/doc/6-configuring-icinga-2.md b/doc/6-configuring-icinga-2.md
index 25810da..c04eecb 100644
--- a/doc/6-configuring-icinga-2.md
+++ b/doc/6-configuring-icinga-2.md
@@ -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.
diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf
index dc9ebc8..22c6190 100644
--- a/itl/command-plugins.conf
+++ b/itl/command-plugins.conf
@@ -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"
 



More information about the icinga-checkins mailing list