1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
/**
* main snmp-manubulon template
*/
template CheckCommand "snmp-manubulon-command" {
import "ipv4-or-ipv6"
arguments = {
"-H" = {
value = "$snmp_address$"
description = "Name or IP address of host to check"
}
"-C" = {
set_if = "$snmp_nocrypt$"
value = "$snmp_community$"
description = "Community name for the host's SNMP agent (implies v1 protocol)"
}
"-p" = {
value = "$snmp_port$"
description = "SNMP port (Default 161)"
}
"-2" = {
set_if = "$snmp_v2$"
description = "Use snmp v2c"
}
"-l" = {
set_if = "$snmp_v3$"
value = "$snmp_login$"
description = "Login and auth password for snmpv3 authentication"
}
"-x" = {
set_if = "$snmp_v3$"
value = "$snmp_password$"
description = "Priv password"
}
"-L" = {
set_if = "$snmp_v3_use_authprotocol$"
value = "$snmp_authprotocol$"
description = "<authproto>,<privproto> - <Authentication protocol (md5|sha : default md5)>,<Priv protocole (des|aes : default des)>"
}
"-X" = {
set_if = "$snmp_v3_use_privpass$"
value = "$snmp_privpass$"
description = "Priv password for snmpv3 (AuthPriv protocol)"
}
"-w" = {
value = "$snmp_warn$"
}
"-c" = {
value = "$snmp_crit$"
}
"-t" = {
value = "$snmp_timeout$"
description = "Timeout for SNMP in seconds (Default: 5)"
}
}
vars.snmp_address = "$check_address$"
vars.snmp_nocrypt = true
vars.snmp_community = "public"
vars.snmp_v2 = false
vars.snmp_v3 = false
vars.snmp_login = "snmpuser"
vars.snmp_v3_use_privpass = false
vars.snmp_v3_use_authprotocol = false
vars.snmp_authprotocol = "md5,des"
vars.snmp_timeout = "5"
}
/**
* snmp env
* Url reference: http://nagios.manubulon.com/snmp_env.html
*/
object CheckCommand "snmp-env" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_env.pl" ]
arguments += {
"-T" = {
value = "$snmp_env_type$"
description = "Environment Type [cisco|nokia|bc|iron|foundry|linux]"
}
"-F" = {
value = "$snmp_env_fan$"
description = "Minimum fan rpm value (only needed for 'iron' & 'linux')"
}
"-c" = {
value = "$snmp_env_celsius$"
description = "Maximum temp in degrees celsius (only needed for 'iron' & 'linux')"
}
"-f" = {
set_if = "$snmp_perf$"
description = "Perfparse compatible output"
}
}
vars.snmp_env_type = "cisco"
vars.snmp_perf = true
}
/**
* snmp load
* Url reference: http://nagios.manubulon.com/snmp_load.html
*/
object CheckCommand "snmp-load" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_load.pl" ]
arguments += {
"-T" = {
value = "$snmp_load_type$"
description = "CPU check"
}
"-f" = {
set_if = "$snmp_perf$"
description = "Perfparse compatible output"
}
}
vars.snmp_load_type = "stand"
vars.snmp_warn = 85
vars.snmp_crit = 95
vars.snmp_perf = true
}
/**
* Memory and swap usage on Linux given by Net-snmp
* Memory usage on cisco routers or Pix
* For other systems use check_snmp_storage.pl
* Url reference: http://nagios.manubulon.com/snmp_mem.html
*/
object CheckCommand "snmp-memory" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_mem.pl" ]
arguments += {
"-f" = {
set_if = "$snmp_perf$"
description = "Performance data output"
}
"-I" = {
set_if = "$snmp_is_cisco$"
description = "check cisco memory (sum of all memory pools)"
}
"-E" = {
set_if = "$snmp_is_hp$"
description = "check HP / Procurve memory"
}
"-m" = {
set_if = "$snmp_memcached$"
description = "Include cached memory in used memory"
}
"-b" = {
set_if = "$snmp_membuffer$"
description = "Exclude buffered memory in used memory"
}
}
vars.snmp_warn = "94,50"
vars.snmp_crit = "98,80"
vars.snmp_perf = true
vars.snmp_is_cisco = false
vars.snmp_memcached = false
vars.snmp_membuffer = false
}
/**
* snmp storage - Disk/Memory
* Url reference: http://nagios.manubulon.com/snmp_storage.html
*/
object CheckCommand "snmp-storage" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_storage.pl" ]
arguments += {
"-m" = {
value = "$snmp_storage_name$"
description = "Name in description OID (can be mounpoints '/home' or 'Swap Space'...)"
}
"-f" = {
set_if = "$snmp_perf$"
description = "Perfparse compatible output"
}
"-e" = {
set_if = "$snmp_exclude$"
description = "Select all storages except the one(s) selected by -m. No action on storage type selection."
}
"-o" = {
value = "$snmp_storage_olength$"
description = "Max-size of the SNMP message, usefull in case of Too Long responses."
}
"-q" = {
value = "$snmp_storage_type$"
description = "Storage type: Other, Ram, VirtualMemory, FixedDisk, RemovableDisk, FloppyDisk, CompactDisk, RamDisk, FlashMemory, or NetworkDisk"
}
}
vars.snmp_storage_name = "^/$$"
vars.snmp_warn = 80
vars.snmp_crit = 90
vars.snmp_perf = true
vars.snmp_exclude = false
}
/**
* snmp network interfaces
* Url reference: http://nagios.manubulon.com/snmp_int.html
*/
object CheckCommand "snmp-interface" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_int.pl" ]
arguments += {
"-n" = {
value = "$snmp_interface$"
description = "Name in description OID (eth0, ppp0 ...). This is treated as a regexp : -n eth will match eth0,eth1,..."
}
"-k" = {
set_if = "$snmp_interface_perf$"
description = "Check the input/ouput bandwidth of the interface"
}
"--label" = {
value = "$snmp_interface_label$"
description = "Add label before speed in output : in=, out=, errors-out=, etc..."
}
"-Y" = {
set_if = "$snmp_interface_bits_bytes$"
description = "Output performance data in bits/s or Bytes/s"
}
"-y" = {
set_if = "$snmp_interface_percent$"
description = "Output performance data in % of max speed"
}
"-B" = {
set_if = "$snmp_interface_kbits$"
description = "Make the warning and critical levels in K|M|G Bits/s instead of K|M|G Bytes/s"
}
"-M" = {
set_if = "$snmp_interface_megabytes$"
description = "Make the warning and critical levels in Mbps"
}
"--64bits" = {
set_if = "$snmp_interface_64bit$"
description = "Use 64 bits counters instead of the standard counters when checking bandwidth & performance data for interface >= 1Gbps"
}
"-e" = {
set_if = "$snmp_interface_errors$"
description = "Add error & discard to Perfparse output"
}
"-q" = {
set_if = "$snmp_interface_extended_checks$"
description = "Also check the error and discard input/output. When enabled format of snmp_warn and snmp_crit changes to <In bytes>,<Out bytes>,<In error>,<Out error>,<In disc>,<Out disc>"
}
"-i" = {
set_if = "$snmp_interface_inverse$"
description = "Make critical when up"
}
"-r" = {
set_if = "$snmp_interface_noregexp$"
description = "Do not use regexp to match NAME in description OID"
}
"-d" = {
value = "$snmp_interface_delta$"
description = "Make an average of <delta> seconds (default 300=5min)"
}
"-u" = {
set_if = "$snmp_interface_warncrit_percent$"
description = "Make the warning and critical levels in % of reported interface speed"
}
"-N" = {
set_if = "$snmp_interface_ifname$"
}
"-A" = {
set_if = "$snmp_interface_ifalias$"
}
"-f" = {
set_if = "$snmp_perf$"
description = "Perfparse compatible output (no output when interface is down)"
}
"-W" = {
set_if = "$snmp_interface_weathermap$"
description = "Include 'weathermap' data for NagVis in performance data"
}
"-a" = {
set_if = "$snmp_interface_admin$"
description = "Use administrative status instead of operational"
}
}
vars.snmp_interface = "eth0"
vars.snmp_interface_perf = true
vars.snmp_interface_bits_bytes = true
vars.snmp_interface_percent = false
vars.snmp_interface_kbits = true
vars.snmp_interface_megabytes = true
vars.snmp_interface_64bit = false
vars.snmp_interface_errors = true
vars.snmp_interface_extended_checks = false
vars.snmp_interface_noregexp = false
vars.snmp_interface_delta = 300
vars.snmp_interface_warncrit_percent = false
vars.snmp_interface_ifname = false
vars.snmp_interface_ifalias = false
vars.snmp_warn = "300,400"
vars.snmp_crit = "0,600"
vars.snmp_perf = true
}
/**
* snmp process
* Url reference: http://nagios.manubulon.com/snmp_process.html
*/
object CheckCommand "snmp-process" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_process.pl" ]
arguments += {
"-n" = {
value = "$snmp_process_name$"
description = "Regex service name eg. ^apache2$"
}
"-F" = {
set_if = "$snmp_perf$"
description = "Add performance output (outputs : memory_usage, num_process, cpu_usage)"
}
"-A" = {
set_if = "$snmp_process_use_params$"
description = "Add parameters to select processes (ex : 'named.*-t /var/named/chroot' will only select named process with this parameter)"
}
"-f" = {
set_if = "$snmp_process_use_fullpath$"
description = "Use full path name instead of process name to select processes (ex : '/opt/app1/app1bin' will only select named process with this full path)"
}
"-m" = {
set_if = "$snmp_process_mem_usage$"
value = "$snmp_process_mem_threshold$"
description = "Checks memory usage. Values warning and critical in Mb eg. 512,1024"
}
"-u" = {
set_if = "$snmp_process_cpu_usage$"
value = "$snmp_process_cpu_threshold$"
description = "Checks CPU usage. Values warning and critical in % (value can be > 100% : 100%=1 CPU) eg. 15,50"
}
}
vars.snmp_process_name = ".*"
vars.snmp_warn = 0
vars.snmp_crit = 0
vars.snmp_perf = true
vars.snmp_process_use_params = false
vars.snmp_process_use_fullpath = false
vars.snmp_process_mem_usage = false
vars.snmp_process_mem_threshold = "0,0"
vars.snmp_process_cpu_usage = false
vars.snmp_process_cpu_threshold = "0,0"
}
/**
* snmp service
* Url reference: http://nagios.manubulon.com/snmp_windows.html
*/
object CheckCommand "snmp-service" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_win.pl" ]
arguments += {
"-n" = {
value = "$snmp_service_name$"
description = "Comma separated names of services (perl regular expressions can be used for every one). By default, it is not case sensitive. eg. ^dns$"
}
"-N" = {
value = "$snmp_service_count$"
description = "Compare matching services with <n> instead of the number of names provided."
}
"-s" = {
set_if = "$snmp_service_showall$"
description = "Show all services in the output, instead of only the non-active ones."
}
"-r" = {
set_if = "$snmp_service_noregexp$"
description = "Do not use regexp to match NAME in service description."
}
}
vars.snmp_service_name = ".*"
}
|