From aad7107396e22fda44cf9118f24d77bf5ec60e9c Mon Sep 17 00:00:00 2001 From: Michal Petko Date: Thu, 31 Jan 2019 07:59:44 +0100 Subject: [PATCH 1/3] Add check commands for HDFS file count and used space --- itl/plugins-contrib.d/big-data.conf | 64 +++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/itl/plugins-contrib.d/big-data.conf b/itl/plugins-contrib.d/big-data.conf index 5d757e282..24da0b183 100644 --- a/itl/plugins-contrib.d/big-data.conf +++ b/itl/plugins-contrib.d/big-data.conf @@ -63,3 +63,67 @@ object CheckCommand "cloudera_service_status" { } } } + +object CheckCommand "cloudera_hdfs_space" { + command = [ PluginDir + "/check_cloudera_hdfs_space.py" ] + + arguments = { + "-H" = { + description = "Namenode host" + value = "$hdfs_space_host$" + required = true + } + "-P" = { + description = "Namenode port (default 50070)" + value = "$hdfs_space_port$" + required = false + } + "-d" = { + description = "HDFS disk to check" + value = "$hdfs_space_disk$" + required = true + } + "-w" = { + description = "Warning threshold in percent" + value = "$hdfs_space_warn$" + required = true + } + "-c" = { + description = "Critical threshold in percent" + value = "$hdfs_space_crit$" + required = true + } + } +} + +object CheckCommand "cloudera_hdfs_files" { + command = [ PluginDir + "/check_cloudera_hdfs_files.py" ] + + arguments = { + "-H" = { + description = "Namenode host" + value = "$hdfs_files_host$" + required = true + } + "-P" = { + description = "Namenode port (default 50070)" + value = "$hdfs_files_port$" + required = false + } + "-w" = { + description = "Warning threshold" + value = "$hdfs_files_warn$" + required = true + } + "-c" = { + description = "Critical threshold" + value = "$hdfs_files_crit$" + required = true + } + "-m" = { + description = "Max files count that causes problems (default 140000000)" + value = "$hdfs_files_max$" + required = false + } + } +} From ab7e3a8514d9024cb9a58dfe89828a62a227cc23 Mon Sep 17 00:00:00 2001 From: Michal Petko Date: Thu, 31 Jan 2019 08:11:31 +0100 Subject: [PATCH 2/3] Add documentation to cloudera checks --- doc/10-icinga-template-library.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 4f906d07a..d5eaa254a 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -2214,6 +2214,36 @@ cloudera_cluster | **Required.** The cluster name in cloudera manager. cloudera_service | **Required.** Name of cluster service to be checked. cloudera_verify_ssl | **Optional.** Verify SSL. Defaults to true. +#### cloudera_hdfs_space + +The [cloudera_hdfs_space](https://github.com/miso231/icinga2-cloudera-plugin) plugin +connects to Hadoop Namenode and gets used capacity of selected disk + +Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): + +Name | Description +----------------------|----------------------------------------------------------------- +hdfs_space_host | **Required.** Namenode host to connect to. +hdfs_space_port | **Optional.** Namenode port (default 50070). +hdfs_space_disk | **Required.** HDFS disk to check. +hdfs_space_warn | **Required.** Warning threshold in percent. +hdfs_space_crit | **Required.** Critical threshold in percent. + +#### cloudera_hdfs_files + +The [cloudera_hdfs_files](https://github.com/miso231/icinga2-cloudera-plugin) plugin +connects to Hadoop Namenode and gets total number of files on HDFS + +Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): + +Name | Description +----------------------|----------------------------------------------------------------- +hdfs_files_host | **Required.** Namenode host to connect to. +hdfs_files_port | **Optional.** Namenode port (default 50070). +hdfs_files_warn | **Required.** Warning threshold. +hdfs_files_crit | **Required.** Critical threshold. +hdfs_files_max | **Required.** Max files count that causes problems (default 140,000,000). + ### Databases This category contains plugins for various database servers. From 6ed5d4807f01e97a6dac8bb409530295007f71b4 Mon Sep 17 00:00:00 2001 From: Michal Petko Date: Thu, 31 Jan 2019 15:58:46 +0100 Subject: [PATCH 3/3] Use full command name as prefix for check arguments --- doc/10-icinga-template-library.md | 28 ++++++++++++++-------------- itl/plugins-contrib.d/big-data.conf | 20 ++++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index d5eaa254a..3627d26ca 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -2221,13 +2221,13 @@ connects to Hadoop Namenode and gets used capacity of selected disk Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): -Name | Description -----------------------|----------------------------------------------------------------- -hdfs_space_host | **Required.** Namenode host to connect to. -hdfs_space_port | **Optional.** Namenode port (default 50070). -hdfs_space_disk | **Required.** HDFS disk to check. -hdfs_space_warn | **Required.** Warning threshold in percent. -hdfs_space_crit | **Required.** Critical threshold in percent. +Name | Description +--------------------------|----------------------------------------------------------------- +cloudera_hdfs_space_host | **Required.** Namenode host to connect to. +cloudera_hdfs_space_port | **Optional.** Namenode port (default 50070). +cloudera_hdfs_space_disk | **Required.** HDFS disk to check. +cloudera_hdfs_space_warn | **Required.** Warning threshold in percent. +cloudera_hdfs_space_crit | **Required.** Critical threshold in percent. #### cloudera_hdfs_files @@ -2236,13 +2236,13 @@ connects to Hadoop Namenode and gets total number of files on HDFS Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): -Name | Description -----------------------|----------------------------------------------------------------- -hdfs_files_host | **Required.** Namenode host to connect to. -hdfs_files_port | **Optional.** Namenode port (default 50070). -hdfs_files_warn | **Required.** Warning threshold. -hdfs_files_crit | **Required.** Critical threshold. -hdfs_files_max | **Required.** Max files count that causes problems (default 140,000,000). +Name | Description +--------------------------|----------------------------------------------------------------- +cloudera_hdfs_files_host | **Required.** Namenode host to connect to. +cloudera_hdfs_files_port | **Optional.** Namenode port (default 50070). +cloudera_hdfs_files_warn | **Required.** Warning threshold. +cloudera_hdfs_files_crit | **Required.** Critical threshold. +cloudera_hdfs_files_max | **Required.** Max files count that causes problems (default 140,000,000). ### Databases diff --git a/itl/plugins-contrib.d/big-data.conf b/itl/plugins-contrib.d/big-data.conf index 24da0b183..d765a4b7c 100644 --- a/itl/plugins-contrib.d/big-data.conf +++ b/itl/plugins-contrib.d/big-data.conf @@ -70,27 +70,27 @@ object CheckCommand "cloudera_hdfs_space" { arguments = { "-H" = { description = "Namenode host" - value = "$hdfs_space_host$" + value = "$cloudera_hdfs_space_host$" required = true } "-P" = { description = "Namenode port (default 50070)" - value = "$hdfs_space_port$" + value = "$cloudera_hdfs_space_port$" required = false } "-d" = { description = "HDFS disk to check" - value = "$hdfs_space_disk$" + value = "$cloudera_hdfs_space_disk$" required = true } "-w" = { description = "Warning threshold in percent" - value = "$hdfs_space_warn$" + value = "$cloudera_hdfs_space_warn$" required = true } "-c" = { description = "Critical threshold in percent" - value = "$hdfs_space_crit$" + value = "$cloudera_hdfs_space_crit$" required = true } } @@ -102,27 +102,27 @@ object CheckCommand "cloudera_hdfs_files" { arguments = { "-H" = { description = "Namenode host" - value = "$hdfs_files_host$" + value = "$cloudera_hdfs_files_host$" required = true } "-P" = { description = "Namenode port (default 50070)" - value = "$hdfs_files_port$" + value = "$cloudera_hdfs_files_port$" required = false } "-w" = { description = "Warning threshold" - value = "$hdfs_files_warn$" + value = "$cloudera_hdfs_files_warn$" required = true } "-c" = { description = "Critical threshold" - value = "$hdfs_files_crit$" + value = "$cloudera_hdfs_files_crit$" required = true } "-m" = { description = "Max files count that causes problems (default 140000000)" - value = "$hdfs_files_max$" + value = "$cloudera_hdfs_files_max$" required = false } }