nagios: Added host target for HP ProCurve switches
This commit is contained in:
parent
c6f81dafa1
commit
b59bf3e96c
1 changed files with 35 additions and 0 deletions
|
@ -651,3 +651,38 @@ define nagios::host::esxi($user, $pass, $vendor="auto") {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Define HP ProCurve target host.
|
||||
#
|
||||
# $name:
|
||||
# Target hostname.
|
||||
# $community:
|
||||
# SNMP community.
|
||||
# $group:
|
||||
# Hostgroup.
|
||||
#
|
||||
define nagios::host::procurve($community, $group="NONE") {
|
||||
|
||||
include snmp::utils
|
||||
|
||||
# 4 = good, 3 = warning, 2 = bad
|
||||
$warn = "4:,4:,4:"
|
||||
$crit = "3:,3:,3:"
|
||||
# Fan, PSU1, PSU2
|
||||
$oids = ".1.3.6.1.4.1.11.2.14.11.1.2.6.1.4.1,.1.3.6.1.4.1.11.2.14.11.1.2.6.1.4.2,.1.3.6.1.4.1.11.2.14.11.1.2.6.1.4.3"
|
||||
|
||||
nagios::host { $name:
|
||||
group => $group,
|
||||
osname => "ProCurve",
|
||||
osicon => "switch",
|
||||
}
|
||||
nagios::service { "${name}_check_snmp":
|
||||
host => $name,
|
||||
group => $group,
|
||||
command => "check_snmp!-l FAN,PSU1,PSU2 -C ${community} -w ${warn} -c ${crit} -o ${oids}",
|
||||
description => "Sensors",
|
||||
require => Package["net-snmp-utils"],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue