]> granicus.if.org Git - icinga2/blob - itl/plugins-contrib.d/storage.conf
Merge pull request #6577 from Icinga/fix/setup-api-including-users-file
[icinga2] / itl / plugins-contrib.d / storage.conf
1 /******************************************************************************
2  * Icinga 2                                                                   *
3  * Copyright (C) 2012-2018 Icinga Development Team (https://icinga.com/)      *
4  *                                                                            *
5  * This program is free software; you can redistribute it and/or              *
6  * modify it under the terms of the GNU General Public License                *
7  * as published by the Free Software Foundation; either version 2             *
8  * of the License, or (at your option) any later version.                     *
9  *                                                                            *
10  * This program is distributed in the hope that it will be useful,            *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
13  * GNU General Public License for more details.                               *
14  *                                                                            *
15  * You should have received a copy of the GNU General Public License          *
16  * along with this program; if not, write to the Free Software Foundation     *
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
18  ******************************************************************************/
19
20 object CheckCommand "glusterfs" {
21         command = [ "sudo", PluginDir + "/check_glusterfs" ]
22
23         arguments = {
24                 "--perfdata" = {
25                         set_if = "$glusterfs_perfdata$"
26                         description = "Optional. Print perfdata of all or the specified volume."
27                 }
28                 "--warnonfailedheal" = {
29                         set_if = "$glusterfs_warnonfailedheal$"
30                         description = "Optional. Warn if the *heal-failed* log contains entries. The log can be cleared by restarting glusterd."
31                 }
32                 "--volume" = {
33                         value = "$glusterfs_volume$"
34                         description = "Optional. Only check the specified *VOLUME*. If --volume is not set, all volumes are checked."
35                 }
36                 "-w" = {
37                         value = "$glusterfs_disk_warning$"
38                         description = "Optional. Warn if disk usage is above *DISKWARN*. Defaults to 90 (percent)."
39                 }
40                 "-c" = {
41                         value = "$glusterfs_disk_critical$"
42                         description = "Optional. Return a critical error if disk usage is above *DISKCRIT*. Defaults to 95 (percent)."
43                 }
44                 "-W" = {
45                         value = "$glusterfs_inode_warning$"
46                         description = "Optional. Warn if inode usage is above *DISKWARN*. Defaults to 90 (percent)."
47                 }
48                 "-C" = {
49                         value = "$glusterfs_inode_critical$"
50                         description = "Optional. Return a critical error if inode usage is above *DISKCRIT*. Defaults to 95 (percent)."
51                 }
52         }
53
54         vars.glusterfs_disk_warning = 90
55         vars.glusterfs_disk_critical = 95
56         vars.glusterfs_inode_warning = 90
57         vars.glusterfs_inode_critical = 95
58 }
59
60 object CheckCommand "ceph" {
61         command = [ PluginDir + "/check_ceph.py" ]
62
63         arguments = {
64                 "-e" = {
65                         value = "$ceph_exec_dir$"
66                         required = false
67                         description = "ceph executable [/usr/bin/ceph]"
68                 }
69                 "-c" = {
70                         value = "$ceph_conf_file$"
71                         required = false
72                         description = "alternative ceph conf file"
73                 }
74                 "-m" = {
75                         value = "$ceph_mon_address$"
76                         required = false
77                         description = "ceph monitor address[:port]"
78                 }
79                 "-i" = {
80                         value = "$ceph_client_id$"
81                         required = false
82                         description = "ceph client id"
83                 }
84                 "-n" = {
85                         value = "$ceph_client_name$"
86                         required = false
87                         description = "ceph client name"
88                 }
89                 "-k" = {
90                         value = "$ceph_client_key$"
91                         required = false
92                         description = "ceph client keyring file"
93                 }
94                 "-w" = {
95                         value = "$ceph_whitelist$"
96                         required = false
97                         description = "whitelist regexp for ceph health warnings"
98                 }
99                 "-d" = {
100                         set_if = "$ceph_details$"
101                         description = "exec 'ceph health detail'"
102                 }
103         }
104 }
105
106 object CheckCommand "btrfs" {
107         import "plugin-check-command"
108         command = [ "sudo", PluginDir + "/check_btrfs" ]
109
110         arguments = {
111                 "--allocated-warning-gib" = {
112                         value = "$btrfs_awg$"
113                         description = "Exit with WARNING status if less than the specified amount of disk space (in GiB) is unallocated"
114                 }
115                 "--allocated-critical-gib" = {
116                         value = "$btrfs_acg$"
117                         description = "Exit with CRITICAL status if less than the specified amount of disk space (in GiB) is unallocated"
118                 }
119                 "--allocated-warning-percent" = {
120                         value = "$btrfs_awp$"
121                         description = "Exit with WARNING status if more than the specified percent of disk space is allocated"
122                 }
123                 "--allocated-critical-percent" = {
124                         value = "$btrfs_acp$"
125                         description = "Exit with CRITICAL status if more than the specified percent of disk space is allocated"
126                 }
127                 "--mountpoint" = {
128                         value = "$btrfs_mountpoint$"
129                         description = "Path to the BTRFS mountpoint"
130                         required = true
131                 }
132         }
133         vars.btrfs_awp = 80
134         vars.btrfs_acp = 90
135 }
136