]> granicus.if.org Git - icinga2/blob - itl/command-plugins-manubulon.conf
Docs: Add cli commands
[icinga2] / itl / command-plugins-manubulon.conf
1 /******************************************************************************
2  * Icinga 2                                                                   *
3  * Copyright (C) 2012-2014 Icinga Development Team (http://www.icinga.org)    *
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 /**
21  * main snmp-manubulon template
22  */
23
24 template CheckCommand "snmp-manubulon-command" {
25         import "plugin-check-command"
26
27         arguments = {
28                 "-H" = "$snmp_address$"
29                 "-C" = {
30                         set_if = "$snmp_nocrypt$"
31                         value = "$snmp_community$"
32                 }
33                 "-p" = "$snmp_port$"
34                 "-2" = {
35                         set_if = "$snmp_v2$"
36                 }
37                 "-l" = {
38                         set_if = "$snmp_v3$"
39                         value = "$snmp_login$"
40                 }
41                 "-x" = {
42                         set_if = "$snmp_v3$"
43                         value = "$snmp_password$"
44                 }
45                 "-L" = {
46                         set_if = "$snmp_v3_use_authprotocol$"
47                         value = "$snmp_authprotocol$"
48                 }
49                 "-X" = {
50                         set_if = "$snmp_v3_use_privpass$"
51                         value = "$snmp_privpass$"
52                 }
53
54                 "-w" = "$snmp_warn$"
55                 "-c" = "$snmp_crit$"
56         }
57
58         vars.snmp_address = "$address$"
59         vars.snmp_nocrypt = true
60         vars.snmp_community = "public"
61         vars.snmp_v2 = false
62         vars.snmp_v3 = false
63         vars.snmp_login = "snmpuser"
64         vars.snmp_v3_use_privpass = false
65         vars.snmp_v3_use_authprotocol = false
66         vars.snmp_authprotocol = "md5,des"
67 }
68
69
70 /**
71  * snmp load
72  *   Url reference: http://nagios.manubulon.com/snmp_load.html
73  */
74
75 object CheckCommand "snmp-load" {
76         import "snmp-manubulon-command"
77
78         command = [ ManubulonPluginDir + "/check_snmp_load.pl" ]
79
80         arguments += {
81                 "-T" = "$snmp_load_type$"
82                 "-f" = {
83                         set_if = "$snmp_perf$"
84                 }
85         }
86
87         vars.snmp_load_type = "stand"
88         vars.snmp_warn = "85"
89         vars.snmp_crit = "95"
90         vars.snmp_perf = true
91 }
92
93
94 /** 
95  * Memory and swap usage on Linux given by Net-snmp
96  *   Memory usage on cisco routers or Pix
97  *   For other systems use check_snmp_storage.pl
98  *   Url reference: http://nagios.manubulon.com/snmp_mem.html
99  */
100
101 object CheckCommand "snmp-memory" {
102         import "snmp-manubulon-command"
103
104         command = [ ManubulonPluginDir + "/check_snmp_mem.pl" ]
105
106         arguments += {
107                 "-f" = {
108                         set_if = "$snmp_perf$"
109                 }
110         }
111
112         vars.snmp_warn = "94,50"
113         vars.snmp_crit = "98,80"
114         vars.snmp_perf = true
115 }
116
117
118 /**
119  * snmp storage - Disk/Memory
120  *   Url reference: http://nagios.manubulon.com/snmp_storage.html
121  */
122 object CheckCommand "snmp-storage" {
123         import "snmp-manubulon-command"
124
125         command = [ ManubulonPluginDir + "/check_snmp_storage.pl" ]
126
127         arguments += {
128                 "-m" = "$snmp_storage_name$"
129                 "-f" = {
130                         set_if = "$snmp_perf$"
131                 }
132         }
133
134         vars.snmp_storage_name = "^/$$"
135         vars.snmp_warn = 80
136         vars.snmp_crit = 90
137         vars.snmp_perf = true
138 }
139
140
141 /** 
142  * snmp network interfaces
143  *   Url reference: http://nagios.manubulon.com/snmp_int.html
144  */
145
146 object CheckCommand "snmp-interface" {
147         import "snmp-manubulon-command"
148
149         command = [ ManubulonPluginDir + "/check_snmp_int.pl" ]
150
151         arguments += {
152                 "-n" = "$snmp_interface$"
153                 "-k" = {
154                         set_if = "$snmp_interface_perf$"
155                 }
156                 "-B" = {
157                         set_if = "$snmp_interface_bits$"
158                 }
159                 "--64bits" = {
160                         set_if = "$snmp_interface_64bit$"
161                 }
162                 "-f" = {
163                         set_if = "$snmp_perf$"
164                 }
165         }
166
167         vars.snmp_interface = "eth0"
168         vars.snmp_interface_perf = true
169         vars.snmp_interface_bits = true
170         vars.snmp_interface_64bit = false
171         vars.snmp_warn = "300,400"
172         vars.snmp_crit = "0,600"
173         vars.snmp_perf = true
174 }
175
176
177 /** 
178  * snmp process
179  *   Url reference: http://nagios.manubulon.com/snmp_process.html
180  */
181
182 object CheckCommand "snmp-process" {
183         import "snmp-manubulon-command"
184
185         command = [ ManubulonPluginDir + "/check_snmp_process.pl" ]
186
187         arguments += {
188                 "-n" = {
189                         description = "Regex service name eg. ^apache2$"
190                         value = "$snmp_process_name$"
191                 }
192                 "-F" = {
193                         set_if = "$snmp_perf$"
194                 }
195         }
196
197         vars.snmp_process_name = ".*"
198         vars.snmp_warn = 0
199         vars.snmp_crit = 0
200         vars.snmp_perf = true
201 }
202