nagios: Added host target for HP ProCurve switches

This commit is contained in:
Ossi Salmi 2013-07-22 21:23:06 +03:00
parent c6f81dafa1
commit b59bf3e96c

View file

@ -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"],
}
}