-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
4,058 additions
and
654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
# defaults file for agent | ||
check_mk_agent_deb_package: check-mk-agent_1.2.4p5-2_all.deb | ||
check_mk_agent_deb_package: check-mk-agent_1.2.6p16-1_all.deb | ||
check_mk_agent_over_ssh: True | ||
check_mk_agent_plugins_requirements: ["smartmontools"] | ||
check_mk_agent_plugins: ["smart", ] | ||
check_mk_agent_plugins_requirements: [] | ||
check_mk_agent_plugins: [] | ||
check_mk_agent_pubkey_file: |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/sh | ||
# +------------------------------------------------------------------+ | ||
# | ____ _ _ __ __ _ __ | | ||
# | / ___| |__ ___ ___| | __ | \/ | |/ / | | ||
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / | | ||
# | | |___| | | | __/ (__| < | | | | . \ | | ||
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ | | ||
# | | | ||
# | Copyright Mathias Kettner 2014 mk@mathias-kettner.de | | ||
# +------------------------------------------------------------------+ | ||
# | ||
# This file is part of Check_MK. | ||
# The official homepage is at http://mathias-kettner.de/check_mk. | ||
# | ||
# check_mk is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation in version 2. check_mk is distributed | ||
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with- | ||
# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
# PARTICULAR PURPOSE. See the GNU General Public License for more de- | ||
# ails. You should have received a copy of the GNU General Public | ||
# License along with GNU Make; see the file COPYING. If not, write | ||
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, | ||
# Boston, MA 02110-1301 USA. | ||
|
||
# This check can be used to test the name resolution of a given host | ||
# address using the local resolver of the system this script is | ||
# running on. | ||
|
||
HOSTADDRESSES=mathias-kettner.de | ||
|
||
if [ -e $MK_CONFDIR/dnsclient.cfg ] ; then | ||
. $MK_CONFDIR/dnsclient.cfg | ||
fi | ||
|
||
echo "<<<mrpe>>>" | ||
for HOSTADDRESS in $HOSTADDRESSES | ||
do | ||
ADDRESSES=`nslookup $HOSTADDRESS | sed -n -e 1,3d -e '/^Address: *\(.*\)$/s//\1/p'` | ||
if [ ! "$ADDRESSES" ] ; then | ||
STATE=2 | ||
OUTPUT="CRIT - $HOSTADDRESS could not be resolved" | ||
else | ||
STATE=0 | ||
OUTPUT="OK - $HOSTADDRESS resolved into $ADDRESSES" | ||
fi | ||
echo Resolve_$HOSTADDRESS $STATE $OUTPUT | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#!/usr/bin/ksh | ||
# +------------------------------------------------------------------+ | ||
# | ____ _ _ __ __ _ __ | | ||
# | / ___| |__ ___ ___| | __ | \/ | |/ / | | ||
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / | | ||
# | | |___| | | | __/ (__| < | | | | . \ | | ||
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ | | ||
# | | | ||
# | Copyright Mathias Kettner 2014 mk@mathias-kettner.de | | ||
# +------------------------------------------------------------------+ | ||
# | ||
# This file is part of Check_MK. | ||
# The official homepage is at http://mathias-kettner.de/check_mk. | ||
# | ||
# check_mk is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation in version 2. check_mk is distributed | ||
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with- | ||
# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
# PARTICULAR PURPOSE. See the GNU General Public License for more de- | ||
# ails. You should have received a copy of the GNU General Public | ||
# License along with GNU Make; see the file COPYING. If not, write | ||
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, | ||
# Boston, MA 02110-1301 USA. | ||
|
||
# Put this file into /usr/lib/check_mk_agent/plugins. Then | ||
# reinventorize your host. | ||
# Actually querying these stats is quite slow since they freshly update | ||
# on each call. If you have a few 1000 luns then this will not work. | ||
|
||
get_stats() | ||
{ | ||
scsimgr get_stat -D $LUN | tr '\=' ':' | grep -e 'STATISTICS FOR LUN' -e 'Bytes' -e 'Total I/Os processed' -e 'I/O failure' -e 'IO failures due | ||
to' | ||
return $? | ||
} | ||
|
||
|
||
# Ex: | ||
#LUN PATH INFORMATION FOR LUN : /dev/pt/pt2 | ||
#World Wide Identifier(WWID) = | ||
#LUN PATH INFORMATION FOR LUN : /dev/rdisk/disk5 | ||
#World Wide Identifier(WWID) = 0x60a98000572d44745634645076556357 | ||
#LUN PATH INFORMATION FOR LUN : /dev/rdisk/disk6 | ||
|
||
get_lun_map() | ||
{ | ||
scsimgr lun_map | egrep '^[[:space:]]*(LUN PATH|World Wide Identifier)' | tr '\=' ':' | ||
} | ||
|
||
|
||
main() | ||
{ | ||
get_lun_map | while read line ; do | ||
descr=$(echo $line | awk -F: '{print $1}') | ||
val=$( echo $line | awk -F: '{print $2}') | ||
case $descr in | ||
LUN*) | ||
if echo $val | grep /dev/rdisk 1>/dev/null; then | ||
DMP=yes | ||
LUN=$val | ||
else | ||
DMP=no | ||
unset LUN | ||
fi | ||
;; | ||
World*) | ||
if [ $DMP = "yes" ]; then | ||
echo "WWID: $val" | ||
get_stats $LUN | ||
fi | ||
;; | ||
*) | ||
echo "Fehler:" | ||
echo $line | ||
echo $descr | ||
echo $val | ||
sleep 1 | ||
;; | ||
esac | ||
done | ||
} | ||
|
||
|
||
|
||
# Verify the system is using new multipath device model. | ||
if [ -d /dev/rdisk ] && [ -d /dev/disk ]; then | ||
echo '<<<hpux_lunstats:sep(58)>>>' | ||
main | ||
fi | ||
|
Oops, something went wrong.