From: Michal Petko Date: Tue, 21 Aug 2018 10:09:43 +0000 (+0200) Subject: Add ceph plugin to itl X-Git-Tag: v2.10.0~61^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d66f3c73c391b97da56afd715caceb2b217483e;p=icinga2 Add ceph plugin to itl --- diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 1ce1cd45a..08243d65f 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -3062,6 +3062,24 @@ glusterfs_disk_critical | **Optional.** Return a critical error if disk usage glusterfs_inode_warning | **Optional.** Warn if inode usage is above *DISKWARN*. Defaults to 90 (percent). glusterfs_inode_critical | **Optional.** Return a critical error if inode usage is above *DISKCRIT*. Defaults to 95 (percent). +#### ceph + +The [ceph plugin](https://github.com/ceph/ceph-nagios-plugins) +is used to check the Ceph storage health on the server. + +Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): + +Name | Description +---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +ceph_exec_dir | **Optional.** Ceph executable. Default /usr/bin/ceph. +ceph_conf_file | **Optional.** Alternative ceph conf file. +ceph_mon_address | **Optional.** Ceph monitor address[:port]. +ceph_client_id | **Optional.** Ceph client id. +ceph_client_name | **Optional.** Ceph client name. +ceph_client_key | **Optional.** Ceph client keyring file. +ceph_whitelist | **Optional.** Whitelist regexp for ceph health warnings. +ceph_details | **Optional.** Run 'ceph health detail'. + ### Virtualization diff --git a/itl/plugins-contrib.d/storage.conf b/itl/plugins-contrib.d/storage.conf index 4cddb4fdd..40a3b5c2a 100644 --- a/itl/plugins-contrib.d/storage.conf +++ b/itl/plugins-contrib.d/storage.conf @@ -56,3 +56,49 @@ object CheckCommand "glusterfs" { vars.glusterfs_inode_warning = 90 vars.glusterfs_inode_critical = 95 } + +object CheckCommand "ceph" { + command = [ PluginDir + "/check_ceph.py" ] + + arguments = { + "-e" = { + value = "$service.vars.ceph_exec_dir$" + required = false + description = "ceph executable [/usr/bin/ceph]" + } + "-c" = { + value = "$service.vars.ceph_conf_file$" + required = false + description = "alternative ceph conf file" + } + "-m" = { + value = "$service.vars.ceph_mon_address$" + required = false + description = "ceph monitor address[:port]" + } + "-i" = { + value = "$service.vars.ceph_client_id$" + required = false + description = "ceph client id" + } + "-n" = { + value = "$service.vars.ceph_client_name$" + required = false + description = "ceph client name" + } + "-k" = { + value = "$service.vars.ceph_client_key$" + required = false + description = "ceph client keyring file" + } + "-w" = { + value = "$service.vars.ceph_whitelist$" + required = false + description = "whitelist regexp for ceph health warnings" + } + "-d" = { + set_if = "$service.vars.ceph_details$" + description = "exec 'ceph health detail'" + } + } +}