This commit is contained in:
patvdv 2017-09-02 23:27:01 +02:00
parent b23126799b
commit 2775da5f44
175 changed files with 17098 additions and 2 deletions

103
README.md
View File

@ -1,2 +1,101 @@
# check_health
Health checker for UNIX/Linux
# Health checker for UNIX/Linux
Health checker for UNIX/Linux is a small framework of monitoring scripts (plugins). It is meant to be used for low latency & low frequency checks, it is easy to extend where necessary and it can be integrated with other toolsets (YMMV).
## Requirements
* ksh88/ksh93 (mksh/pdksh will work also but YMMV)
* some disk space for storing logs & event files
* system dependant tools/utilities (see individual health checks)
* UNIX cron or other scheduler
* execute as user root only
## Installation
### HP-UX
Install the core bundle:
swinstall -x mount_all_filesystems=false -d /tmp/hc-hpux-<version>.sd HC-HPUX
Install the HP-UX plugin bundle:
swinstall -x mount_all_filesystems=false -d /tmp/hc-hpux-platform-<version>.sd HC-PLATFORM
### Linux
Install the core bundle:
yum localinstall hc-linux-<version>.noarch.rpm
zypper install hc-linux-<version>.noarch.rpm
Install the Linux plugin bundle:
yum localinstall hc-linux-platform-<version>.noarch.rpm
zypper install hc-linux-<version>.noarch.rpm
### AIX
Install the core bundle:
installp -Xap -d hc-aix-<version>.bff all
Install the AIX plugin bundle:
installp -Xap -d hc-aix-platform-<version> all
### Miscelleanous
Additionally, there may be bundles for display or notification plugins, e.g.:
* hc-display-csv
* hc-display-init
* hc-display-terse
* hc-notify-eif
* hc-notify-sms
## Examples
* **Listing** available health checks:
```
/opt/hc/bin/check_health.sh --list
```
* **Running** a single health check:
```
/opt/hc/bin/check_health.sh --hc=check_hpux_ioscan --run
```
* **Running** multiple health checks (at once):
```
/opt/hc/bin/check_health.sh --hc=check_hpux_ioscan,check_hpux_ovpa_status --run
```
* **Running** a single health check with a custom configuration file:
```
/opt/hc/bin/check_health.sh --hc=check_hpux_ioscan --config-file=/etc/opt/hc/check_hpux_ioscan_new.conf --run
```
* **Showing** information on a health check:
```
/opt/hc/bin/check_health.sh --hc=check_hpux_ioscan --show
```
* **Enabling/disabling** a health check:
```
/opt/hc/bin/check_health.sh --hc=check_hpux_ioscan --check
/opt/hc/bin/check_health.sh --hc=check_hpux_ioscan --disable
/opt/hc/bin/check_health.sh --hc=check_hpux_ioscan --enable
```
* **Reporting** on failed health checks:
```
/opt/hc/bin/check_health.sh --report
/opt/hc/bin/check_health.sh --report --last
/opt/hc/bin/check_health.sh --report --today
/opt/hc/bin/check_health.sh --report --id=20160704154001 --detail
```
* **Alerting** on failed health checks:
```
/opt/hc/bin/check_health.sh --hc=check_hpux_root_crontab --run --notify=mail --mail-to="alert@acme.com"
```

View File

@ -0,0 +1,58 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) build script for HC BFF packages (uses 'build_bff.sh' & 'mkinstallp')
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
#******************************************************************************
# Build environment should typically exist on a NIM server.
# Requires following build (dir) structures:
#
# build_bff.sh -> /usr/local/bin/build_bff.sh
# build_aix_bff.sh
# hc_aix/* (containing mkinstallp template & sources)
# hc_aix_platform/* (containing mkinstallp template & sources)
# hc_aix_dll/* (containing mkinstallp template & sources)
# hc_aix_security/* (containing mkinstallp template & sources)
# ...
# lpp_source/KUDOS (defined in build_bff.sh script)
#
# Build order:
# 1) Copy sources/scrips to the correct locations
# 2) Copy pristine version of the build spec file to preserver %BUILD_DATE% (.template)
# 3) Copy template, build and installer script files into correct locations
# 4) Execute build_aix_bff.sh
# 5) RPM packages may be found in the individual 'tmp' directories per plugin
# (also refer to the help of build_bff.sh, ./build_bff.sh --help)
#******************************************************************************
BUILD_DATE="$(date +'%Y%m%d')"
BUILD_PRETTY_DATE="$(date +'%Y.%m.%d')"
BUILD_DIR="$(dirname $0)"
# replace BUILD_DATE placeholder in template files
find ${BUILD_DIR} -name "*.template" | while read FILE
do
perl -pi -e "s/%BUILD_DATE%/${BUILD_PRETTY_DATE}/g" ${FILE}
done
# cleanup of old BFF packages happens in build_bff.sh
# build BFF packages
${BUILD_DIR}/build_bff.sh
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,43 @@
Package Name: hc_aix
Package VRMF: %BUILD_DATE%
Update: N
Fileset
Fileset Name: hc_aix.rte
Fileset VRMF: %BUILD_DATE%
Fileset Description: Health Checker
USRLIBLPPFiles
EOUSRLIBLPPFiles
ROOTLIBLPPFiles
Post-installation Script: /export/nim/build/hc_aix/scripts/hc_aix.postinstall
Unpost-installation Script: /export/nim/build/hc_aix/scripts/hc_aix.postuninstall
EOROOTLIBLPPFiles
Bosboot required: N
License agreement acceptance required: N
Include license files in this package: N
Requisites:
USRFiles
EOUSRFiles
ROOT Part: Y
ROOTFiles
/opt/hc
/opt/hc/bin
/opt/hc/bin/check_health.sh
/opt/hc/lib
/opt/hc/lib/core
/opt/hc/lib/core/include_core.sh
/opt/hc/lib/core/include_data.sh
/opt/hc/lib/core/include_os.sh
/opt/hc/lib/core/notify_mail.sh
/etc/opt/hc
/etc/opt/hc/check_host.conf.dist
/etc/opt/hc/core
/etc/opt/hc/core/check_health.conf.dist
/etc/opt/hc/core/templates
/etc/opt/hc/core/templates/mail_info.tpl
/etc/opt/hc/core/templates/mail_header.tpl
/etc/opt/hc/core/templates/mail_body.tpl
/etc/opt/hc/core/templates/mail_footer.tpl
/var/opt/hc
EOROOTFiles
Relocatable: N
EOFileset

View File

@ -0,0 +1,96 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for hc_aix LPP package
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of VAR dir
HC_VAR_DIR="/var/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# create ETC DIR
if [[ ! -d ${HC_ETC_DIR} ]]
then
mkdir -p ${HC_ETC_DIR} >/dev/null || \
{
print -u2 "ERROR: could not create directory ${HC_ETC_DIR}"
exit 1
}
chmod 755 ${HC_ETC_DIR} >/dev/null || \
print -u2 "WARN: could not 'chmod 755' on directory ${HC_ETC_DIR}"
fi
if [[ ! -d ${HC_ETC_DIR}/core ]]
then
mkdir -p ${HC_ETC_DIR}/core >/dev/null || \
{
print -u2 "ERROR: could not create directory ${HC_ETC_DIR}/core"
exit 1
}
chmod 755 ${HC_ETC_DIR} >/dev/null || \
print -u2 "WARN: could not 'chmod 755' on directory ${HC_ETC_DIR}/core"
fi
# copy main config file from dist (if needed)
if [[ ! -f ${HC_ETC_DIR}/core/check_health.conf ]]
then
cp -p ${HC_ETC_DIR}/core/check_health.conf.dist ${HC_ETC_DIR}/core/check_health.conf >/dev/null || \
{
print -u2 "ERROR: could not copy main config file in ${HC_ETC_DIR}/core"
exit 1
}
fi
# copy host check config file from dist (if needed)
if [[ ! -f ${HC_ETC_DIR}/check_host.conf ]]
then
cp -p ${HC_ETC_DIR}/check_host.conf.dist ${HC_ETC_DIR}/check_host.conf >/dev/null || \
{
print -u2 "ERROR: could not copy main config file in ${HC_ETC_DIR}"
exit 1
}
fi
# create VAR DIR
if [[ ! -d ${HC_VAR_DIR} ]]
then
mkdir -p ${HC_VAR_DIR} >/dev/null || \
{
print -u2 "ERROR: could not create directory ${HC_VAR_DIR}"
exit 1
}
chmod 755 ${HC_VAR_DIR} >/dev/null || \
print -u2 "WARN: could not 'chmod 755' on directory ${HC_VAR_DIR}"
fi
# refresh symbolic FPATH links for core plugins
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,64 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-uninstall script for hc_aix LPP package
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of VAR dir
HC_VAR_DIR="/var/opt/hc"
# location of MAIN dir
HC_MAIN_DIR="/opt/hc"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-uninstall script ..."
# remove ETC DIR (only .dist files)
if [[ -d ${HC_ETC_DIR} ]]
then
rm -rf ${HC_ETC_DIR}/*.dist >/dev/null || \
print -u2 "WARN: could not remove .dist files in directory ${HC_ETC_DIR}"
fi
if [[ -d ${HC_ETC_DIR}/core ]]
then
rm -rf ${HC_ETC_DIR}/core/*.dist >/dev/null || \
print -u2 "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core"
fi
if [[ -d ${HC_ETC_DIR}/core/providers ]]
then
rm -rf ${HC_ETC_DIR}/core/providers/*.dist >/dev/null || \
print -u2 "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core/providers"
fi
# remove VAR DIR (temporary state only)
if [[ -d ${HC_VAR_DIR} ]]
then
rm -rf ${HC_VAR_DIR}/state/temporary >/dev/null || \
print -u2 "WARN: could not remove directory ${HC_VAR_DIR}/state/temporary"
fi
# remove MAIN DIR
if [[ -d ${HC_MAIN_DIR} ]]
then
rm -rf ${HC_MAIN_DIR} >/dev/null || \
print -u2 "WARN: could not remove directory ${HC_VAR_DIR}"
fi
print "INFO: finished post-uninstall script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1 @@
*prereq hc_aix.rte

View File

@ -0,0 +1,43 @@
Package Name: hc_aix_platform
Package VRMF: %BUILD_DATE%
Update: N
Fileset
Fileset Name: hc_aix_platform.rte
Fileset VRMF: %BUILD_DATE%
Fileset Description: Health Checker - OS/platform plugins
USRLIBLPPFiles
EOUSRLIBLPPFiles
ROOTLIBLPPFiles
Post-installation Script: /export/nim/build/hc_aix_platform/scripts/hc_aix_platform.postinstall
Unpost-installation Script: /export/nim/build/hc_aix_platform/scripts/hc_aix_platform.postuninstall
EOROOTLIBLPPFiles
Bosboot required: N
License agreement acceptance required: N
Include license files in this package: N
Requisites: /export/nim/build/hc_aix_platform/hc_aix_platform.reqs
USRFiles
EOUSRFiles
ROOT Part: Y
ROOTFiles
/opt/hc/lib
/opt/hc/lib/platform
/opt/hc/lib/platform/aix
/opt/hc/lib/platform/aix/check_aix_errpt.sh
/opt/hc/lib/platform/aix/check_aix_file_age.sh
/opt/hc/lib/platform/aix/check_aix_file_change.sh
/opt/hc/lib/platform/aix/check_aix_fs_mounts.sh
/opt/hc/lib/platform/aix/check_aix_lppchk.sh
/opt/hc/lib/platform/aix/check_aix_paths.sh
/opt/hc/lib/platform/aix/check_aix_root_crontab.sh
/opt/hc/lib/platform/aix/check_aix_subsystems.sh
/opt/hc/lib/platform/aix/check_aix_sysbackup.sh
/opt/hc/lib/platform/aix/check_aix_topasrec.sh
/etc/opt/hc
/etc/opt/hc/check_aix_file_age.conf.dist
/etc/opt/hc/check_aix_file_change.conf.dist
/etc/opt/hc/check_aix_root_crontab.conf.dist
/etc/opt/hc/check_aix_subsystems.conf.dist
/etc/opt/hc/check_aix_sysbackup.conf.dist
EOROOTFiles
Relocatable: N
EOFileset

View File

@ -0,0 +1,39 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for hc_aix_platform LPP package
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,39 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-uninstall script for hc_aix_platform LPP package
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-uninstall script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-uninstall script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1 @@
*prereq hc_aix.rte

View File

@ -0,0 +1,27 @@
Package Name: hc_display_csv
Package VRMF: %BUILD_DATE%
Update: N
Fileset
Fileset Name: hc_display_csv.rte
Fileset VRMF: %BUILD_DATE%
Fileset Description: Health Checker - core CSV plugin
USRLIBLPPFiles
EOUSRLIBLPPFiles
ROOTLIBLPPFiles
Post-installation Script: /export/nim/build/hc_display_csv/scripts/hc_display_csv.postinstall
Unpost-installation Script: /export/nim/build/hc_display_csv/scripts/hc_display_csv.postuninstall
EOROOTLIBLPPFiles
Bosboot required: N
License agreement acceptance required: N
Include license files in this package: N
Requisites: /export/nim/build/hc_display_csv/hc_display_csv.reqs
USRFiles
EOUSRFiles
ROOT Part: Y
ROOTFiles
/opt/hc/lib
/opt/hc/lib/core
/opt/hc/lib/platform/aix/display_csv.sh
EOROOTFiles
Relocatable: N
EOFileset

View File

@ -0,0 +1,41 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for hc_display_csv LPP package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,41 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-uninstall script for hc_display_csv LPP package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-uninstall script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-uninstall script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1 @@
*prereq hc_aix.rte

View File

@ -0,0 +1,27 @@
Package Name: hc_display_init
Package VRMF: %BUILD_DATE%
Update: N
Fileset
Fileset Name: hc_display_init.rte
Fileset VRMF: %BUILD_DATE%
Fileset Description: Health Checker - core INIT plugin
USRLIBLPPFiles
EOUSRLIBLPPFiles
ROOTLIBLPPFiles
Post-installation Script: /export/nim/build/hc_display_init/scripts/hc_display_init.postinstall
Unpost-installation Script: /export/nim/build/hc_display_init/scripts/hc_display_init.postuninstall
EOROOTLIBLPPFiles
Bosboot required: N
License agreement acceptance required: N
Include license files in this package: N
Requisites: /export/nim/build/hc_display_init/hc_display_init.reqs
USRFiles
EOUSRFiles
ROOT Part: Y
ROOTFiles
/opt/hc/lib
/opt/hc/lib/core
/opt/hc/lib/platform/aix/display_init.sh
EOROOTFiles
Relocatable: N
EOFileset

View File

@ -0,0 +1,41 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for hc_display_init LPP package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,41 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-uninstall script for hc_display_init LPP package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-uninstall script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-uninstall script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1 @@
*prereq hc_aix.rte

View File

@ -0,0 +1,27 @@
Package Name: hc_display_terse
Package VRMF: %BUILD_DATE%
Update: N
Fileset
Fileset Name: hc_display_terse.rte
Fileset VRMF: %BUILD_DATE%
Fileset Description: Health Checker - core TERSE plugin
USRLIBLPPFiles
EOUSRLIBLPPFiles
ROOTLIBLPPFiles
Post-installation Script: /export/nim/build/hc_display_terse/scripts/hc_display_terse.postinstall
Unpost-installation Script: /export/nim/build/hc_display_terse/scripts/hc_display_terse.postuninstall
EOROOTLIBLPPFiles
Bosboot required: N
License agreement acceptance required: N
Include license files in this package: N
Requisites: /export/nim/build/hc_display_terse/hc_display_terse.reqs
USRFiles
EOUSRFiles
ROOT Part: Y
ROOTFiles
/opt/hc/lib
/opt/hc/lib/core
/opt/hc/lib/platform/aix/display_terse.sh
EOROOTFiles
Relocatable: N
EOFileset

View File

@ -0,0 +1,41 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-uninstall script for hc_display_terse LPP package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-uninstall script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-uninstall script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,41 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for hc_display_terse LPP package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1 @@
*prereq hc_aix.rte

View File

@ -0,0 +1,31 @@
Package Name: hc_notify_eif
Package VRMF: %BUILD_DATE%
Update: N
Fileset
Fileset Name: hc_notify_eif.rte
Fileset VRMF: %BUILD_DATE%
Fileset Description: Health Checker - core EIF plugin
USRLIBLPPFiles
EOUSRLIBLPPFiles
ROOTLIBLPPFiles
Post-installation Script: /export/nim/build/hc_notify_eif/scripts/hc_notify_eif.postinstall
Unpost-installation Script: /export/nim/build/hc_notify_eif/scripts/hc_notify_eif.postuninstall
EOROOTLIBLPPFiles
Bosboot required: N
License agreement acceptance required: N
Include license files in this package: N
Requisites: /export/nim/build/hc_notify_eif/hc_notify_eif.reqs
USRFiles
EOUSRFiles
ROOT Part: Y
ROOTFiles
/opt/hc/lib
/opt/hc/lib/core
/opt/hc/lib/platform/aix/notify_eif.sh
/etc/opt/hc
/etc/opt/hc/core
/etc/opt/hc/core/providers
/etc/opt/hc/core/providers/notify_eif.conf.dist
EOROOTFiles
Relocatable: N
EOFileset

View File

@ -0,0 +1,51 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for hc_notify_eif LPP package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# copy plugin config file from dist (if needed)
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_eif.conf ]]
then
cp -p ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist ${HC_ETC_DIR}/core/providers/notify_eif.conf >/dev/null || \
{
print -u2 "ERROR: could not copy plugin config file in ${HC_ETC_DIR}/core/providers"
exit 1
}
fi
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,48 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-uninstall script for hc_notify_eif LPP package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-uninstall script ..."
# remove plugin configuration file (.dist only)
if [[ -d ${HC_ETC_DIR}/core/providers ]]
then
rm -f ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist >/dev/null
(( $? == 0 )) || echo "WARN: could not remove plugin config file in directory ${HC_ETC_DIR}/core/providers"
fi
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-uninstall script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1 @@
*prereq hc_aix.rte

View File

@ -0,0 +1,31 @@
Package Name: hc_notify_sms
Package VRMF: %BUILD_DATE%
Update: N
Fileset
Fileset Name: hc_notify_sms.rte
Fileset VRMF: %BUILD_DATE%
Fileset Description: Health Checker - core SMS plugin
USRLIBLPPFiles
EOUSRLIBLPPFiles
ROOTLIBLPPFiles
Post-installation Script: /export/nim/build/hc_notify_sms/scripts/hc_notify_sms.postinstall
Unpost-installation Script: /export/nim/build/hc_notify_sms/scripts/hc_notify_sms.postuninstall
EOROOTLIBLPPFiles
Bosboot required: N
License agreement acceptance required: N
Include license files in this package: N
Requisites: /export/nim/build/hc_notify_sms/hc_notify_sms.reqs
USRFiles
EOUSRFiles
ROOT Part: Y
ROOTFiles
/opt/hc/lib
/opt/hc/lib/core
/opt/hc/lib/platform/aix/notify_sms.sh
/etc/opt/hc
/etc/opt/hc/core
/etc/opt/hc/core/providers
/etc/opt/hc/core/providers/notify_sms.conf.dist
EOROOTFiles
Relocatable: N
EOFileset

View File

@ -0,0 +1,51 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for hc_notify_sms LPP package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# copy plugin config file from dist (if needed)
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_sms.conf ]]
then
cp -p ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist ${HC_ETC_DIR}/core/providers/notify_sms.conf >/dev/null || \
{
print -u2 "ERROR: could not copy plugin config file in ${HC_ETC_DIR}/core/providers"
exit 1
}
fi
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,48 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-uninstall script for hc_notify_sms LPP package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-uninstall script ..."
# remove plugin configuration file (.dist only)
if [[ -d ${HC_ETC_DIR}/core/providers ]]
then
rm -f ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist >/dev/null
(( $? == 0 )) || echo "WARN: could not remove plugin config file in directory ${HC_ETC_DIR}/core/providers"
fi
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-uninstall script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,108 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) build script for HC SD packages (uses 'swpackage')
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
#******************************************************************************
# Requires following build (dir) structures:
#
# build/<build_files>
# build/build_hpux_depots.sh
# sources/bin/<hc_scripts>
# sources/lib/*/<hc_plugins>
# depots/
#
# Build order:
# 1) Copy sources/scrips to the correct locations
# 2) Copy pristine version of the build spec file to preserver %BUILD_DATE% (.psf)
# 3) Copy template, build and installer script files into correct locations
# 4) Execute build_hpux_depots.sh
# 5) SD packages may be found in the 'depots' directory
#******************************************************************************
BUILD_DATE="$(date +'%Y%m%d')"
BUILD_PRETTY_DATE="$(date +'%Y.%m.%d')"
BUILD_DIR="$(dirname $0)"
# clean up previous packages
rm -f ${BUILD_DIR}/depots/* >/dev/null
# see if we have BUILD_DATE placeholder in PSF files
find ${BUILD_DIR} -name "*.psf" | while read FILE
do
if (( $(grep -c '%BUILD_DATE%' ${FILE}) == 0 ))
then
print -u2 "ERROR: no %BUILD_DATE% placeholder in ${FILE}!"
exit 1
fi
done
# replace BUILD_DATE placeholder in PSF files
find ${BUILD_DIR} -name "*.psf" | while read FILE
do
perl -pi -e "s/%BUILD_DATE%/${BUILD_PRETTY_DATE}/g" ${FILE}
done
# build hc_hpux package
cd ${BUILD_DIR}/hc_hpux/
swpackage -s hc_hpux.psf -x media_type=tape -d ../../depots/hc_hpux-${BUILD_DATE}.sd
swpackage -s hc_hpux.psf @ /var/opt/depot/kudos
cd -
# build hc_hpux_platform package
cd ${BUILD_DIR}/hc_hpux_platform
swpackage -s hc_hpux_platform.psf -x media_type=tape -d ../../depots/hc_hpux_platform-${BUILD_DATE}.sd
swpackage -s hc_hpux_platform.psf @ /var/opt/depot/kudos
cd -
# build hc_display_csv package
cd ${BUILD_DIR}/hc_display_csv
swpackage -s hc_display_csv.psf -x media_type=tape -d ../../depots/hc_display_csv-${BUILD_DATE}.sd
swpackage -s hc_display_csv.psf @ /var/opt/depot/kudos
cd -
# build hc_display_init package
cd ${BUILD_DIR}/hc_display_init
swpackage -s hc_display_init.psf -x media_type=tape -d ../../depots/hc_display_init-${BUILD_DATE}.sd
swpackage -s hc_display_init.psf @ /var/opt/depot/kudos
cd -
# build hc_display_terse package
cd ${BUILD_DIR}/hc_display_terse
swpackage -s hc_display_terse.psf -x media_type=tape -d ../../depots/hc_display_terse-${BUILD_DATE}.sd
swpackage -s hc_display_terse.psf @ /var/opt/depot/kudos
cd -
# build hc_notify_sms package
cd ${BUILD_DIR}/hc_notify_sms
swpackage -s hc_notify_sms.psf -x media_type=tape -d ../../depots/hc_notify_sms-${BUILD_DATE}.sd
swpackage -s hc_notify_sms.psf @ /var/opt/depot/kudos
cd -
# build hc_notify_eif package
cd ${BUILD_DIR}/hc_notify_eif
swpackage -s hc_notify_eif.psf -x media_type=tape -d ../../depots/hc_notify_eif-${BUILD_DATE}.sd
swpackage -s hc_notify_eif.psf @ /var/opt/depot/kudos
cd -
print "List of built packages:"
ls -l ${BUILD_DIR}/../depots/*
# when installed on an ignite server: possible addition of depot registration here
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,64 @@
# Depot definition:
depot
layout_version 1.0
# Vendor definition:
vendor
tag KUDOS
title "KUDOS BVBA - http://www.kudos.be"
end
# Bundle definitions:
bundle
tag HC-DISPLAY-CSV
title "The Health Checker (HC) for UNIX (core CSV display plugin)"
os_name HP-UX
revision %BUILD_DATE%
architecture HP-UX_B.11_32/64
machine_type ia64*
vendor_tag KUDOS
contents HC-DISPLAY-CSV-MAIN,r=,a=,v=
end
# Product definitions:
product
tag HC-DISPLAY-CSV-MAIN
revision %BUILD_DATE%
category tools
category_title Tools
title "The Health Checker (HC) for UNIX (OS plugins)"
description "The Health Checker is collection of scripts (plugins)
designed to perform regular - but not intensive - health checks on
UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as
well customer specific checks. Checks may include topics such file
system mounts, process checks, file consistency etc.
This is the core CSV display plugin package"
architecture S700/S800_HP-UX_10/HP-UX_11/IA64_HP-UX_11
machine_type 9000/7*|9000/8*|ia64*
os_name HP-UX
os_release ?.1?.*
os_version [A-Z]
directory /opt/hc
is_locatable false
is_patch false
postinstall scripts/hc_display_csv.postinstall
postremove scripts/hc_display_csv.postremove
# Fileset definitions:
fileset
tag core_plugins
title UX Health Checker (core CSV display plugins)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-HPUX-MAIN
file_permissions -u 0222 -o root -g sys
directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 display_csv.sh
end
end

View File

@ -0,0 +1,41 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for HC-DISPLAY-CSV SD package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,41 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-remove script for HC-DISPLAY-CSV SD package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-remove script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-remove script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,64 @@
# Depot definition:
depot
layout_version 1.0
# Vendor definition:
vendor
tag KUDOS
title "KUDOS BVBA - http://www.kudos.be"
end
# Bundle definitions:
bundle
tag HC-DISPLAY-INIT
title "The Health Checker (HC) for UNIX (core INIT display plugin)"
os_name HP-UX
revision %BUILD_DATE%
architecture HP-UX_B.11_32/64
machine_type ia64*
vendor_tag KUDOS
contents HC-DISPLAY-INIT-MAIN,r=,a=,v=
end
# Product definitions:
product
tag HC-DISPLAY-INIT-MAIN
revision %BUILD_DATE%
category tools
category_title Tools
title "The Health Checker (HC) for UNIX (OS plugins)"
description "The Health Checker is collection of scripts (plugins)
designed to perform regular - but not intensive - health checks on
UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as
well customer specific checks. Checks may include topics such file
system mounts, process checks, file consistency etc.
This is the core INIT display plugin package"
architecture S700/S800_HP-UX_10/HP-UX_11/IA64_HP-UX_11
machine_type 9000/7*|9000/8*|ia64*
os_name HP-UX
os_release ?.1?.*
os_version [A-Z]
directory /opt/hc
is_locatable false
is_patch false
postinstall scripts/hc_display_init.postinstall
postremove scripts/hc_display_init.postremove
# Fileset definitions:
fileset
tag core_plugins
title UX Health Checker (core INIT display plugins)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-HPUX-MAIN
file_permissions -u 0222 -o root -g sys
directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 display_init.sh
end
end

View File

@ -0,0 +1,41 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for HC-DISPLAY-INIT SD package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,41 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-remove script for HC-DISPLAY-INIT SD package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-remove script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-remove script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,64 @@
# Depot definition:
depot
layout_version 1.0
# Vendor definition:
vendor
tag KUDOS
title "KUDOS BVBA - http://www.kudos.be"
end
# Bundle definitions:
bundle
tag HC-DISPLAY-TERSE
title "The Health Checker (HC) for UNIX (core TERSE display plugin)"
os_name HP-UX
revision %BUILD_DATE%
architecture HP-UX_B.11_32/64
machine_type ia64*
vendor_tag KUDOS
contents HC-DISPLAY-TERSE-MAIN,r=,a=,v=
end
# Product definitions:
product
tag HC-DISPLAY-TERSE-MAIN
revision %BUILD_DATE%
category tools
category_title Tools
title "The Health Checker (HC) for UNIX (OS plugins)"
description "The Health Checker is collection of scripts (plugins)
designed to perform regular - but not intensive - health checks on
UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as
well customer specific checks. Checks may include topics such file
system mounts, process checks, file consistency etc.
This is the core TERSE display plugin package"
architecture S700/S800_HP-UX_10/HP-UX_11/IA64_HP-UX_11
machine_type 9000/7*|9000/8*|ia64*
os_name HP-UX
os_release ?.1?.*
os_version [A-Z]
directory /opt/hc
is_locatable false
is_patch false
postinstall scripts/hc_display_terse.postinstall
postremove scripts/hc_display_terse.postremove
# Fileset definitions:
fileset
tag core_plugins
title UX Health Checker (core TERSE display plugins)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-HPUX-MAIN
file_permissions -u 0222 -o root -g sys
directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 display_terse.sh
end
end

View File

@ -0,0 +1,41 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for HC-DISPLAY-TERSE SD package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,41 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-remove script for HC-DISPLAY-TERSE SD package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-remove script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-remove script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,118 @@
# Depot definition:
depot
layout_version 1.0
# Vendor definition:
vendor
tag KUDOS
title "KUDOS BVBA - http://www.kudos.be"
end
# Bundle definitions:
bundle
tag HC-HPUX
title "The Health Checker (HC) for UNIX"
os_name HP-UX
revision %BUILD_DATE%
architecture HP-UX_B.11_32/64
machine_type ia64*
vendor_tag KUDOS
contents HC-HPUX-MAIN,r=,a=,v=
end
# Product definitions:
product
tag HC-HPUX-MAIN
revision %BUILD_DATE%
category tools
category_title Tools
title "The Health Checker (HC) for UNIX"
description "The Health Checker is collection of scripts (plugins)
designed to perform regular - but not intensive - health checks on
UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as
well customer specific checks. Checks may include topics such file
system mounts, process checks, file consistency etc."
architecture S700/S800_HP-UX_10/HP-UX_11/IA64_HP-UX_11
machine_type 9000/7*|9000/8*|ia64*
os_name HP-UX
os_release ?.1?.*
os_version [A-Z]
directory /opt/hc
is_locatable false
is_patch false
postinstall scripts/hc_hpux.postinstall
postremove scripts/hc_hpux.postremove
# Fileset definitions:
fileset
tag scripts
title UX Health Checker (scripts)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
file_permissions -u 0222 -o root -g sys
directory ../../sources/bin=/opt/hc/bin
file -m 755 check_health.sh
directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 include_core.sh
file -m 755 include_data.sh
file -m 755 include_os.sh
end
fileset
tag core_plugins
title UX Health Checker (core plugins)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
file_permissions -u 0222 -o root -g sys
directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 notify_mail.sh
end
fileset
tag config
title UX Health Checker (configuration)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-HPUX-MAIN.scripts
file_permissions -u 0222 -o root -g sys
directory ../../sources/etc/core=/etc/opt/hc/core
file -m 644 check_health.conf.dist
directory ../../sources/etc=/etc/opt/hc
file -m 644 check_host.conf.dist
end
fileset
tag templates
title UX Health Checker (templates)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-HPUX-MAIN.scripts
file_permissions -u 0222 -o root -g sys
directory ../../sources/etc/core/templates=/etc/opt/hc/core/templates
file -m 644 mail_info.tpl
file -m 644 mail_header.tpl
file -m 644 mail_body.tpl
file -m 644 mail_footer.tpl
end
end

View File

@ -0,0 +1,96 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for HC-HPUX SD package
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of VAR dir
HC_VAR_DIR="/var/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# create ETC DIR
if [[ ! -d ${HC_ETC_DIR} ]]
then
mkdir -p ${HC_ETC_DIR} >/dev/null || \
{
print -u2 "ERROR: could not create directory ${HC_ETC_DIR}"
exit 1
}
chmod 755 ${HC_ETC_DIR} >/dev/null || \
print -u2 "WARN: could not 'chmod 755' on directory ${HC_ETC_DIR}"
fi
if [[ ! -d ${HC_ETC_DIR}/core ]]
then
mkdir -p ${HC_ETC_DIR}/core >/dev/null || \
{
print -u2 "ERROR: could not create directory ${HC_ETC_DIR}/core"
exit 1
}
chmod 755 ${HC_ETC_DIR} >/dev/null || \
print -u2 "WARN: could not 'chmod 755' on directory ${HC_ETC_DIR}/core"
fi
# copy main config file from dist (if needed)
if [[ ! -f ${HC_ETC_DIR}/core/check_health.conf ]]
then
cp -p ${HC_ETC_DIR}/core/check_health.conf.dist ${HC_ETC_DIR}/core/check_health.conf >/dev/null || \
{
print -u2 "ERROR: could not copy main config file in ${HC_ETC_DIR}/core"
exit 1
}
fi
# copy host check config file from dist (if needed)
if [[ ! -f ${HC_ETC_DIR}/check_host.conf ]]
then
cp -p ${HC_ETC_DIR}/check_host.conf.dist ${HC_ETC_DIR}/check_host.conf >/dev/null || \
{
print -u2 "ERROR: could not copy host check config file in ${HC_ETC_DIR}"
exit 1
}
fi
# create VAR DIR
if [[ ! -d ${HC_VAR_DIR} ]]
then
mkdir -p ${HC_VAR_DIR} >/dev/null || \
{
print -u2 "ERROR: could not create directory ${HC_VAR_DIR}"
exit 1
}
chmod 755 ${HC_VAR_DIR} >/dev/null || \
print -u2 "WARN: could not 'chmod 755' on directory ${HC_VAR_DIR}"
fi
# refresh symbolic FPATH links for core plugins
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,65 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-remove script for HC-HPUX SD package
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of VAR dir
HC_VAR_DIR="/var/opt/hc"
# location of MAIN dir
HC_MAIN_DIR="/opt/hc"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-remove script ..."
# remove ETC DIR (only .dist files)
if [[ -d ${HC_ETC_DIR} ]]
then
rm -rf ${HC_ETC_DIR}/*.dist >/dev/null || \
print -u2 "WARN: could not remove .dist files in directory ${HC_ETC_DIR}"
fi
if [[ -d ${HC_ETC_DIR}/core ]]
then
rm -rf ${HC_ETC_DIR}/core/*.dist >/dev/null || \
print -u2 "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core"
fi
if [[ -d ${HC_ETC_DIR}/core/providers ]]
then
rm -rf ${HC_ETC_DIR}/core/providers/*.dist >/dev/null || \
print -u2 "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core/providers"
fi
# remove VAR DIR (temporary state only)
if [[ -d ${HC_VAR_DIR} ]]
then
rm -rf ${HC_VAR_DIR}/state/temporary >/dev/null || \
print -u2 "WARN: could not remove directory ${HC_VAR_DIR}/state/temporary"
fi
# remove MAIN DIR
if [[ -d ${HC_MAIN_DIR} ]]
then
rm -rf ${HC_MAIN_DIR} >/dev/null || \
print -u2 "WARN: could not remove directory ${HC_VAR_DIR}"
fi
print "INFO: finished post-remove script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,136 @@
# Depot definition:
depot
layout_version 1.0
# Vendor definition:
vendor
tag KUDOS
title "KUDOS BVBA - http://www.kudos.be"
end
# Bundle definitions:
bundle
tag HC-PLATFORM
title "The Health Checker (HC) for UNIX (OS plugins)"
os_name HP-UX
revision %BUILD_DATE%
architecture HP-UX_B.11_32/64
machine_type ia64*
vendor_tag KUDOS
contents HC-PLATFORM-MAIN,r=,a=,v=
end
# Product definitions:
product
tag HC-PLATFORM-MAIN
revision %BUILD_DATE%
category tools
category_title Tools
title "The Health Checker (HC) for UNIX (OS plugins)"
description "The Health Checker is collection of scripts (plugins)
designed to perform regular - but not intensive - health checks on
UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as
well customer specific checks. Checks may include topics such file
system mounts, process checks, file consistency etc.
This is the OS/platform plugin package"
architecture S700/S800_HP-UX_10/HP-UX_11/IA64_HP-UX_11
machine_type 9000/7*|9000/8*|ia64*
os_name HP-UX
os_release ?.1?.*
os_version [A-Z]
directory /opt/hc
is_locatable false
is_patch false
postinstall scripts/hc_hpux_platform.postinstall
postremove scripts/hc_hpux_platform.postremove
# Fileset definitions:
fileset
tag plugins
title UX Health Checker (OS/Platform plugins)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-HPUX-MAIN
file_permissions -u 0222 -o root -g sys
directory ../../sources/lib/platform/hp-ux=/opt/hc/lib/platform/hp-ux
file -m 755 check_hpux_autopath.sh
file -m 755 check_hpux_file_age.sh
file -m 755 check_hpux_file_change.sh
file -m 755 check_hpux_fs_mounts.sh
file -m 755 check_hpux_fs_mounts_options.sh
file -m 755 check_hpux_ignite_backup.sh
file -m 755 check_hpux_ioscan.sh
file -m 755 check_hpux_guid_status.sh
file -m 644 check_hpux_hpvm_vpar_status.sh
file -m 755 check_hpux_httpd_status.sh
file -m 755 check_hpux_named_status.sh
file -m 755 check_hpux_ntp_status.sh
file -m 755 check_hpux_ovpa_status.sh
file -m 755 check_hpux_postfix_status.sh
file -m 755 check_hpux_root_crontab.sh
file -m 755 check_hpux_sg_package_status.sh
file -m 755 check_hpux_sg_package_config.sh
file -m 755 check_hpux_sg_cluster_status.sh
file -m 755 check_hpux_sg_cluster_config.sh
file -m 755 check_hpux_sg_qs_status.sh
file -m 755 check_hpux_sshd_status.sh
file -m 755 check_hpux_syslog.sh
file -m 755 check_hpux_vg_minor_number.sh
end
fileset
tag config
title UX Health Checker (OS/Platform plugins: configuration)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-PLATFORM-MAIN.plugins
file_permissions -u 0222 -o root -g sys
directory ../../sources/etc/=/etc/opt/hc
file -m 644 check_hpux_file_age.conf.dist
file -m 644 check_hpux_file_change.conf.dist
file -m 644 check_hpux_fs_mounts_options.conf.dist
file -m 644 check_hpux_hpvm_vpar_status.conf.dist
file -m 644 check_hpux_ignite_backup.conf.dist
file -m 644 check_hpux_ioscan.conf.dist
file -m 644 check_hpux_ntp_status.conf.dist
file -m 644 check_hpux_root_crontab.conf.dist
file -m 644 check_hpux_sg_package_status.conf.dist
file -m 644 check_hpux_sg_package_config.conf.dist
file -m 644 check_hpux_sg_cluster_status.conf.dist
file -m 644 check_hpux_sg_cluster_config.conf.dist
file -m 644 check_hpux_syslog.conf.dist
end
fileset
tag templates
title UX Health Checker (OS/Platform plugins: templates)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-PLATFORM-MAIN.plugins
file_permissions -u 0222 -o root -g sys
directory ../../sources/etc/core/templates=/etc/opt/hc/core/templates
file -m 644 mail_body.tpl-check_hpux_fs_mounts_options
file -m 644 mail_body.tpl-check_hpux_ioscan
file -m 644 mail_body.tpl-check_hpux_ovpa_status
file -m 644 mail_body.tpl-check_hpux_root_crontab
file -m 644 mail_body.tpl-check_hpux_sg_cluster_status
file -m 644 mail_body.tpl-check_hpux_sg_package_status
file -m 644 mail_body.tpl-check_hpux_vg_minor_number
end
end

View File

@ -0,0 +1,39 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for HC-PLATFORM SD package
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,39 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-remove script for HC-PLATFORM SD package
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-remove script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-remove script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,80 @@
# Depot definition:
depot
layout_version 1.0
# Vendor definition:
vendor
tag KUDOS
title "KUDOS BVBA - http://www.kudos.be"
end
# Bundle definitions:
bundle
tag HC-NOTIFY-EIF
title "The Health Checker (HC) for UNIX (core EIF plugin)"
os_name HP-UX
revision %BUILD_DATE%
architecture HP-UX_B.11_32/64
machine_type ia64*
vendor_tag KUDOS
contents HC-NOTIFY-EIF-MAIN,r=,a=,v=
end
# Product definitions:
product
tag HC-NOTIFY-EIF-MAIN
revision %BUILD_DATE%
category tools
category_title Tools
title "The Health Checker (HC) for UNIX (OS plugins)"
description "The Health Checker is collection of scripts (plugins)
designed to perform regular - but not intensive - health checks on
UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as
well customer specific checks. Checks may include topics such file
system mounts, process checks, file consistency etc.
This is the core EIF plugin package"
architecture S700/S800_HP-UX_10/HP-UX_11/IA64_HP-UX_11
machine_type 9000/7*|9000/8*|ia64*
os_name HP-UX
os_release ?.1?.*
os_version [A-Z]
directory /opt/hc
is_locatable false
is_patch false
postinstall scripts/hc_notify_eif.postinstall
postremove scripts/hc_notify_eif.postremove
# Fileset definitions:
fileset
tag core_plugins
title UX Health Checker (core EIF plugins)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-HPUX-MAIN
file_permissions -u 0222 -o root -g sys
directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 notify_eif.sh
end
fileset
tag config
title UX Health Checker (core EIF plugins: configuration)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-NOTIFY-EIF-MAIN.core_plugins
file_permissions -u 0222 -o root -g sys
directory ../../sources/etc/core/providers=/etc/opt/hc/core/providers
file -m 644 notify_eif.conf.dist
end
end

View File

@ -0,0 +1,51 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for HC-NOTIFY-EIF SD package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# copy plugin config file from dist (if needed)
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_eif.conf ]]
then
cp -p ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist ${HC_ETC_DIR}/core/providers/notify_eif.conf >/dev/null || \
{
print -u2 "ERROR: could not copy plugin config file in ${HC_ETC_DIR}/core/providers"
exit 1
}
fi
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,48 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-remove script for HC-NOTIFY-EIF SD package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-remove script ..."
# remove plugin configuration file (.dist only)
if [[ -d ${HC_ETC_DIR}/core/providers ]]
then
rm -f ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist >/dev/null
(( $? == 0 )) || echo "WARN: could not remove plugin config file in directory ${HC_ETC_DIR}/core/providers"
fi
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-remove script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,80 @@
# Depot definition:
depot
layout_version 1.0
# Vendor definition:
vendor
tag KUDOS
title "KUDOS BVBA - http://www.kudos.be"
end
# Bundle definitions:
bundle
tag HC-NOTIFY-SMS
title "The Health Checker (HC) for UNIX (core SMS plugin)"
os_name HP-UX
revision %BUILD_DATE%
architecture HP-UX_B.11_32/64
machine_type ia64*
vendor_tag KUDOS
contents HC-NOTIFY-SMS-MAIN,r=,a=,v=
end
# Product definitions:
product
tag HC-NOTIFY-SMS-MAIN
revision %BUILD_DATE%
category tools
category_title Tools
title "The Health Checker (HC) for UNIX (OS plugins)"
description "The Health Checker is collection of scripts (plugins)
designed to perform regular - but not intensive - health checks on
UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as
well customer specific checks. Checks may include topics such file
system mounts, process checks, file consistency etc.
This is the core SMS plugin package"
architecture S700/S800_HP-UX_10/HP-UX_11/IA64_HP-UX_11
machine_type 9000/7*|9000/8*|ia64*
os_name HP-UX
os_release ?.1?.*
os_version [A-Z]
directory /opt/hc
is_locatable false
is_patch false
postinstall scripts/hc_notify_sms.postinstall
postremove scripts/hc_notify_sms.postremove
# Fileset definitions:
fileset
tag core_plugins
title UX Health Checker (core SMS plugins)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-HPUX-MAIN
file_permissions -u 0222 -o root -g sys
directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 notify_sms.sh
end
fileset
tag config
title UX Health Checker (core SMS plugins: configuration)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-NOTIFY-SMS-MAIN.core_plugins
file_permissions -u 0222 -o root -g sys
directory ../../sources/etc/core/providers=/etc/opt/hc/core/providers
file -m 644 notify_sms.conf.dist
end
end

View File

@ -0,0 +1,51 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for HC-NOTIFY-SMS SD package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of ETC dir
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-install script ..."
# copy plugin config file from dist (if needed)
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_sms.conf ]]
then
cp -p ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist ${HC_ETC_DIR}/core/providers/notify_sms.conf >/dev/null || \
{
print -u2 "ERROR: could not copy plugin config file in ${HC_ETC_DIR}/core/providers"
exit 1
}
fi
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-install script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,48 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-remove script for HC-NOTIFY-SMS SD package
#******************************************************************************
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
print "INFO: starting post-remove script ..."
# remove plugin configuration file (.dist only)
if [[ -d ${HC_ETC_DIR}/core/providers ]]
then
rm -f ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist >/dev/null
(( $? == 0 )) || echo "WARN: could not remove plugin config file in directory ${HC_ETC_DIR}/core/providers"
fi
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
else
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
print "INFO: finished post-remove script"
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,69 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-display-csv
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (CSV display core plugin)
Group: Tools/Monitoring
License: GNU General Public License either version 2 of the License, or (at your option) any later version
URL: http://www.kudos.be
Requires: ksh,hc-linux
BuildArch: noarch
BuildRoot: %{_topdir}/%{name}-%{version}-root
%description
The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc.
This package contains core plugins (display).
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/lib/core/display_csv.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_csv.sh
%post
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-install script"
%postun
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-uninstall script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-uninstall script"
%files
%defattr(-,root,root,755)
%dir /opt/hc/lib
%dir /opt/hc/lib/core
%attr(755, root, root) /opt/hc/lib/core/display_csv.sh
%changelog
* Sat May 06 2017 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -0,0 +1,69 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-display-init
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (init display core plugin)
Group: Tools/Monitoring
License: GNU General Public License either version 2 of the License, or (at your option) any later version
URL: http://www.kudos.be
Requires: ksh,hc-linux
BuildArch: noarch
BuildRoot: %{_topdir}/%{name}-%{version}-root
%description
The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc.
This package contains core plugins (display).
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/lib/core/display_init.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_init.sh
%post
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-install script"
%postun
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-uninstall script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-uninstall script"
%files
%defattr(-,root,root,755)
%dir /opt/hc/lib
%dir /opt/hc/lib/core
%attr(755, root, root) /opt/hc/lib/core/display_init.sh
%changelog
* Mon May 08 2017 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -0,0 +1,69 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-display-terse
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (terse display core plugin)
Group: Tools/Monitoring
License: GNU General Public License either version 2 of the License, or (at your option) any later version
URL: http://www.kudos.be
Requires: ksh,hc-linux
BuildArch: noarch
BuildRoot: %{_topdir}/%{name}-%{version}-root
%description
The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc.
This package contains core plugins (display).
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/lib/core/display_terse.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_terse.sh
%post
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-install script"
%postun
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-uninstall script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-uninstall script"
%files
%defattr(-,root,root,755)
%dir /opt/hc/lib
%dir /opt/hc/lib/core
%attr(755, root, root) /opt/hc/lib/core/display_terse.sh
%changelog
* Sat May 06 2017 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -0,0 +1,76 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-kudos
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (KUDOS plugins)
Group: Tools/Monitoring
License: GNU General Public License either version 2 of the License, or (at your option) any later version
URL: http://www.kudos.be
Requires: ksh,hc-linux
BuildArch: noarch
BuildRoot: %{_topdir}/%{name}-%{version}-root
%description
The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc.
This package contains the KUDOS specific plugins.
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/customer
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/customer/kudos
cp ../SOURCES/lib/customer/kudos/check_kudos_kapow_credits.sh $RPM_BUILD_ROOT/opt/hc/lib/customer/kudos/check_kudos_kapow_credits.sh
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
cp ../SOURCES/etc/check_kudos_kapow_credits.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_kudos_kapow_credits.conf.dist
%post
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-install script"
%postun
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-install script"
%files
%defattr(-,root,root,755)
%dir /opt/hc/lib
%dir /opt/hc/lib/customer
%dir /opt/hc/lib/customer/kudos
%attr(755, root, root) /opt/hc/lib/customer/kudos/check_kudos_kapow_credits.sh
%dir /etc/opt/hc
%attr(644, root, root) /etc/opt/hc/check_kudos_kapow_credits.conf.dist
%changelog
* Fri Nov 11 2016 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -0,0 +1,169 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-linux-platform
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (platform plugins)
Group: Tools/Monitoring
License: GNU General Public License either version 2 of the License, or (at your option) any later version
URL: http://www.kudos.be
Requires: ksh,hc-linux
BuildArch: noarch
BuildRoot: %{_topdir}/%{name}-%{version}-root
%description
The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc.
This package contains platform/OS specific plugins.
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform/linux
cp ../SOURCES/lib/platform/linux/check_linux_burp_backup.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_burp_backup.sh
cp ../SOURCES/lib/platform/linux/check_linux_file_age.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_file_age.sh
cp ../SOURCES/lib/platform/linux/check_linux_file_change.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_file_change.sh
cp ../SOURCES/lib/platform/linux/check_linux_fs_mounts.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_fs_mounts.sh
cp ../SOURCES/lib/platform/linux/check_linux_burp_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_burp_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_httpd_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_httpd_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_named_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_named_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_postfix_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_postfix_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_samba_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_samba_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_shorewall_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_shorewall_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_sshd_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_sshd_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_winbind_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_winbind_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_hpasmcli.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_hpasmcli.sh
cp ../SOURCES/lib/platform/linux/check_linux_hpacucli.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_hpacucli.sh
cp ../SOURCES/lib/platform/linux/check_linux_hplog.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_hplog.sh
cp ../SOURCES/lib/platform/linux/check_linux_hpssacli.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_hpssacli.sh
cp ../SOURCES/lib/platform/linux/check_linux_root_crontab.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_root_crontab.sh
cp ../SOURCES/lib/platform/linux/check_linux_sg_cluster_config.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_sg_cluster_config.sh
cp ../SOURCES/lib/platform/linux/check_linux_sg_cluster_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_sg_cluster_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_sg_package_config.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_sg_package_config.sh
cp ../SOURCES/lib/platform/linux/check_linux_sg_package_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_sg_package_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_sg_qs_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_sg_qs_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_vz_ct_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_vz_ct_status.sh
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
cp ../SOURCES/etc/check_linux_burp_backup.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_burp_backup.conf.dist
cp ../SOURCES/etc/check_linux_file_age.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_file_age.conf.dist
cp ../SOURCES/etc/check_linux_file_change.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_file_change.conf.dist
cp ../SOURCES/etc/check_linux_hpasmcli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpasmcli.conf.dist
cp ../SOURCES/etc/check_linux_hpacucli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpacucli.conf.dist
cp ../SOURCES/etc/check_linux_hplog.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hplog.conf.dist
cp ../SOURCES/etc/check_linux_hpssacli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpssacli.conf.dist
cp ../SOURCES/etc/check_linux_root_crontab.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_root_crontab.conf.dist
cp ../SOURCES/etc/check_linux_sg_cluster_config.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_sg_cluster_config.conf.dist
cp ../SOURCES/etc/check_linux_sg_cluster_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_sg_cluster_status.conf.dist
cp ../SOURCES/etc/check_linux_sg_package_config.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_sg_package_config.conf.dist
cp ../SOURCES/etc/check_linux_sg_package_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_sg_package_status.conf.dist
cp ../SOURCES/etc/check_linux_vz_ct_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_vz_ct_status.conf.dist
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/templates
cp ../SOURCES/etc/core/templates/mail_body.tpl-check_linux_fs_mounts_options $RPM_BUILD_ROOT/etc/opt/hc/core/templates
cp ../SOURCES/etc/core/templates/mail_body.tpl-check_linux_root_crontab $RPM_BUILD_ROOT/etc/opt/hc/core/templates
%post
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-install script"
%postun
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-uninstall script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-uninstall script"
%files
%defattr(-,root,root,755)
%dir /opt/hc/lib
%dir /opt/hc/lib/platform
%dir /opt/hc/lib/platform/linux
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_burp_backup.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_file_age.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_file_change.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_fs_mounts.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_burp_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_httpd_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_named_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_postfix_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_samba_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_shorewall_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_sshd_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_winbind_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_hpasmcli.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_hpacucli.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_hplog.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_hpssacli.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_root_crontab.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_sg_cluster_config.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_sg_cluster_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_sg_package_config.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_sg_package_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_sg_qs_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_vz_ct_status.sh
%dir /etc/opt/hc
%attr(644, root, root) /etc/opt/hc/check_linux_burp_backup.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_file_age.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_file_change.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_hpasmcli.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_hpacucli.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_hplog.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_hpssacli.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_root_crontab.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_sg_cluster_config.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_sg_cluster_status.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_sg_package_config.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_sg_package_status.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_vz_ct_status.conf.dist
%dir /etc/opt/hc/core
%dir /etc/opt/hc/core/templates
%attr(644, root, root) /etc/opt/hc/core/templates/mail_body.tpl-check_linux_fs_mounts_options
%attr(644, root, root) /etc/opt/hc/core/templates/mail_body.tpl-check_linux_root_crontab
%changelog
* Thu May 18 2017 <patrick@kudos.be> - 0.0.9
- Added check_linux_file_change
* Thu May 04 2017 <patrick@kudos.be> - 0.0.9
- Added check_linux_sg_qs_status
* Sun Apr 30 2017 <patrick@kudos.be> - 0.0.8
- Updated location of templates (../core)
* Sun Apr 23 2017 <patrick@kudos.be> - 0.0.7
- Added httpd check script
* Sat Apr 22 2017 <patrick@kudos.be> - 0.0.6
- Added hplog script
* Thu Apr 06 2017 <patrick@kudos.be> - 0.0.5
- Added hpasmcli + serviceguard scripts
* Sat Apr 01 2017 <patrick@kudos.be> - 0.0.4
- Added openvz container check
* Thu Dec 01 2016 <patrick@kudos.be> - 0.0.3
- Added burp,named,postfix,sshd,shorewall check
* Sat Nov 05 2016 <patrick@kudos.be> - 0.0.2
- Added mail templates
* Fri Jan 01 2016 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -0,0 +1,72 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-linux-security
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (security plugins)
Group: Tools/Monitoring
License: GNU General Public License either version 2 of the License, or (at your option) any later version
URL: http://www.kudos.be
Requires: ksh,hc-linux
BuildArch: noarch
BuildRoot: %{_topdir}/%{name}-%{version}-root
%description
The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc.
This package contains security specific plugins.
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/security
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/security
cp ../SOURCES/lib/security/check_all_ssh_controls.sh $RPM_BUILD_ROOT/opt/hc/lib/security/check_all_ssh_controls.sh
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/templates
%post
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-install script"
%postun
# ------------------------- CONFIGURATION starts here -------------------------
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-install script ..."
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-install script"
%files
%defattr(-,root,root,755)
%dir /opt/hc/lib
%dir /opt/hc/lib/security
%attr(755, root, root) /opt/hc/lib/security/check_all_ssh_controls.sh
%changelog
* Fri Jan 01 2016 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -0,0 +1,172 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-linux
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX
Group: Tools/MonitoringGroup: Tools/Monitoring
License: GNU General Public License either version 2 of the License, or (at your option) any later version
URL: http://www.kudos.be
Requires: ksh
BuildArch: noarch
BuildRoot: %{_topdir}/%{name}-%{version}-root
%description
The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc.
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/opt/hc
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/bin
cp ../SOURCES/bin/check_health.sh $RPM_BUILD_ROOT/opt/hc/bin
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/lib/core/include_core.sh $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/lib/core/include_data.sh $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/lib/core/include_os.sh $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/lib/core/notify_mail.sh $RPM_BUILD_ROOT/opt/hc/lib/core
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
cp ../SOURCES/etc/check_host.conf.dist $RPM_BUILD_ROOT/etc/opt/hc
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core
cp ../SOURCES/etc/core/check_health.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/core
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/providers
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/templates
cp ../SOURCES/etc/core/templates/mail_info.tpl $RPM_BUILD_ROOT/etc/opt/hc/core/templates
cp ../SOURCES/etc/core/templates/mail_header.tpl $RPM_BUILD_ROOT/etc/opt/hc/core/templates
cp ../SOURCES/etc/core/templates/mail_body.tpl $RPM_BUILD_ROOT/etc/opt/hc/core/templates
cp ../SOURCES/etc/core/templates/mail_footer.tpl $RPM_BUILD_ROOT/etc/opt/hc/core/templates
install -d -m 755 $RPM_BUILD_ROOT/var/opt/hc
%post
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC scripts
HC_DIR="/opt/hc"
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of the HC log/state files
HC_VAR_DIR="/var/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-install script ..."
# copy configuration files
if [[ ! -f ${HC_ETC_DIR}/core/check_health.conf ]]
then
# copy main configuration file
cp -p ${HC_ETC_DIR}/core/check_health.conf.dist ${HC_ETC_DIR}/core/check_health.conf >/dev/null
(( $? == 0 )) || \
{
echo "ERROR: could not copy main config file in ${HC_ETC_DIR}/core"
exit 1
}
fi
if [[ ! -f ${HC_ETC_DIR}/check_host.conf ]]
then
# copy host check configuration file
cp -p ${HC_ETC_DIR}/check_host.conf.dist ${HC_ETC_DIR}/check_host.conf >/dev/null
(( $? == 0 )) || \
{
echo "ERROR: could not copy host check config file in ${HC_ETC_DIR}"
exit 1
}
fi
# refresh symbolic FPATH links for core includes & plugins
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks || echo "WARN: updating symlinks failed"
else
echo "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi
echo "INFO: finished post-install script"
%postun
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC scripts
HC_DIR="/opt/hc"
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of the HC log/state files
HC_VAR_DIR="/var/opt/hc"
# ------------------------- CONFIGURATION ends here ---------------------------
# update or uninstall?
if (( $1 == 0 ))
then
echo "INFO: starting post-uninstall script ..."
if [[ -d ${HC_DIR} ]]
then
rm -rf ${HC_DIR} 2>/dev/null
(( $? == 0 )) || echo "WARN: failed to remove ${HC_DIR}"
fi
if [[ -d ${HC_ETC_DIR} ]]
then
rm -rf ${HC_ETC_DIR}/*.dist >/dev/null
(( $? == 0 )) || echo "WARN: could not remove .dist files in directory ${HC_ETC_DIR}"
fi
if [[ -d ${HC_ETC_DIR}/core ]]
then
rm -rf ${HC_ETC_DIR}/core/*.dist >/dev/null
(( $? == 0 )) || echo "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core"
fi
if [[ -d ${HC_ETC_DIR}/core/providers ]]
then
rm -rf ${HC_ETC_DIR}/core/providers/*.dist >/dev/null
(( $? == 0 )) || echo "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core/providers"
fi
if [[ -d ${HC_VAR_DIR} ]]
then
rm -rf ${HC_VAR_DIR}/state/temporary 2>/dev/null
(( $? == 0 )) || echo "WARN: failed to remove ${HC_VAR_DIR}/state/temporary"
fi
echo "INFO: finished post-uninstall script"
else
echo "INFO: skipping post-uninstall script (RPM upgrade)"
fi
%files
%defattr(-,root,root,755)
%dir /opt/hc
%dir /opt/hc/bin
%attr(755, root, root) /opt/hc/bin/check_health.sh
%dir /opt/hc/lib
%dir /opt/hc/lib/core
%attr(755, root, root) /opt/hc/lib/core/include_core.sh
%attr(755, root, root) /opt/hc/lib/core/include_data.sh
%attr(755, root, root) /opt/hc/lib/core/include_os.sh
%attr(755, root, root) /opt/hc/lib/core/notify_mail.sh
%dir /etc/opt/hc
%attr(644, root, root) /etc/opt/hc/check_host.conf.dist
%dir /etc/opt/hc/core
%attr(644, root, root) /etc/opt/hc/core/check_health.conf.dist
%dir /etc/opt/hc/core/providers
%dir /etc/opt/hc/core/templates
%attr(644, root, root) /etc/opt/hc/core/templates/mail_info.tpl
%attr(644, root, root) /etc/opt/hc/core/templates/mail_header.tpl
%attr(644, root, root) /etc/opt/hc/core/templates/mail_body.tpl
%attr(644, root, root) /etc/opt/hc/core/templates/mail_footer.tpl
%dir /var/opt/hc
%changelog
* Tue Jun 20 2017 <patrick@kudos.be> - 0.0.8
- Made %postun RPM update aware
* Mon May 08 2017 <patrick@kudos.be> - 0.0.7
- Added check_host_conf.dist
* Sat May 06 2017 <patrick@kudos.be> - 0.0.6
- Added include_core.sh
* Sun Apr 30 2017 <patrick@kudos.be> - 0.0.5
- Added core plugins (mail) and new location of check_health.conf.dist
* Sat Apr 08 2017 <patrick@kudos.be> - 0.0.4
- Changed check_health.conf to check_health.conf.dist and added %post
* Fri Nov 11 2016 <patrick@kudos.be> - 0.0.3
- Added SMS directory
* Sat Nov 05 2016 <patrick@kudos.be> - 0.0.2
- Added mail templates
* Fri Jan 01 2016 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -0,0 +1,109 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-notify-eif
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (EIF notify core plugin)
Group: Tools/Monitoring
License: GNU General Public License either version 2 of the License, or (at your option) any later version
URL: http://www.kudos.be
Requires: ksh,hc-linux
BuildArch: noarch
BuildRoot: %{_topdir}/%{name}-%{version}-root
%description
The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc.
This package contains core plugins (notify).
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/lib/core/notify_eif.sh $RPM_BUILD_ROOT/opt/hc/lib/core/notify_eif.sh
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/providers
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/providers
cp ../SOURCES/etc/core/providers/notify_eif.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/core/providers/notify_eif.conf.dist
%post
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-install script ..."
# copy plugin configuration file
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_eif.conf ]]
then
cp -p ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist ${HC_ETC_DIR}/core/providers/notify_eif.conf >/dev/null
(( $? == 0 )) || \
{
echo "ERROR: could not copy plugin config file in ${HC_ETC_DIR}/core/providers"
exit 1
}
fi
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-install script"
%postun
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
# update or uninstall?
if (( $1 == 0 ))
then
echo "INFO: starting post-uninstall script ..."
# copy plugin configuration file (.dist only)
if [[ -d ${HC_ETC_DIR}/core/providers ]]
then
rm -f ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist 2>/dev/null
(( $? == 0 )) || \
{
echo "ERROR: could not remove plugin config file in ${HC_ETC_DIR}/core/providers"
exit 1
}
fi
else
echo "INFO: starting post-uninstall script (RPM upgrade)"
fi
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-uninstall script"
%files
%defattr(-,root,root,755)
%dir /opt/hc/lib
%dir /opt/hc/lib/core
%attr(755, root, root) /opt/hc/lib/core/notify_eif.sh
%dir /etc/opt/hc
%dir /etc/opt/hc/core
%dir /etc/opt/hc/core/providers
%attr(644, root, root) /etc/opt/hc/core/providers/notify_eif.conf.dist
%changelog
* Tue Jun 20 2017 <patrick@kudos.be> - 0.0.2
- Made %postun RPM update aware
* Sun Apr 30 2017 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -0,0 +1,109 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-notify-sms
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (SMS notify core plugin)
Group: Tools/Monitoring
License: GNU General Public License either version 2 of the License, or (at your option) any later version
URL: http://www.kudos.be
Requires: ksh,hc-linux
BuildArch: noarch
BuildRoot: %{_topdir}/%{name}-%{version}-root
%description
The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc.
This package contains core plugins (notify).
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/lib/core/notify_sms.sh $RPM_BUILD_ROOT/opt/hc/lib/core/notify_sms.sh
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/providers
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/providers
cp ../SOURCES/etc/core/providers/notify_sms.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/core/providers/notify_sms.conf.dist
%post
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-install script ..."
# copy plugin configuration file
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_sms.conf ]]
then
cp -p ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist ${HC_ETC_DIR}/core/providers/notify_sms.conf >/dev/null
(( $? == 0 )) || \
{
echo "ERROR: could not copy plugin config file in ${HC_ETC_DIR}/core/providers"
exit 1
}
fi
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-install script"
%postun
# ------------------------- CONFIGURATION starts here -------------------------
# location of the HC configuration files
HC_ETC_DIR="/etc/opt/hc"
# location of check_health.sh
HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here ---------------------------
# update or uninstall?
if (( $1 == 0 ))
then
echo "INFO: starting post-uninstall script ..."
# copy plugin configuration file (.dist only)
if [[ -d ${HC_ETC_DIR}/core/providers ]]
then
rm -f ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist 2>/dev/null
(( $? == 0 )) || \
{
echo "ERROR: could not remove plugin config file in ${HC_ETC_DIR}/core/providers"
exit 1
}
fi
else
echo "INFO: starting post-uninstall script (RPM upgrade)"
fi
# refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]]
then
${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed"
fi
echo "INFO: finished post-uninstall script"
%files
%defattr(-,root,root,755)
%dir /opt/hc/lib
%dir /opt/hc/lib/core
%attr(755, root, root) /opt/hc/lib/core/notify_sms.sh
%dir /etc/opt/hc
%dir /etc/opt/hc/core
%dir /etc/opt/hc/core/providers
%attr(644, root, root) /etc/opt/hc/core/providers/notify_sms.conf.dist
%changelog
* Tue Jun 20 2017 <patrick@kudos.be> - 0.0.2
- Made %postun RPM update aware
* Sun Apr 30 2017 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -0,0 +1,62 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) build script for HC RPM packages (uses 'rpmbuild')
#******************************************************************************
# @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved.
#
# This program is a free software; you can redistribute it and/or modify
# it under the same terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
#******************************************************************************
#******************************************************************************
# Requires following build (dir) structures:
#
# build_linux_rpms.sh
# BUILD/
# BUILDROOT/
# RPMS/
# SOURCES/
# SOURCES/bin/<hc_scripts>
# SOURCES/lib/*/<hc_plugins>
# SPECS/<spec_files>
# SRPMS/
#
# Build order:
# 1) Copy sources/scrips to the correct locations
# 2) Copy template, build and installer script files into correct locations
# 3) Execute build_linux_rpms.sh
# 4) RPM packages may be found in the RPMS directory
#******************************************************************************
BUILD_DIR="$(dirname $0)"
# clean up previous packages
rm -f ${BUILD_DIR}/RPMS/*/* >/dev/null
# build main packages
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-linux.spec
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-linux-platform.spec
# build core plugins
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-notify-eif.spec
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-notify-sms.spec
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-display-init.spec
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-display-csv.spec
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-display-terse.spec
print "List of built packages:"
ls -l ${BUILD_DIR}/RPMS/*/*
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,15 @@
#******************************************************************************
# @(#) check_aix_file_age.conf.dist
#******************************************************************************
# This is a configuration file for the check_aix_file_age HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# file (full path); maximum age in minutes since last change
/var/adm/ras/syslog.caa;600
/var/log/ntp.log;30
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,30 @@
#******************************************************************************
# @(#) check_aix_file_change.conf
#******************************************************************************
# This is a configuration file for the check_aix_file_change HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# name of the state file to use (will be relative to /var/opt/hc/state/persistent
# [default: discovered.file_change]
state_file=discovered.file_change
# specify if file names need to be checked/flagged for meta characters [yes|no]
# [default: yes]
do_meta_check=yes
# specify files or directories check (directories are automatically expanded)
# format:
# incl:<full path> (includes a path)
# excl:<full path> (excludes a path)
# note: shell wild cards in the file paths are not supported! Exclusions have
# a higher priority than inclusions.
incl:file1
incl:dir1
excl:dir1/file2
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,16 @@
#******************************************************************************
# @(#) check_aix_root_crontab.conf.dist
#******************************************************************************
# This is a configuration file for the check_aix_root_crontab HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# list of commands (or strings) that should appear in active cron entries
/opt/cfg2html/bin/cfg2html_aix.sh
/usr/local/bin/run_aix_system_backup.sh
/usr/bin/nmon
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,35 @@
#******************************************************************************
# @(#) check_aix_subsystems.conf.dist
#******************************************************************************
# This is a configuration file for the check_aix_subsystems HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# list of required active subsystems
sendmail
syslogd
portmap
inetd
snmpd
hostmibd
snmpmibd
aixmibd
#nimsh
biod
rpc.statd
rpc.lockd
automountd
qdaemon
writesrv
sshd
xntpd
cimsys
ctrmc
IBM.ServiceRM
IBM.DRM
IBM.CSMAgentRM
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,22 @@
#******************************************************************************
# @(#) check_aix_sysbackup.conf.dist
#******************************************************************************
# This is a configuration file for the check_aix_sysbackup HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# full path to the location of mksysb images, the tool expects sub-directories
# per host underneath this location
backup_path=/export/images
# name of the file containing the mksysb output
mksysb_log=mksysb.log
# maximum days before backup gets flagged as 'too old'
# [default: 14]
backup_age=14
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,21 @@
#******************************************************************************
# @(#) check_host.conf
#******************************************************************************
# This is a configuration file for the check_host feature.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify the style in which results should be displayed (see --list-core)
# [default: init]
display_style=init
# specify the list of HC plugins that need to be executed
# [hc:HC plugin name]
hc:plugin1
hc:plugin2
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,14 @@
#******************************************************************************
# @(#) check_hpux_file_age.conf
#******************************************************************************
# This is a configuration file for the check_hpux_file_age HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# file (full path); maximum age in minutes since last change
/var/adm/syslog/syslog.log;60
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,30 @@
#******************************************************************************
# @(#) check_hpux_file_change.conf
#******************************************************************************
# This is a configuration file for the check_hpux_file_change HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# name of the state file to use (will be relative to /var/opt/hc/state/persistent
# [default: discovered.file_change]
state_file=discovered.file_change
# specify if file names need to be checked/flagged for meta characters [yes|no]
# [default: yes]
do_meta_check=yes
# specify files or directories check (directories are automatically expanded)
# format:
# incl:<full path> (includes a path)
# excl:<full path> (excludes a path)
# note: shell wild cards in the file paths are not supported! Exclusions have
# a higher priority than inclusions.
incl:file1
incl:dir1
excl:dir1/file2
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,22 @@
#******************************************************************************
# @(#) check_hpux_fs_mounts_options.conf
#******************************************************************************
# This is a configuration file for the check_hpux_fs_mounts_options HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether non-mounted FS should be alerted on (yes|no)
# [default: yes]
ignore_missing_fs=yes
# specify mount points and their options (use the mount options as displayed
# by the 'mount' command; order of the options is not important)
# [fs:<mount point>:<mount options>]
fs:myfs1:myopts1
fs:myfs2:myopts2
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,18 @@
#******************************************************************************
# @(#) check_hpux_hpvm_vpar_status.conf
#******************************************************************************
# This is a configuration file for the check_hpux_hpvm_vpar_status HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify properties as displayed by the 'vzlist -a -H -o ctid,status,onboot' command
# [parid;runtime_status;boot_status]
# runtime_status should be 'on' or 'off'
# boot_status should be 'auto' or 'manual'
#1;on;auto
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,19 @@
#******************************************************************************
# @(#) check_hpux_ignite_backup.conf.dist
#******************************************************************************
# This is a configuration file for the check_hpux_ignite_backup HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# maximum days before backup gets flagged as 'too old'
# [default: 14]
backup_age=14
# list of hosts to exclude from the check (comma-separated list)
# [default: none]
exclude_hosts=""
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,24 @@
#******************************************************************************
# @(#) check_hpux_ioscan.conf
#******************************************************************************
# This is a configuration file for the check_hpux_ioscan HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# comma-separated list of HW device classes that should be checked
# [default: ctl,diag,disk,ext_bus,fc,fcp,i2o,ipmi,lan,lvm,olar,vxvm]
ioscan_classes="ctl,diag,disk,ext_bus,fc,fcp,i2o,ipmi,lan,lvm,olar,vxvm"
# specify whether ioscan needs to be run in kernel-cached or not (yes|no)
# [default: yes]
kernel_mode=yes
# specify whether ioscan needs to report in Agile view or not (yes|no)
# [default: yes]
agile_view=yes
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,16 @@
#******************************************************************************
# @(#) check_hpux_ntp_status.conf.dist
#******************************************************************************
# This is a configuration file for the check_hpux_ntp_status HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# maximum allowed offset (in milliseconds)
# [default: 500]
max_offset=500
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,14 @@
#******************************************************************************
# @(#) check_hpux_root_crontab.conf.dist
#******************************************************************************
# This is a configuration file for the check_hpux_root_crontab HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# list of commands (or strings) that should appear in active cron entries
/opt/cfg2html/cfg2html_hpux.sh
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,16 @@
#******************************************************************************
# @(#) check_hpux_sg_cluster_config.conf.dist
#******************************************************************************
# This is a configuration file for the check_hpux_sg_cluster_config HC plugin.
# All lines starting with a '#' are comment lines.
# It is recommended to only monitor unique "param1 value2" combinations
#******************************************************************************
#[mycluster]
#param1 value1
#param2 value2
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,15 @@
#******************************************************************************
# @(#) check_hpux_sg_cluster_status.conf.dist
#******************************************************************************
# This is a configuration file for the check_hpux_sg_cluster_status HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# list of required cluster statuses (format : "parameter=value")
#status=up
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,20 @@
#******************************************************************************
# @(#) check_hpux_sg_package_config.conf.dist
#******************************************************************************
# This is a configuration file for the check_hpux_sg_package_config HC plugin.
# All lines starting with a '#' are comment lines.
# It is recommended to only monitor unique "param1 value2" combinations
#******************************************************************************
#[mypkg1]
#param1 value1
#param2 value2
#[mypkg2]
#param1 value1
#param2 value2
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,15 @@
#******************************************************************************
# @(#) check_hpux_sg_package_status.conf.dist
#******************************************************************************
# This is a configuration file for the check_hpux_sg_package_status HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# list of required package statuses (format : "package_name:parameter=value")
#my_package|status=up
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,20 @@
#******************************************************************************
# @(#) check_hpux_syslog.conf.dist
#******************************************************************************
# This is a configuration file for the check_hpux_syslog HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# path to the SYSLOG file
# [default: /var/adm/syslog/syslog.log]
syslog_file="/var/adm/syslog/syslog.log"
# comma-separated list of tags to search for (case insensitive) (see man 1 logger)
# [default: vmunix]
syslog_classes="vmunix"
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,17 @@
#******************************************************************************
# @(#) check_linux_burp_backup.conf
#******************************************************************************
# This is a configuration file for the check_linux_burp_backup HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# client name; maximum amount of warnings allowed; maximum backup age (hours/days/weeks)
testclient1;0;10h
testclient2;0;2d
testclient3;0;5w
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,15 @@
#******************************************************************************
# @(#) check_linux_file_age.conf
#******************************************************************************
# This is a configuration file for the check_linux_file_age HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# file (full path); maximum age in minutes since last change
/var/log/messages;60
/var/log/ntp.log;30
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,30 @@
#******************************************************************************
# @(#) check_linux_file_change.conf
#******************************************************************************
# This is a configuration file for the check_linux_file_change HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# name of the state file to use (will be relative to /var/opt/hc/state/persistent
# [default: discovered.file_change]
state_file=discovered.file_change
# specify if file names need to be checked/flagged for meta characters [yes|no]
# [default: yes]
do_meta_check=yes
# specify files or directories check (directories are automatically expanded)
# format:
# incl:<full path> (includes a path)
# excl:<full path> (excludes a path)
# note: shell wild cards in the file paths are not supported! Exclusions have
# a higher priority than inclusions.
incl:file1
incl:dir1
excl:dir1/file2
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,26 @@
#******************************************************************************
# @(#) check_linux_hpacucli.conf
#******************************************************************************
# This is a configuration file for the check_linux_hpacucli HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# location of 'hpacucli' tool
hpacucli_bin="/usr/sbin/hpacucli"
# controller all show status (0=off, 1=on) [default: 1]
do_acu_controller=1
# controller slot=X enclosure all show (0=off, 1=on) [default: 1]
do_acu_enclosure=1
# controller slot=X physicaldrive all show status (0=off, 1=on) [default: 1]
do_acu_physical=1
# controller slot=X logicaldrive all show status (0=off, 1=on) [default: 1]
do_acu_logical=1
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,29 @@
#******************************************************************************
# @(#) check_linux_hpasmcli.conf
#******************************************************************************
# This is a configuration file for the check_linux_hpasmcli HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# location of 'hpasmcli' tool
hpasmcli_bin="/sbin/hpasmcli"
# SHOW FANS (0=off, 1=on) [default: 1]
do_asm_fans=1
# SHOW DIMM (0=off, 1=on) [default: 1]
do_asm_dimm=1
# SHOW POWERSUPPLY (0=off, 1=on) [default: 1]
do_asm_powersupply=1
# SHOW SERVER (0=off, 1=on) [default: 1]
do_asm_server=1
# SHOW TEMPERATURE (0=off, 1=on) [default: 1]
do_asm_temperature=1
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,19 @@
#******************************************************************************
# @(#) check_linux_hplog.conf
#******************************************************************************
# This is a configuration file for the check_linux_hplog HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# location of 'hpacucli' tool
hplog_bin="/sbin/hplog"
# comma-separated list of severities to search for (case insensitive)
# [default: CRITICAL,CAUTION]
hplog_severities="CRITICAL,CAUTION"
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,26 @@
#******************************************************************************
# @(#) check_linux_hpssacli.conf
#******************************************************************************
# This is a configuration file for the check_linux_hpssacli HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# location of 'hpssacli' tool
hpssacli_bin="/usr/sbin/hpssacli"
# controller all show status (0=off, 1=on) [default: 1]
do_ssa_controller=1
# controller slot=X enclosure all show (0=off, 1=on) [default: 1]
do_ssa_enclosure=1
# controller slot=X physicaldrive all show status (0=off, 1=on) [default: 1]
do_ssa_physical=1
# controller slot=X logicaldrive all show status (0=off, 1=on) [default: 1]
do_ssa_logical=1
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,14 @@
#******************************************************************************
# @(#) check_linux_root_crontab.conf.dist
#******************************************************************************
# This is a configuration file for the check_linux_root_crontab HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# list of commands (or strings) that should appear in active cron entries
/usr/bin/cfg2html-linux
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,16 @@
#******************************************************************************
# @(#) check_linux_sg_cluster_config.conf.dist
#******************************************************************************
# This is a configuration file for the check_linux_sg_cluster_config HC plugin.
# All lines starting with a '#' are comment lines.
# It is recommended to only monitor unique "param1 value2" combinations
#******************************************************************************
#[mycluster]
#param1 value1
#param2 value2
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,15 @@
#******************************************************************************
# @(#) check_linux_sg_cluster_status.conf.dist
#******************************************************************************
# This is a configuration file for the check_linux_sg_cluster_status HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# list of required cluster statuses (format : "parameter=value")
#status=up
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,20 @@
#******************************************************************************
# @(#) check_linux_sg_package_config.conf.dist
#******************************************************************************
# This is a configuration file for the check_linux_sg_package_config HC plugin.
# All lines starting with a '#' are comment lines.
# It is recommended to only monitor unique "param1 value2" combinations
#******************************************************************************
#[mypkg1]
#param1 value1
#param2 value2
#[mypkg2]
#param1 value1
#param2 value2
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,15 @@
#******************************************************************************
# @(#) check_linux_sg_package_status.conf.dist
#******************************************************************************
# This is a configuration file for the check_linux_sg_package_status HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# list of required package statuses (format : "package_name:parameter=value")
#my_package|status=up
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,18 @@
#******************************************************************************
# @(#) check_linux_vz_ct_status.conf
#******************************************************************************
# This is a configuration file for the check_linux_openvz_ct_status HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify properties as displayed by the 'vzlist -a -H -o ctid,status,onboot' command
# [ctid;runtime_status;boot_status]
# runtime_status should be 'running' or 'stopped'
# boot_status should be 'yes' or 'no'
#100;running;yes
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,31 @@
#******************************************************************************
# @(#) check_health.conf
#******************************************************************************
# This is the main configuration file for the check_health.sh tool.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# --- general settings ---
# maximum timeout for HC calls (seconds)
HC_TIME_OUT=60
# location of log directory, see also --log-dir)
LOG_DIR="/var/opt/hc"
# location of events directory
EVENTS_DIR="${LOG_DIR}/events"
# location of state directory
STATE_DIR="${LOG_DIR}/state"
# location of persistent state directory
STATE_PERM_DIR="${STATE_DIR}/persistent"
# location of temporary state directory
STATE_TEMP_DIR="${STATE_DIR}/temporary"
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,22 @@
#******************************************************************************
# @(#) notify_eif.conf
#******************************************************************************
# This is the configuration file for the notify_eif.sh provider.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# --- EIF settings ---
# location of the posteifmsg tool
EIF_BIN="/opt/eif/bin/posteifmsg"
# location of the posteifmsg configuration file
EIF_ETC="/etc/opt/eif/posteifmsg.conf"
# default ITM severity
EIF_SEVERITY="MINOR"
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,18 @@
#******************************************************************************
# @(#) notify_sms.conf
#******************************************************************************
# This is the the configuration file for the notify_sms.sh provider.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# --- SMS settings ---
# list of supported SMS providers (comma-separated)
SMS_PROVIDERS=""
# configuration settings for individual SMS providers go here
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,3 @@
*** MESSAGE ***
<## @_HC_BODY ##>

View File

@ -0,0 +1,13 @@
*** MESSAGE ***
<## @_HC_BODY ##>
*** RECOMMENDATION ***
File system is mounted with incorrect options. Remount the file system with the correct options.
* Check /etc/fstab
* Check /etc/cmcluster/<PKG_NAME>/<PKG_NAME>.conf files (directive "fs_mount_opt")
Keep in mind that special mount options may apply for:
* NFS file systems
* SAP file systems
* Oracle data/redo files

View File

@ -0,0 +1,10 @@
*** MESSAGE ***
<## @_HC_BODY ##>
*** RECOMMENDATION ***
Check any faulty devices or error messages:
* ioscan -P health (look for 'offline' devices)
* ioscan -fnN (look for 'NO_HW' devices)
* dmesg
* /var/adm/syslog/syslog.log

View File

@ -0,0 +1,10 @@
*** MESSAGE ***
<## @_HC_BODY ##>
*** RECOMMENDATION ***
Execute:
* mwa start all
* /sbin/init.d/ovpa start
Verify:
* perfstat -p

Some files were not shown because too many files have changed in this diff Show More