Compare commits

..

No commits in common. "master" and "20190324" have entirely different histories.

318 changed files with 3207 additions and 14000 deletions

3
.github/FUNDING.yml vendored
View File

@ -1,3 +0,0 @@
# These are supported funding model platforms
github: patvdv

View File

@ -1,7 +1,3 @@
![License](https://img.shields.io/github/license/patvdv/check_health.svg)
![Code](https://img.shields.io/badge/Code-Shell-green.svg)
[![Release](https://img.shields.io/github/release/patvdv/check_health.svg)](https://github.com/patvdv/check_health/releases)
<br />
<p align="center"><img src="logo/horizontal.png" alt="QList" height="130px"></p> <p align="center"><img src="logo/horizontal.png" alt="QList" height="130px"></p>
# Health checker for UNIX/Linux # Health checker for UNIX/Linux
@ -10,15 +6,15 @@ Health checker for UNIX/Linux is a small framework of monitoring scripts. It is
## Requirements ## Requirements
* *ksh88/ksh93* (mksh/pdksh will work also but YMMV) * ksh88/ksh93 (mksh/pdksh will work also but YMMV)
* some disk space for storing logs & event files * some disk space for storing logs & event files
* system dependent tools/utilities (see individual health checks) * system dependant tools/utilities (see individual health checks)
* UNIX *cron* or other scheduler * UNIX cron or other scheduler
* execute as user *root* only * execute as user root only
## Downloads ## Build
See the [Releases](https://github.com/patvdv/check_health/releases) page. Use the build templates & scripts in the `build/` directory to roll your own packages.
## Installation ## Installation
@ -37,16 +33,12 @@ Install the HP-UX plugin bundle:
Install the core bundle: Install the core bundle:
yum localinstall hc-linux-<version>.noarch.rpm yum localinstall hc-linux-<version>.noarch.rpm
dpkg --install hc-linux-<version>.noarch.rpm
zypper install hc-linux-<version>.noarch.rpm zypper install hc-linux-<version>.noarch.rpm
pacman -U hc-linux-<version>-any.pkg.tar.xz
Install the Linux OS plugins bundle: Install the Linux plugin bundle:
yum localinstall hc-linux-platform-<version>.noarch.rpm yum localinstall hc-linux-platform-<version>.noarch.rpm
dpkg --install hc-linux-platform-<version>.noarch.rpm
zypper install hc-linux-platform-<version>.noarch.rpm zypper install hc-linux-platform-<version>.noarch.rpm
pacman -U hc-linux-platform-<version>-any.pkg.tar.xz
### AIX ### AIX
@ -54,33 +46,20 @@ Install the core bundle:
installp -Xap -d hc-aix-<version>.bff all installp -Xap -d hc-aix-<version>.bff all
Install the AIX OS plugins bundle: Install the AIX plugin bundle:
installp -Xap -d hc-aix-platform-<version> all installp -Xap -d hc-aix-platform-<version> all
### Clusterware/Exadata ### Exadata
Install the core bundle: Install the core bundle:
yum localinstall hc-linux-<version>.noarch.rpm yum localinstall hc-linux-<version>.noarch.rpm
Install Clusterware/Exadata Linux plugin bundle(s): Install the Linux plugin bundle:
yum localinstall hc-clusterware-platform-<version>.noarch.rpm
yum localinstall hc-exadata-platform-<version>.noarch.rpm yum localinstall hc-exadata-platform-<version>.noarch.rpm
### Serviceguard
Install the core bundle:
swinstall -x mount_all_filesystems=false -s /tmp/hc-hpux-<version>.sd \*
yum localinstall hc-linux-<version>.noarch.rpm
Install Serviceguard plugin bundle(s):
swinstall -x mount_all_filesystems=false -s /tmp/hc-serviceguard-platform-<version>.sd \*
yum localinstall hc-serviceguard-platform-<version>.noarch.rpm
### Miscellaneous ### Miscellaneous
Additionally, there may be bundles for display or notification plugins, e.g.: Additionally, there may be bundles for display or notification plugins, e.g.:
@ -90,11 +69,6 @@ Additionally, there may be bundles for display or notification plugins, e.g.:
* hc-display-terse * hc-display-terse
* hc-notify-eif * hc-notify-eif
* hc-notify-sms * hc-notify-sms
* hc-notify-slack
## Configure & deploy
An Ansible role is available at: https://github.com/patvdv/kudos.check_health
## Execute (examples) ## Execute (examples)
@ -137,19 +111,19 @@ An Ansible role is available at: https://github.com/patvdv/kudos.check_health
/opt/hc/bin/check_health.sh --report --today /opt/hc/bin/check_health.sh --report --today
/opt/hc/bin/check_health.sh --report --newer=20180101 /opt/hc/bin/check_health.sh --report --newer=20180101
/opt/hc/bin/check_health.sh --report --id=20160704154001 --detail /opt/hc/bin/check_health.sh --report --id=20160704154001 --detail
``` ```
* **Alerting** on failed health checks: * **Alerting** on failed health checks:
``` ```
/opt/hc/bin/check_health.sh --hc=check_hpux_root_crontab --run --notify=mail --mail-to="alert@acme.com" /opt/hc/bin/check_health.sh --hc=check_hpux_root_crontab --run --notify=mail --mail-to="alert@acme.com"
/opt/hc/bin/check_health.sh --hc=check_linux_fs_usage --run --notify=slack
``` ```
## References ## References
### Documentation ### Documentation
More documentation can be found at <https://www.kudos.be/check_health/> More documentation can be found at http://www.kudos.be/Projects/Health_checker.html
### Logo ### Logo

View File

@ -22,6 +22,8 @@
# build_aix_bff.sh # build_aix_bff.sh
# hc_aix/* (containing mkinstallp template & sources) # hc_aix/* (containing mkinstallp template & sources)
# hc_aix_platform/* (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) # lpp_source/KUDOS (defined in build_bff.sh script)
# #

View File

@ -32,14 +32,12 @@ Fileset
/opt/hc/lib/platform/aix/check_aix_subsystems.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_sysbackup.sh
/opt/hc/lib/platform/aix/check_aix_topasrec.sh /opt/hc/lib/platform/aix/check_aix_topasrec.sh
/opt/hc/lib/platform/aix/check_aix_uptime.sh
/etc/opt/hc /etc/opt/hc
/etc/opt/hc/check_aix_file_age.conf.dist /etc/opt/hc/check_aix_file_age.conf.dist
/etc/opt/hc/check_aix_file_change.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_root_crontab.conf.dist
/etc/opt/hc/check_aix_subsystems.conf.dist /etc/opt/hc/check_aix_subsystems.conf.dist
/etc/opt/hc/check_aix_sysbackup.conf.dist /etc/opt/hc/check_aix_sysbackup.conf.dist
/etc/opt/hc/check_aix_uptime.conf.dist
EOROOTFiles EOROOTFiles
Relocatable: N Relocatable: N
EOFileset EOFileset

View File

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

View File

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

View File

@ -1,51 +0,0 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for hc_notify_slack LPP package
#******************************************************************************
# @(#) Copyright (C) 2022 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_slack.conf ]]
then
cp -p ${HC_ETC_DIR}/core/providers/notify_slack.conf.dist ${HC_ETC_DIR}/core/providers/notify_slack.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

@ -1,48 +0,0 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-uninstall script for hc_notify_slack LPP package
#******************************************************************************
# @(#) Copyright (C) 2022 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_slack.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

@ -1,33 +0,0 @@
# -- post-install --
post_install() {
# ------------------------- 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"
}
# -- post-remove --
post_remove() {
# ------------------------- 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"
}

View File

@ -1,29 +0,0 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-clusterware-platform"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX (Clusterware plugins)"
arch=("any")
url="https://github.com/patvdv/${_pkgname}"
license=('GPL3')
makedepends=('git')
depends=('hc-linux')
source=("${_pkgname}::git+${url}.git#branch=master")
install=".install"
sha256sums=('SKIP')
package() {
cd "${srcdir}/${_pkgname}"
install -d -m 755 ${pkgdir}/opt/hc/lib
install -d -m 755 ${pkgdir}/opt/hc/lib/platform
install -d -m 755 ${pkgdir}/opt/hc/lib/platform/clusterware
install -D -m 755 opt/hc/lib/platform/clusterware/check_clusterware_resource_config.sh ${pkgdir}/opt/hc/lib/platform/clusterware/check_clusterware_resource_config.sh
install -D -m 755 opt/hc/lib/platform/clusterware/check_clusterware_resource_status.sh ${pkgdir}/opt/hc/lib/platform/clusterware/check_clusterware_resource_status.sh
install -d -m 755 ${pkgdir}/etc/opt/hc
install -D -m 644 etc/opt/hc/check_clusterware_resource_config.conf.dist ${pkgdir}/etc/opt/hc/check_clusterware_resource_config.conf.dist
install -D -m 644 etc/opt/hc/check_clusterware_resource_status.conf.dist ${pkgdir}/etc/opt/hc/check_clusterware_resource_status.conf.dist
install -d -m 755 ${pkgdir}/etc/opt/hc/core
install -d -m 755 ${pkgdir}/etc/opt/hc/core/templates
}

View File

@ -1,10 +0,0 @@
Package: hc-clusterware-platform
Version: %BUILD_DATE%
Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 300
Depends: hc-linux
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX (Clusterware plugins).

View File

@ -1,16 +0,0 @@
#!/bin/bash
# ------------------------- 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 ..."
# debian: reset ownerships
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
# 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"

View File

@ -1,14 +0,0 @@
#!/bin/bash
# ------------------------- 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"

View File

@ -1,53 +0,0 @@
#!/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:
#
# hc_build_linux_rpms.sh
# BUILD/
# BUILDROOT/
# RPMS/
# SOURCES/opt/
# SOURCES/opt/hc/bin/<hc_scripts>
# SOURCES/opt/hc/lib/*/<hc_plugins>
# SOURCES/etc/opt/hc/<hc_configs>
# SPECS/<spec_files>
# SRPMS/
#
# Build order:
# 1) Copy sources/scripts to the correct locations
# 2) Copy template, build and installer script files into correct locations
# 3) Execute hc_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-clusterware-platform.spec
print "List of built packages:"
ls -l ${BUILD_DIR}/RPMS/*/*
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -0,0 +1,90 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-exadata-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/exadata
cp ../SOURCES/lib/platform/exadata/check_exadata_zfs_logs.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_zfs_logs.sh
cp ../SOURCES/lib/platform/exadata/check_exadata_zfs_services.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_zfs_services.sh
cp ../SOURCES/lib/platform/exadata/check_exadata_zfs_share_replication.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_zfs_share_replication.sh
cp ../SOURCES/lib/platform/exadata/check_exadata_zfs_share_usage.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_zfs_share_usage.sh
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
cp ../SOURCES/etc/check_exadata_zfs_logs.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_zfs_logs.conf.dist
cp ../SOURCES/etc/check_exadata_zfs_services.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_zfs_services.conf.dist
cp ../SOURCES/etc/check_exadata_zfs_share_replication.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_zfs_share_replication.conf.dist
cp ../SOURCES/etc/check_exadata_zfs_share_usage.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_zfs_share_usage.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-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/exadata
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_zfs_logs.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_zfs_services.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_zfs_share_replication.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_zfs_share_usage.sh
%dir /etc/opt/hc
%attr(644, root, root) /etc/opt/hc/check_exadata_zfs_logs.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_zfs_services.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_zfs_share_replication.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_zfs_share_usage.conf.dist
%changelog
* Mon Feb 18 2019 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -22,9 +22,8 @@
# BUILDROOT/ # BUILDROOT/
# RPMS/ # RPMS/
# SOURCES/ # SOURCES/
# SOURCES/opt/hc/bin/<hc_scripts> # SOURCES/bin/<hc_scripts>
# SOURCES/opt/hc/lib/*/<hc_plugins> # SOURCES/lib/*/<hc_plugins>
# SOURCES/etc/opt/hc/<hc_configs>
# SPECS/<spec_files> # SPECS/<spec_files>
# SRPMS/ # SRPMS/
# #

View File

@ -1,33 +0,0 @@
# -- post-install --
post_install() {
# ------------------------- 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"
}
# -- post-remove --
post_remove() {
# ------------------------- 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"
}

View File

@ -1,54 +0,0 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-exadata-platform"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX (Exadata platform plugins)"
arch=("any")
url="https://github.com/patvdv/${_pkgname}"
license=('GPL3')
makedepends=('git')
depends=('hc-linux')
source=("${_pkgname}::git+${url}.git#branch=master")
install=".install"
sha256sums=('SKIP')
package() {
cd "${srcdir}/${_pkgname}"
install -d -m 755 ${pkgdir}/opt/hc/lib
install -d -m 755 ${pkgdir}/opt/hc/core
install -D -m 755 opt/hc/lib/core/include_exadata.sh ${pkgdir}/opt/hc/lib/core/include_exadata.sh
install -d -m 755 ${pkgdir}/opt/hc/lib/platform
install -d -m 755 ${pkgdir}/opt/hc/lib/platform/exadata
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_cell_alerts.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_cell_alerts.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_cell_celldisks.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_cell_celldisks.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_cell_flash.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_cell_flash.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_cell_griddisks.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_cell_griddisks.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_cell_luns.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_cell_luns.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_cell_megaraid.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_cell_megaraid.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_cell_physicaldisks.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_cell_physicaldisks.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_ib_status.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_ib_status.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_megaraid.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_megaraid.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_zfs_cluster.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_zfs_cluster.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_zfs_logs.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_zfs_logs.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_zfs_pool_usage.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_zfs_pool_usage.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_zfs_services.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_zfs_services.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_zfs_share_replication.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_zfs_share_replication.sh
install -D -m 755 opt/hc/lib/platform/exadata/check_exadata_zfs_share_usage.sh ${pkgdir}/opt/hc/lib/platform/exadata/check_exadata_zfs_share_usage.sh
install -d -m 755 ${pkgdir}/etc/opt/hc
install -D -m 644 etc/opt/hc/check_exadata_cell_alerts.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_cell_alerts.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_cell_celldisks.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_cell_celldisks.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_cell_flash.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_cell_flash.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_cell_griddisks.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_cell_griddisks.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_cell_luns.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_cell_luns.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_cell_megaraid.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_cell_megaraid.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_cell_physicaldisks.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_cell_physicaldisks.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_megaraid.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_megaraid.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_zfs_cluster.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_zfs_cluster.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_zfs_logs.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_zfs_logs.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_zfs_pool_usage.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_zfs_pool_usage.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_zfs_services.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_zfs_services.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_zfs_share_replication.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_zfs_share_replication.conf.dist
install -D -m 644 etc/opt/hc/check_exadata_zfs_share_usage.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_zfs_share_usage.conf.dist
}

View File

@ -1,10 +0,0 @@
Package: hc-exadata-platform
Version: %BUILD_DATE%
Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 300
Depends: hc-linux
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX (Exadata platform plugins). 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.

View File

@ -1,16 +0,0 @@
#!/bin/bash
# ------------------------- 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 ..."
# debian: reset ownerships
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
# 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"

View File

@ -1,14 +0,0 @@
#!/bin/bash
# ------------------------- 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"

View File

@ -1,154 +0,0 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-exadata-platform
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (Exadata 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/core
cp ../SOURCES/opt/hc/lib/core/include_exadata.sh $RPM_BUILD_ROOT/opt/hc/lib/core
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_cell_alerts.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_cell_alerts.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_cell_celldisks.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_cell_celldisks.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_cell_flash.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_cell_flash.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_cell_griddisks.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_cell_griddisks.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_cell_luns.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_cell_luns.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_cell_megaraid.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_cell_megaraid.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_cell_physicaldisks.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_cell_physicaldisks.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_ib_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_ib_status.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_megaraid.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_megaraid.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_zfs_cluster.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_zfs_cluster.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_zfs_logs.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_zfs_logs.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_zfs_pool_usage.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_zfs_pool_usage.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_zfs_services.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_zfs_services.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_zfs_share_replication.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_zfs_share_replication.sh
cp ../SOURCES/opt/hc/lib/platform/exadata/check_exadata_zfs_share_usage.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata/check_exadata_zfs_share_usage.sh
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
cp ../SOURCES/etc/opt/hc/check_exadata_cell_alerts.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_cell_alerts.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_cell_celldisks.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_cell_celldisks.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_cell_flash.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_cell_flash.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_cell_griddisks.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_cell_griddisks.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_cell_luns.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_cell_luns.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_cell_megaraid.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_cell_megaraid.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_cell_physicaldisks.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_cell_physicaldisks.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_megaraid.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_megaraid.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_zfs_cluster.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_zfs_cluster.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_zfs_logs.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_zfs_logs.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_zfs_pool_usage.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_zfs_pool_usage.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_zfs_services.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_zfs_services.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_zfs_share_replication.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_zfs_share_replication.conf.dist
cp ../SOURCES/etc/opt/hc/check_exadata_zfs_share_usage.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_zfs_share_usage.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-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/include_exadata.sh
%dir /opt/hc/lib/platform
%dir /opt/hc/lib/platform/exadata
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_cell_alerts.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_cell_celldisks.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_cell_flash.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_cell_griddisks.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_cell_luns.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_cell_megaraid.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_cell_physicaldisks.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_ib_status.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_megaraid.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_zfs_cluster.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_zfs_logs.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_zfs_pool_usage.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_zfs_services.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_zfs_share_replication.sh
%attr(755, root, root) /opt/hc/lib/platform/exadata/check_exadata_zfs_share_usage.sh
%dir /etc/opt/hc
%attr(644, root, root) /etc/opt/hc/check_exadata_cell_alerts.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_cell_celldisks.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_cell_flash.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_cell_griddisks.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_cell_luns.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_cell_megaraid.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_cell_physicaldisks.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_megaraid.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_zfs_cluster.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_zfs_logs.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_zfs_pool_usage.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_zfs_services.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_zfs_share_replication.conf.dist
%attr(644, root, root) /etc/opt/hc/check_exadata_zfs_share_usage.conf.dist
%changelog
* Tue Jul 07 2020 <patrick@kudos.be> - 0.5.0
- Added check_exadata_ib_status
* Fri Jul 07 2019 <patrick@kudos.be> - 0.4.0
- Added check_exadata_zfs_cluster
* Fri May 14 2019 <patrick@kudos.be> - 0.3.0
- Added include_exadata
- Added plugin check_exadata_cell_alerts
- Added plugin check_exadata_cell_celldisks
- Added plugin check_exadata_cell_flash
- Added plugin check_exadata_cell_griddisks
- Added plugin check_exadata_cell_luns
- Added plugin check_exadata_cell_megaraid
- Added plugin check_exadata_cell_physicaldisks
- Added plugin check_exadata_megaraid
* Fri Apr 12 2019 <patrick@kudos.be> - 0.2.0
- Added plugin check_exadata_zfs_pool_usage
* Tue Mar 26 2019 <patrick@kudos.be> - 0.1.0
- New git tree organization
* Mon Feb 18 2019 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -17,11 +17,10 @@
#****************************************************************************** #******************************************************************************
# Requires following build (dir) structures: # Requires following build (dir) structures:
# #
# build/hpux/<build_files> # build/<build_files>
# build/hpux/build_hpux_depots.sh # build/build_hpux_depots.sh
# opt/hc/bin/<hc_scripts> # sources/bin/<hc_scripts>
# opt/hc/lib/*/<hc_plugins> # sources/lib/*/<hc_plugins>
# etc/opt/hc/<hc_configs>
# depots/ # depots/
# #
# Build order: # Build order:
@ -37,12 +36,7 @@ BUILD_PRETTY_DATE="$(date +'%Y.%m.%d')"
BUILD_DIR="$(dirname $0)" BUILD_DIR="$(dirname $0)"
# clean up previous packages # clean up previous packages
if [[ -d ../../depots ]] rm -f ${BUILD_DIR}/depots/* >/dev/null
then
rm -f ../../depots/* 2>/dev/null
else
mkdir -p ../../depots 2>/dev/null
fi
# see if we have BUILD_DATE placeholder in PSF files # see if we have BUILD_DATE placeholder in PSF files
find ${BUILD_DIR} -name "*.psf" | while read FILE find ${BUILD_DIR} -name "*.psf" | while read FILE
@ -61,52 +55,61 @@ do
done done
# build hc_hpux package # build hc_hpux package
cd ${BUILD_DIR}/hc_hpux/ || exit 1 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 -x media_type=tape -d ../../depots/hc_hpux-${BUILD_DATE}.sd
cd - || exit 1 swpackage -s hc_hpux.psf @ /var/opt/depot/kudos
cd -
# build hc_hpux_platform package # build hc_hpux_platform package
cd ${BUILD_DIR}/hc_hpux_platform || exit 1 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 -x media_type=tape -d ../../depots/hc_hpux_platform-${BUILD_DATE}.sd
cd - || exit 1 swpackage -s hc_hpux_platform.psf @ /var/opt/depot/kudos
cd -
# build hc_display_csv package # build hc_display_csv package
cd ${BUILD_DIR}/hc_display_csv || exit 1 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 -x media_type=tape -d ../../depots/hc_display_csv-${BUILD_DATE}.sd
cd - || exit 1 swpackage -s hc_display_csv.psf @ /var/opt/depot/kudos
cd -
# build hc_display_init package # build hc_display_init package
cd ${BUILD_DIR}/hc_display_init || exit 1 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 -x media_type=tape -d ../../depots/hc_display_init-${BUILD_DATE}.sd
cd - || exit 1 swpackage -s hc_display_init.psf @ /var/opt/depot/kudos
cd -
# build hc_display_json package # build hc_display_json package
cd ${BUILD_DIR}/hc_display_json || exit 1 cd ${BUILD_DIR}/hc_display_json
swpackage -s hc_display_json.psf -x media_type=tape -d ../../../depots/hc-display-json-${BUILD_DATE}.sd swpackage -s hc_display_json.psf -x media_type=tape -d ../../depots/hc_display_json-${BUILD_DATE}.sd
cd - || exit 1 swpackage -s hc_display_json.psf @ /var/opt/depot/kudos
cd -
# build hc_display_terse package # build hc_display_terse package
cd ${BUILD_DIR}/hc_display_terse || exit 1 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 -x media_type=tape -d ../../depots/hc_display_terse-${BUILD_DATE}.sd
cd - || exit 1 swpackage -s hc_display_terse.psf @ /var/opt/depot/kudos
cd -
# build hc_display_zenoss package # build hc_display_zenoss package
cd ${BUILD_DIR}/hc_display_zenoss || exit 1 cd ${BUILD_DIR}/hc_display_zenoss
swpackage -s hc_display_zenoss.psf -x media_type=tape -d ../../../depots/hc-display-zenoss-${BUILD_DATE}.sd swpackage -s hc_display_zenoss.psf -x media_type=tape -d ../../depots/hc_display_zenoss-${BUILD_DATE}.sd
cd - || exit 1 swpackage -s hc_display_zenoss.psf @ /var/opt/depot/kudos
cd -
# build hc_notify_sms package # build hc_notify_sms package
cd ${BUILD_DIR}/hc_notify_sms || exit 1 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 -x media_type=tape -d ../../depots/hc_notify_sms-${BUILD_DATE}.sd
cd - || exit 1 swpackage -s hc_notify_sms.psf @ /var/opt/depot/kudos
cd -
# build hc_notify_eif package # build hc_notify_eif package
cd ${BUILD_DIR}/hc_notify_eif || exit 1 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 -x media_type=tape -d ../../depots/hc_notify_eif-${BUILD_DATE}.sd
cd - || exit 1 swpackage -s hc_notify_eif.psf @ /var/opt/depot/kudos
cd -
print "List of built packages:" print "List of built packages:"
ls -l ../../depots/* ls -l ${BUILD_DIR}/../depots/*
# when installed on an ignite server: possible addition of depot registration here # when installed on an ignite server: possible addition of depot registration here

View File

@ -58,7 +58,7 @@ This is the core CSV display plugin package"
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../opt/hc/lib/core=/opt/hc/lib/core directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 display_csv.sh file -m 755 display_csv.sh
end end
end end

View File

@ -58,7 +58,7 @@ This is the core INIT display plugin package"
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../opt/hc/lib/core=/opt/hc/lib/core directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 display_init.sh file -m 755 display_init.sh
end end
end end

View File

@ -58,7 +58,7 @@ This is the core JSON display plugin package"
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../opt/hc/lib/core=/opt/hc/lib/core directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 display_json.sh file -m 755 display_json.sh
end end
end end

View File

@ -58,7 +58,7 @@ This is the core TERSE display plugin package"
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../opt/hc/lib/core=/opt/hc/lib/core directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 display_terse.sh file -m 755 display_terse.sh
end end
end end

View File

@ -58,7 +58,7 @@ This is the core ZENOSS display plugin package"
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../opt/hc/lib/core=/opt/hc/lib/core directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 display_zenoss.sh file -m 755 display_zenoss.sh
end end
end end

View File

@ -56,9 +56,9 @@ system mounts, process checks, file consistency etc."
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../opt/hc/bin=/opt/hc/bin directory ../../sources/bin=/opt/hc/bin
file -m 755 check_health.sh file -m 755 check_health.sh
directory ../../../opt/hc/lib/core=/opt/hc/lib/core directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 include_core.sh file -m 755 include_core.sh
file -m 755 include_data.sh file -m 755 include_data.sh
file -m 755 include_os.sh file -m 755 include_os.sh
@ -75,7 +75,7 @@ system mounts, process checks, file consistency etc."
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../opt/hc/lib/core=/opt/hc/lib/core directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 notify_mail.sh file -m 755 notify_mail.sh
file -m 755 report_std.sh file -m 755 report_std.sh
end end
@ -92,9 +92,9 @@ system mounts, process checks, file consistency etc."
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../etc/opt/hc/core=/etc/opt/hc/core directory ../../configs/etc/core=/etc/opt/hc/core
file -m 644 check_health.conf.dist file -m 644 check_health.conf.dist
directory ../../../etc/opt/hc=/etc/opt/hc directory ../../configs/etc=/etc/opt/hc
file -m 644 check_host.conf.dist file -m 644 check_host.conf.dist
end end
@ -110,7 +110,7 @@ system mounts, process checks, file consistency etc."
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../etc/opt/hc/core/templates=/etc/opt/hc/core/templates directory ../../configs/etc/core/templates=/etc/opt/hc/core/templates
file -m 644 mail_info.tpl file -m 644 mail_info.tpl
file -m 644 mail_header.tpl file -m 644 mail_header.tpl
file -m 644 mail_body.tpl file -m 644 mail_body.tpl

View File

@ -58,12 +58,10 @@ This is the OS/platform plugin package"
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../opt/hc/lib/platform/hp-ux=/opt/hc/lib/platform/hp-ux directory ../../sources/lib/platform/hp-ux=/opt/hc/lib/platform/hp-ux
file -m 755 check_hpux_autofs.sh
file -m 755 check_hpux_autopath.sh file -m 755 check_hpux_autopath.sh
file -m 755 check_hpux_cdsf_cluster.sh file -m 755 check_hpux_cdsf_cluster.sh
file -m 755 check_hpux_cron_status.sh file -m 755 check_hpux_cron_status.sh
file -m 755 check_hpux_defunct_processes.sh
file -m 755 check_hpux_drd_status.sh file -m 755 check_hpux_drd_status.sh
file -m 755 check_hpux_file_age.sh file -m 755 check_hpux_file_age.sh
file -m 755 check_hpux_file_change.sh file -m 755 check_hpux_file_change.sh
@ -73,7 +71,7 @@ This is the OS/platform plugin package"
file -m 755 check_hpux_ignite_backup.sh file -m 755 check_hpux_ignite_backup.sh
file -m 755 check_hpux_ioscan.sh file -m 755 check_hpux_ioscan.sh
file -m 755 check_hpux_guid_status.sh file -m 755 check_hpux_guid_status.sh
file -m 755 check_hpux_hpvm_vpar_status.sh file -m 644 check_hpux_hpvm_vpar_status.sh
file -m 755 check_hpux_httpd_status.sh file -m 755 check_hpux_httpd_status.sh
file -m 755 check_hpux_kernel_params.sh file -m 755 check_hpux_kernel_params.sh
file -m 755 check_hpux_kernel_usage.sh file -m 755 check_hpux_kernel_usage.sh
@ -85,10 +83,14 @@ This is the OS/platform plugin package"
file -m 755 check_hpux_postfix_status.sh file -m 755 check_hpux_postfix_status.sh
file -m 755 check_hpux_root_crontab.sh file -m 755 check_hpux_root_crontab.sh
file -m 755 check_hpux_sfm_status.sh file -m 755 check_hpux_sfm_status.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_sshd_status.sh
file -m 755 check_hpux_syslog.sh file -m 755 check_hpux_syslog.sh
file -m 755 check_hpux_syslogd_status.sh file -m 755 check_hpux_syslogd_status.sh
file -m 755 check_hpux_uptime.sh
file -m 755 check_hpux_vg_minor_number.sh file -m 755 check_hpux_vg_minor_number.sh
end end
@ -104,10 +106,7 @@ This is the OS/platform plugin package"
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../etc/opt/hc/=/etc/opt/hc directory ../../configs/etc/=/etc/opt/hc
file -m 644 check_hpux_autofs.conf.dist
file -m 644 check_hpux_cron_status.conf.dist
file -m 644 check_hpux_defunct_processes.conf.dist
file -m 644 check_hpux_drd_status.conf.dist file -m 644 check_hpux_drd_status.conf.dist
file -m 644 check_hpux_file_age.conf.dist file -m 644 check_hpux_file_age.conf.dist
file -m 644 check_hpux_file_change.conf.dist file -m 644 check_hpux_file_change.conf.dist
@ -119,12 +118,15 @@ This is the OS/platform plugin package"
file -m 644 check_hpux_kernel_params.conf.dist file -m 644 check_hpux_kernel_params.conf.dist
file -m 644 check_hpux_kernel_usage.conf.dist file -m 644 check_hpux_kernel_usage.conf.dist
file -m 644 check_hpux_ntp_status.conf.dist file -m 644 check_hpux_ntp_status.conf.dist
file -m 644 check_hpux_ovpa_status.conf.dist file -m 755 check_hpux_ovpa_status.conf.dist
file -m 644 check_hpux_patch_version.conf.dist file -m 755 check_hpux_patch_version.conf.dist
file -m 644 check_hpux_root_crontab.conf.dist file -m 644 check_hpux_root_crontab.conf.dist
file -m 644 check_hpux_sfm_status.conf.dist file -m 644 check_hpux_sfm_status.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 file -m 644 check_hpux_syslog.conf.dist
file -m 644 check_hpux_uptime.conf.dist
end end
fileset fileset
@ -139,7 +141,7 @@ This is the OS/platform plugin package"
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../etc/opt/hc/core/templates=/etc/opt/hc/core/templates directory ../../configs/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_fs_mounts_options
file -m 644 mail_body.tpl-check_hpux_ioscan 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_ovpa_status

View File

@ -58,7 +58,7 @@ This is the core EIF plugin package"
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../opt/hc/lib/core=/opt/hc/lib/core directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 notify_eif.sh file -m 755 notify_eif.sh
end end
@ -74,7 +74,7 @@ This is the core EIF plugin package"
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../etc/opt/hc/core/providers=/etc/opt/hc/core/providers directory ../../configs/etc/core/providers=/etc/opt/hc/core/providers
file -m 644 notify_eif.conf.dist file -m 644 notify_eif.conf.dist
end end
end end

View File

@ -1,80 +0,0 @@
# 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-SLACK
title "The Health Checker (HC) for UNIX (core SLACK plugin)"
os_name HP-UX
revision %BUILD_DATE%
architecture HP-UX_B.11_32/64
machine_type ia64*
vendor_tag KUDOS
contents HC-NOTIFY-SLACK-MAIN,r=,a=,v=
end
# Product definitions:
product
tag HC-NOTIFY-SLACK-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 SLACK 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_slack.postinstall
postremove scripts/hc_notify_slack.postremove
# Fileset definitions:
fileset
tag core_plugins
title UX Health Checker (core SLACK 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 ../../../opt/hc/lib/core=/opt/hc/lib/core
file -m 755 notify_slack.sh
end
fileset
tag config
title UX Health Checker (core SLACK plugins: configuration)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-NOTIFY-SLACK-MAIN.core_plugins
file_permissions -u 0222 -o root -g sys
directory ../../../etc/opt/hc/core/providers=/etc/opt/hc/core/providers
file -m 644 notify_slack.conf.dist
end
end

View File

@ -1,51 +0,0 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-install script for HC-NOTIFY-SLACK SD package
#******************************************************************************
# @(#) Copyright (C) 2022 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_slack.conf ]]
then
cp -p ${HC_ETC_DIR}/core/providers/notify_slack.conf.dist ${HC_ETC_DIR}/core/providers/notify_slack.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

@ -1,48 +0,0 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) post-remove script for HC-NOTIFY-SLACK SD package
#******************************************************************************
# @(#) Copyright (C) 2022 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_slack.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

@ -58,7 +58,7 @@ This is the core SMS plugin package"
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../opt/hc/lib/core=/opt/hc/lib/core directory ../../sources/lib/core=/opt/hc/lib/core
file -m 755 notify_sms.sh file -m 755 notify_sms.sh
end end
@ -74,7 +74,7 @@ This is the core SMS plugin package"
file_permissions -u 0222 -o root -g sys file_permissions -u 0222 -o root -g sys
directory ../../../etc/opt/hc/core/providers=/etc/opt/hc/core/providers directory ../../configs/etc/core/providers=/etc/opt/hc/core/providers
file -m 644 notify_sms.conf.dist file -m 644 notify_sms.conf.dist
end end
end end

View File

@ -1,33 +0,0 @@
# -- post-install --
post_install() {
# ------------------------- 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"
}
# -- post-remove --
post_remove() {
# ------------------------- 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"
}

View File

@ -1,22 +0,0 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-display-csv"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX (CSV display core plugin)"
arch=("any")
url="https://github.com/patvdv/${_pkgname}"
license=('GPL3')
makedepends=('git')
depends=('hc-linux')
source=("${_pkgname}::git+${url}.git#branch=master")
install=".install"
sha256sums=('SKIP')
package() {
cd "${srcdir}/${_pkgname}"
install -d -m 755 ${pkgdir}/opt/hc/lib
install -d -m 755 ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/display_csv.sh ${pkgdir}/opt/hc/lib/core/display_csv.sh
}

View File

@ -1,33 +0,0 @@
# -- post-install --
post_install() {
# ------------------------- 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"
}
# -- post-remove --
post_remove() {
# ------------------------- 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"
}

View File

@ -1,22 +0,0 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-display-init"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX (init display core plugin)"
arch=("any")
url="https://github.com/patvdv/${_pkgname}"
license=('GPL3')
makedepends=('git')
depends=('hc-linux')
source=("${_pkgname}::git+${url}.git#branch=master")
install=".install"
sha256sums=('SKIP')
package() {
cd "${srcdir}/${_pkgname}"
install -d -m 755 ${pkgdir}/opt/hc/lib
install -d -m 755 ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/display_init.sh ${pkgdir}/opt/hc/lib/core/display_init.sh
}

View File

@ -1,33 +0,0 @@
# -- post-install --
post_install() {
# ------------------------- 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"
}
# -- post-remove --
post_remove() {
# ------------------------- 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"
}

View File

@ -1,22 +0,0 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-display-json"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX (JSON display core plugin)"
arch=("any")
url="https://github.com/patvdv/${_pkgname}"
license=('GPL3')
makedepends=('git')
depends=('hc-linux')
source=("${_pkgname}::git+${url}.git#branch=master")
install=".install"
sha256sums=('SKIP')
package() {
cd "${srcdir}/${_pkgname}"
install -d -m 755 ${pkgdir}/opt/hc/lib
install -d -m 755 ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/display_json.sh ${pkgdir}/opt/hc/lib/core/display_json.sh
}

View File

@ -1,33 +0,0 @@
# -- post-install --
post_install() {
# ------------------------- 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"
}
# -- post-remove --
post_remove() {
# ------------------------- 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"
}

View File

@ -1,22 +0,0 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-display-terse"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX (terse display core plugin)"
arch=("any")
url="https://github.com/patvdv/${_pkgname}"
license=('GPL3')
makedepends=('git')
depends=('hc-linux')
source=("${_pkgname}::git+${url}.git#branch=master")
install=".install"
sha256sums=('SKIP')
package() {
cd "${srcdir}/${_pkgname}"
install -d -m 755 ${pkgdir}/opt/hc/lib
install -d -m 755 ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/display_terse.sh ${pkgdir}/opt/hc/lib/core/display_terse.sh
}

View File

@ -1,33 +0,0 @@
# -- post-install --
post_install() {
# ------------------------- 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"
}
# -- post-remove --
post_remove() {
# ------------------------- 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"
}

View File

@ -1,22 +0,0 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-display-zenoss"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX (ZENOSS display core plugin)"
arch=("any")
url="https://github.com/patvdv/${_pkgname}"
license=('GPL3')
makedepends=('git')
depends=('hc-linux')
source=("${_pkgname}::git+${url}.git#branch=master")
install=".install"
sha256sums=('SKIP')
package() {
cd "${srcdir}/${_pkgname}"
install -d -m 755 ${pkgdir}/opt/hc/lib
install -d -m 755 ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/display_zenoss.sh ${pkgdir}/opt/hc/lib/core/display_zenoss.sh
}

View File

@ -1,33 +0,0 @@
# -- post-install --
post_install() {
# ------------------------- 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"
}
# -- post-remove --
post_remove() {
# ------------------------- 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"
}

View File

@ -1,76 +0,0 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-linux-platform"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX (platform plugins)"
arch=("any")
url="https://github.com/patvdv/${_pkgname}"
license=('GPL3')
makedepends=('git')
depends=('hc-linux')
source=("${_pkgname}::git+${url}.git#branch=master")
install=".install"
sha256sums=('SKIP')
package() {
cd "${srcdir}/${_pkgname}"
install -d -m 755 ${pkgdir}/opt/hc/lib
install -d -m 755 ${pkgdir}/opt/hc/lib/platform
install -d -m 755 ${pkgdir}/opt/hc/lib/platform/linux
install -D -m 755 opt/hc/lib/platform/linux/check_linux_autofs.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_autofs.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_burp_backup.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_burp_backup.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_burp_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_burp_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_dovecot_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_dovecot_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_es_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_es_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_fail2ban_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_fail2ban_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_fetchmail_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_fetchmail_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_file_age.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_file_age.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_file_change.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_file_change.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_fs_mounts.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_fs_mounts.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_fs_usage.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_fs_usage.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_httpd_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_httpd_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_mysqld_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_mysqld_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_named_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_named_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_ntp_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_ntp_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_postfix_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_postfix_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_samba_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_samba_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_shorewall_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_shorewall_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_sshd_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_sshd_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_winbind_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_winbind_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_hpasmcli.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_hpasmcli.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_hpacucli.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_hpacucli.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_hplog.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_hplog.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_hpssacli.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_hpssacli.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_process_limits.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_process_limits.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_root_crontab.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_root_crontab.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_uptime.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_uptime.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_vz_ct_counters.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_vz_ct_counters.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_vz_ct_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_vz_ct_status.sh
install -d -m 755 ${pkgdir}/etc/opt/hc
install -D -m 644 etc/opt/hc/check_linux_autofs.conf.dist ${pkgdir}/etc/opt/hc/check_linux_autofs.conf.dist
install -D -m 644 etc/opt/hc/check_linux_burp_backup.conf.dist ${pkgdir}/etc/opt/hc/check_linux_burp_backup.conf.dist
install -D -m 644 etc/opt/hc/check_linux_es_status.conf.dist ${pkgdir}/etc/opt/hc/check_linux_es_status.conf.dist
install -D -m 644 etc/opt/hc/check_linux_fail2ban_status.conf.dist ${pkgdir}/etc/opt/hc/check_linux_fail2ban_status.conf.dist
install -D -m 644 etc/opt/hc/check_linux_fetchmail_status.conf.dist ${pkgdir}/etc/opt/hc/check_linux_fetchmail_status.conf.dist
install -D -m 644 etc/opt/hc/check_linux_file_age.conf.dist ${pkgdir}/etc/opt/hc/check_linux_file_age.conf.dist
install -D -m 644 etc/opt/hc/check_linux_file_change.conf.dist ${pkgdir}/etc/opt/hc/check_linux_file_change.conf.dist
install -D -m 644 etc/opt/hc/check_linux_fs_usage.conf.dist ${pkgdir}/etc/opt/hc/check_linux_fs_usage.conf.dist
install -D -m 644 etc/opt/hc/check_linux_hpasmcli.conf.dist ${pkgdir}/etc/opt/hc/check_linux_hpasmcli.conf.dist
install -D -m 644 etc/opt/hc/check_linux_hpacucli.conf.dist ${pkgdir}/etc/opt/hc/check_linux_hpacucli.conf.dist
install -D -m 644 etc/opt/hc/check_linux_hplog.conf.dist ${pkgdir}/etc/opt/hc/check_linux_hplog.conf.dist
install -D -m 644 etc/opt/hc/check_linux_hpssacli.conf.dist ${pkgdir}/etc/opt/hc/check_linux_hpssacli.conf.dist
install -D -m 644 etc/opt/hc/check_linux_httpd_status.conf.dist ${pkgdir}/etc/opt/hc/check_linux_httpd_status.conf.dist
install -D -m 644 etc/opt/hc/check_linux_mysqld_status.conf.dist ${pkgdir}/etc/opt/hc/check_linux_mysqld_status.conf.dist
install -D -m 644 etc/opt/hc/check_linux_ntp_status.conf.dist ${pkgdir}/etc/opt/hc/check_linux_ntp_status.conf.dist
install -D -m 644 etc/opt/hc/check_linux_process_limits.conf.dist ${pkgdir}/etc/opt/hc/check_linux_process_limits.conf.dist
install -D -m 644 etc/opt/hc/check_linux_root_crontab.conf.dist ${pkgdir}/etc/opt/hc/check_linux_root_crontab.conf.dist
install -D -m 644 etc/opt/hc/check_linux_uptime.conf.dist ${pkgdir}/etc/opt/hc/check_linux_uptime.conf.dist
install -D -m 644 etc/opt/hc/check_linux_vz_ct_counters.conf.dist ${pkgdir}/etc/opt/hc/check_linux_vz_ct_counters.conf.dist
install -D -m 644 etc/opt/hc/check_linux_vz_ct_status.conf.dist ${pkgdir}/etc/opt/hc/check_linux_vz_ct_status.conf.dist
install -d -m 755 ${pkgdir}/etc/opt/hc/core
install -d -m 755 ${pkgdir}/etc/opt/hc/core/templates
install -D -m 644 etc/opt/hc/core/templates/mail_body.tpl-check_linux_fs_mounts_options ${pkgdir}/etc/opt/hc/core/templates
install -D -m 644 etc/opt/hc/core/templates/mail_body.tpl-check_linux_root_crontab ${pkgdir}/etc/opt/hc/core/templates
}

View File

@ -1,111 +0,0 @@
# -- post-install --
post_install() {
# ------------------------- 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
# set SELinux contexts for logrotate
SESTATUS_BIN=$(command -v sestatus 2>/dev/null)
if [[ -n "${SESTATUS_BIN}" ]]
then
IS_ENFORCING=$(${SESTATUS_BIN} | grep -c "Current mode.*enforcing" 2>/dev/null)
if (( IS_ENFORCING > 0 ))
then
SEMANAGE_BIN=$(command -v semanage 2>/dev/null)
if [[ -n "${SEMANAGE_BIN}" ]]
then
${SEMANAGE_BIN} fcontext -a -t var_log_t "${HC_VAR_DIR}(/check_health\.sh\.log.*)?"
echo "INFO: SELinux fcontexts configured for log rotation"
if [[ -d ${HC_VAR_DIR} ]]
then
RESTORECON_BIN=$(command -v restorecon 2>/dev/null)
if [[ -n "${RESTORECON_BIN}" ]]
then
${RESTORECON_BIN} -Frv ${HC_VAR_DIR}
echo "INFO: SELinux fcontexts set on ${HC_VAR_DIR} for log rotation"
else
echo "WARN: SELinux is set to 'enforcing' but could not found 'restorecon' to set fcontexts for log rotation"
fi
fi
else
echo "WARN: SELinux is set to 'enforcing' but could not found 'semanage' to set fcontexts for log rotation"
fi
fi
fi
echo "INFO: finished post-install script"
}
# -- post-remove --
post_remove() {
# ------------------------- 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 ---------------------------
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"
}

View File

@ -1,41 +0,0 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-linux"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX"
arch=("any")
url="https://github.com/patvdv/${_pkgname}"
license=('GPL3')
makedepends=('git')
source=("${_pkgname}::git+${url}.git#branch=master")
install=".install"
sha256sums=('SKIP')
package() {
cd "${srcdir}/${_pkgname}"
install -d -m 755 ${pkgdir}/opt/hc
install -d -m 755 ${pkgdir}/opt/hc/bin
install -D -m 755 opt/hc/bin/check_health.sh ${pkgdir}/opt/hc/bin
install -d -m 755 ${pkgdir}/opt/hc/lib
install -d -m 755 ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/include_core.sh ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/include_data.sh ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/include_os.sh ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/notify_mail.sh ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/report_std.sh ${pkgdir}/opt/hc/lib/core
install -d -m 755 ${pkgdir}/etc/opt/hc
install -D -m 644 etc/opt/hc/check_host.conf.dist ${pkgdir}/etc/opt/hc
install -d -m 755 ${pkgdir}/etc/opt/hc/core
install -D -m 644 etc/opt/hc/core/check_health.conf.dist ${pkgdir}/etc/opt/hc/core
install -d -m 755 ${pkgdir}/etc/opt/hc/core/providers
install -d -m 755 ${pkgdir}/etc/opt/hc/core/templates
install -D -m 644 etc/opt/hc/core/templates/mail_info.tpl ${pkgdir}/etc/opt/hc/core/templates
install -D -m 644 etc/opt/hc/core/templates/mail_header.tpl ${pkgdir}/etc/opt/hc/core/templates
install -D -m 644 etc/opt/hc/core/templates/mail_body.tpl ${pkgdir}/etc/opt/hc/core/templates
install -D -m 644 etc/opt/hc/core/templates/mail_footer.tpl ${pkgdir}/etc/opt/hc/core/templates
install -d -m 755 ${pkgdir}/var/opt/hc
install -d -m 755 ${pkgdir}/etc/logrotate.d
install -D -m 644 etc/logrotate.d/check_health ${pkgdir}/etc/logrotate.d/check_health
}

View File

@ -1,33 +0,0 @@
# -- post-install --
post_install() {
# ------------------------- 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"
}
# -- post-remove --
post_remove() {
# ------------------------- 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"
}

View File

@ -1,26 +0,0 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-notify-eif"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX (EIF notify core plugin)"
arch=("any")
url="https://github.com/patvdv/${_pkgname}"
license=('GPL3')
makedepends=('git')
depends=('hc-linux')
source=("${_pkgname}::git+${url}.git#branch=master")
install=".install"
sha256sums=('SKIP')
package() {
cd "${srcdir}/${_pkgname}"
install -d -m 755 ${pkgdir}/opt/hc/lib
install -d -m 755 ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/notify_eif.sh ${pkgdir}/opt/hc/lib/core/notify_eif.sh
install -d -m 755 ${pkgdir}/etc/opt/hc
install -d -m 755 ${pkgdir}/etc/opt/hc/core/providers
install -d -m 755 ${pkgdir}/etc/opt/hc/core/providers
install -D -m 644 etc/opt/hc/core/providers/notify_eif.conf.dist ${pkgdir}/etc/opt/hc/core/providers/notify_eif.conf.dist
}

View File

@ -1,33 +0,0 @@
# -- post-install --
post_install() {
# ------------------------- 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"
}
# -- post-remove --
post_remove() {
# ------------------------- 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"
}

View File

@ -1,26 +0,0 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-notify-slack"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX (Slack notify core plugin)"
arch=("any")
url="https://github.com/patvdv/${_pkgname}"
license=('GPL3')
makedepends=('git')
depends=('hc-linux')
source=("${_pkgname}::git+${url}.git#branch=master")
install=".install"
sha256sums=('SKIP')
package() {
cd "${srcdir}/${_pkgname}"
install -d -m 755 ${pkgdir}/opt/hc/lib
install -d -m 755 ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/notify_slack.sh ${pkgdir}/opt/hc/lib/core/notify_slack.sh
install -d -m 755 ${pkgdir}/etc/opt/hc
install -d -m 755 ${pkgdir}/etc/opt/hc/core
install -d -m 755 ${pkgdir}/etc/opt/hc/core/providers
install -D -m 644 etc/opt/hc/core/providers/notify_slack.conf.dist ${pkgdir}/etc/opt/hc/core/providers/notify_slack.conf.dist
}

View File

@ -1,33 +0,0 @@
# -- post-install --
post_install() {
# ------------------------- 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"
}
# -- post-remove --
post_remove() {
# ------------------------- 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"
}

View File

@ -1,26 +0,0 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-notify-sms"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX (SMS notify core plugin)"
arch=("any")
url="https://github.com/patvdv/${_pkgname}"
license=('GPL3')
makedepends=('git')
depends=('hc-linux')
source=("${_pkgname}::git+${url}.git#branch=master")
install=".install"
sha256sums=('SKIP')
package() {
cd "${srcdir}/${_pkgname}"
install -d -m 755 ${pkgdir}/opt/hc/lib
install -d -m 755 ${pkgdir}/opt/hc/lib/core
install -D -m 755 opt/hc/lib/core/notify_sms.sh ${pkgdir}/opt/hc/lib/core/notify_sms.sh
install -d -m 755 ${pkgdir}/etc/opt/hc
install -d -m 755 ${pkgdir}/etc/opt/hc/core
install -d -m 755 ${pkgdir}/etc/opt/hc/core/providers
install -D -m 644 etc/opt/hc/core/providers/notify_sms.conf.dist ${pkgdir}/etc/opt/hc/core/providers/notify_sms.conf.dist
}

View File

@ -1,10 +0,0 @@
Package: hc-display-csv
Version: %BUILD_DATE%
Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 50
Pre-Depends: hc-linux
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX (CSV display core plugin).

View File

@ -1,16 +0,0 @@
#!/bin/bash
# ------------------------- 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 ..."
# debian: reset ownerships
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
# 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"

View File

@ -1,14 +0,0 @@
#!/bin/bash
# ------------------------- 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"

View File

@ -1,10 +0,0 @@
Package: hc-display-init
Version: %BUILD_DATE%
Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 50
Pre-Depends: hc-linux
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX (init display core plugin).

View File

@ -1,16 +0,0 @@
#!/bin/bash
# ------------------------- 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 ..."
# debian: reset ownerships
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
# 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"

View File

@ -1,14 +0,0 @@
#!/bin/bash
# ------------------------- 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"

View File

@ -1,10 +0,0 @@
Package: hc-display-json
Version: %BUILD_DATE%
Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 50
Pre-Depends: hc-linux
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX (JSON display core plugin).

View File

@ -1,16 +0,0 @@
#!/bin/bash
# ------------------------- 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 ..."
# debian: reset ownerships
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
# 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"

View File

@ -1,14 +0,0 @@
#!/bin/bash
# ------------------------- 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"

View File

@ -1,10 +0,0 @@
Package: hc-display-terse
Version: %BUILD_DATE%
Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 50
Pre-Depends: hc-linux
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX (terse display core plugin).

View File

@ -1,16 +0,0 @@
#!/bin/bash
# ------------------------- 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 ..."
# debian: reset ownerships
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
# 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"

View File

@ -1,14 +0,0 @@
#!/bin/bash
# ------------------------- 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"

View File

@ -1,10 +0,0 @@
Package: hc-display-zenoss
Version: %BUILD_DATE%
Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 50
Pre-Depends: hc-linux
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX (Zenoss display core plugin).

View File

@ -1,16 +0,0 @@
#!/bin/bash
# ------------------------- 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 ..."
# debian: reset ownerships
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
# 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"

View File

@ -1,14 +0,0 @@
#!/bin/bash
# ------------------------- 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"

View File

@ -1,2 +0,0 @@
/etc/opt/hc/core/templates/mail_body.tpl-check_linux_fs_mounts_options
/etc/opt/hc/core/templates/mail_body.tpl-check_linux_root_crontab

View File

@ -1,10 +0,0 @@
Package: hc-linux-platform
Version: %BUILD_DATE%
Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 300
Pre-Depends: hc-linux
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX (platform plugins).

View File

@ -1,16 +0,0 @@
#!/bin/bash
# ------------------------- 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 ..."
# debian: reset ownerships
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
# 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"

View File

@ -1,14 +0,0 @@
#!/bin/bash
# ------------------------- 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"

View File

@ -1,4 +0,0 @@
/etc/opt/hc/core/templates/mail_body.tpl
/etc/opt/hc/core/templates/mail_footer.tpl
/etc/opt/hc/core/templates/mail_header.tpl
/etc/opt/hc/core/templates/mail_info.tpl

View File

@ -1,10 +0,0 @@
Package: hc-linux
Version: %BUILD_DATE%
Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 300
Depends: ksh, aptitude
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX.

View File

@ -1,84 +0,0 @@
#!/bin/bash
# ------------------------- 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 ..."
# debian: reset ownerships & permissions
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
chown root:root /etc/logrotate.d/check_health 2>/dev/null
chmod 644 /etc/logrotate.d/check_health 2>/dev/null
# copy configuration files
if [[ -f ${HC_ETC_DIR}/core/check_health.conf.dist ]]
then
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
else
echo "WARN: could not check_health config .dist file in ${HC_ETC_DIR}/core"
fi
if [[ -f ${HC_ETC_DIR}/check_host.conf.dist ]]
then
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
else
echo "WARN: could not find check_host config .dist file in ${HC_ETC_DIR}"
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
# set SELinux contexts for logrotate
SESTATUS_BIN=$(command -v sestatus 2>/dev/null)
if [[ -n "${SESTATUS_BIN}" ]]
then
IS_ENFORCING=$(${SESTATUS_BIN} | grep -c "Current mode.*enforcing" 2>/dev/null)
if (( IS_ENFORCING > 0 ))
then
SEMANAGE_BIN=$(command -v semanage 2>/dev/null)
if [[ -n "${SEMANAGE_BIN}" ]]
then
${SEMANAGE_BIN} fcontext -a -t var_log_t "${HC_VAR_DIR}(/check_health\.sh\.log.*)?"
echo "INFO: SELinux fcontexts configured for log rotation"
if [[ -d ${HC_VAR_DIR} ]]
then
RESTORECON_BIN=$(command -v restorecon 2>/dev/null)
if [[ -n "${RESTORECON_BIN}" ]]
then
${RESTORECON_BIN} -Frv ${HC_VAR_DIR}
echo "INFO: SELinux fcontexts set on ${HC_VAR_DIR} for log rotation"
else
echo "WARN: SELinux is set to 'enforcing' but could not found 'restorecon' to set fcontexts for log rotation"
fi
fi
else
echo "WARN: SELinux is set to 'enforcing' but could not found 'semanage' to set fcontexts for log rotation"
fi
fi
fi
echo "INFO: finished post-install script"

View File

@ -1,37 +0,0 @@
#!/bin/bash
# ------------------------- 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 ---------------------------
echo "INFO: starting post-uninstall script ..."
if [[ -d ${HC_DIR} ]]
then
# remove all symlinks
find ${HC_DIR} -type l -exec rm -f {} \; 2>/dev/null
(( $? == 0 )) || echo "WARN: failed to remove symlinks in ${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"

View File

@ -1,10 +0,0 @@
Package: hc-notify-eif
Version: %BUILD_DATE%
Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 50
Pre-Depends: hc-linux
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX (EIF notify core plugin).

View File

@ -1,33 +0,0 @@
#!/bin/bash
# ------------------------- 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 ..."
# debian: reset ownerships
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
# copy plugin configuration file
if [[ -f ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist ]]
then
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
else
echo "WARN: could not find plugin config .dist file in ${HC_ETC_DIR}/core/providers"
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"

View File

@ -1,32 +0,0 @@
#!/bin/bash
# ------------------------- 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"

View File

@ -1,10 +0,0 @@
Package: hc-notify-slack
Version: %BUILD_DATE%
Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 50
Pre-Depends: hc-linux
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX (Slack notify core plugin).

View File

@ -1,33 +0,0 @@
#!/bin/bash
# ------------------------- 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 ..."
# debian: reset ownerships
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
# copy plugin configuration file
if [[ -f ${HC_ETC_DIR}/core/providers/notify_slack.conf.dist ]]
then
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_slack.conf ]]
then
cp -p ${HC_ETC_DIR}/core/providers/notify_slack.conf.dist ${HC_ETC_DIR}/core/providers/notify_slack.conf >/dev/null
(( $? == 0 )) || \
{
echo "ERROR: could not copy plugin config file in ${HC_ETC_DIR}/core/providers"
exit 1
}
fi
else
echo "WARN: could not find plugin config .dist file in ${HC_ETC_DIR}/core/providers"
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"

View File

@ -1,32 +0,0 @@
#!/bin/bash
# ------------------------- 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_slack.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"

View File

@ -1,10 +0,0 @@
Package: hc-notify-sms
Version: %BUILD_DATE%
Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 50
Pre-Depends: hc-linux
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX (SMS notify core plugin).

View File

@ -1,33 +0,0 @@
#!/bin/bash
# ------------------------- 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 ..."
# debian: reset ownerships
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
# copy plugin configuration file
if [[ -f ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist ]]
then
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
else
echo "WARN: could not find plugin config .dist file in ${HC_ETC_DIR}/core/providers"
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"

View File

@ -1,32 +0,0 @@
#!/bin/bash
# ------------------------- 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"

View File

@ -26,7 +26,7 @@ This package contains core plugins (display).
rm -rf $RPM_BUILD_ROOT 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
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/opt/hc/lib/core/display_csv.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_csv.sh cp ../SOURCES/lib/core/display_csv.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_csv.sh
%post %post
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
@ -65,7 +65,5 @@ echo "INFO: finished post-uninstall script"
%attr(755, root, root) /opt/hc/lib/core/display_csv.sh %attr(755, root, root) /opt/hc/lib/core/display_csv.sh
%changelog %changelog
* Tue Mar 26 2019 <patrick@kudos.be> - 0.1.0
- New git tree organization
* Sat May 06 2017 <patrick@kudos.be> - 0.0.1 * Sat May 06 2017 <patrick@kudos.be> - 0.0.1
- Initial build - Initial build

View File

@ -26,7 +26,7 @@ This package contains core plugins (display).
rm -rf $RPM_BUILD_ROOT 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
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/opt/hc/lib/core/display_init.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_init.sh cp ../SOURCES/lib/core/display_init.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_init.sh
%post %post
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
@ -65,7 +65,5 @@ echo "INFO: finished post-uninstall script"
%attr(755, root, root) /opt/hc/lib/core/display_init.sh %attr(755, root, root) /opt/hc/lib/core/display_init.sh
%changelog %changelog
* Tue Mar 26 2019 <patrick@kudos.be> - 0.1.0
- New git tree organization
* Mon May 08 2017 <patrick@kudos.be> - 0.0.1 * Mon May 08 2017 <patrick@kudos.be> - 0.0.1
- Initial build - Initial build

View File

@ -26,7 +26,7 @@ This package contains core plugins (display).
rm -rf $RPM_BUILD_ROOT 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
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/opt/hc/lib/core/display_json.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_json.sh cp ../SOURCES/lib/core/display_json.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_json.sh
%post %post
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
@ -65,7 +65,5 @@ echo "INFO: finished post-uninstall script"
%attr(755, root, root) /opt/hc/lib/core/display_json.sh %attr(755, root, root) /opt/hc/lib/core/display_json.sh
%changelog %changelog
* Tue Mar 26 2019 <patrick@kudos.be> - 0.1.0
- New git tree organization
* Sun May 20 2018 <patrick@kudos.be> - 0.0.1 * Sun May 20 2018 <patrick@kudos.be> - 0.0.1
- Initial build - Initial build

View File

@ -26,7 +26,7 @@ This package contains core plugins (display).
rm -rf $RPM_BUILD_ROOT 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
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/opt/hc/lib/core/display_terse.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_terse.sh cp ../SOURCES/lib/core/display_terse.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_terse.sh
%post %post
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
@ -65,7 +65,5 @@ echo "INFO: finished post-uninstall script"
%attr(755, root, root) /opt/hc/lib/core/display_terse.sh %attr(755, root, root) /opt/hc/lib/core/display_terse.sh
%changelog %changelog
* Tue Mar 26 2019 <patrick@kudos.be> - 0.1.0
- New git tree organization
* Sat May 06 2017 <patrick@kudos.be> - 0.0.1 * Sat May 06 2017 <patrick@kudos.be> - 0.0.1
- Initial build - Initial build

View File

@ -26,7 +26,7 @@ This package contains core plugins (display).
rm -rf $RPM_BUILD_ROOT 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
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/opt/hc/lib/core/display_zenoss.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_zenoss.sh cp ../SOURCES/lib/core/display_zenoss.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_zenoss.sh
%post %post
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
@ -65,7 +65,5 @@ echo "INFO: finished post-uninstall script"
%attr(755, root, root) /opt/hc/lib/core/display_zenoss.sh %attr(755, root, root) /opt/hc/lib/core/display_zenoss.sh
%changelog %changelog
* Tue Mar 26 2019 <patrick@kudos.be> - 0.1.0
- New git tree organization
* Tue Dec 19 2017 <patrick@kudos.be> - 0.0.1 * Tue Dec 19 2017 <patrick@kudos.be> - 0.0.1
- Initial build - Initial build

View File

@ -1,10 +1,10 @@
%define build_timestamp %(date +"%Y%m%d") %define build_timestamp %(date +"%Y%m%d")
Name: hc-clusterware-platform Name: hc-kudos
Version: %{build_timestamp} Version: %{build_timestamp}
Release: 1 Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (Clusterware plugins) Summary: The KUDOS Health Checker (HC) for UNIX (KUDOS plugins)
Group: Tools/Monitoring Group: Tools/Monitoring
License: GNU General Public License either version 2 of the License, or (at your option) any later version License: GNU General Public License either version 2 of the License, or (at your option) any later version
@ -16,7 +16,7 @@ BuildRoot: %{_topdir}/%{name}-%{version}-root
%description %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. 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 Serviceguard platform specific plugins. This package contains the KUDOS specific plugins.
%prep %prep
@ -25,15 +25,12 @@ This package contains Serviceguard platform specific plugins.
%install %install
rm -rf $RPM_BUILD_ROOT 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
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/customer
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform/clusterware install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/customer/kudos
cp ../SOURCES/opt/hc/lib/platform/clusterware/check_clusterware_resource_config.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/clusterware/check_clusterware_resource_config.sh cp ../SOURCES/lib/customer/kudos/check_kudos_kapow_credits.sh $RPM_BUILD_ROOT/opt/hc/lib/customer/kudos/check_kudos_kapow_credits.sh
cp ../SOURCES/opt/hc/lib/platform/clusterware/check_clusterware_resource_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/clusterware/check_clusterware_resource_status.sh
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
cp ../SOURCES/etc/opt/hc/check_clusterware_resource_config.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_clusterware_resource_config.conf.dist cp ../SOURCES/etc/check_kudos_kapow_credits.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_kudos_kapow_credits.conf.dist
cp ../SOURCES/etc/opt/hc/check_clusterware_resource_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_clusterware_resource_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
%post %post
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
@ -56,28 +53,24 @@ echo "INFO: finished post-install script"
HC_BIN="/opt/hc/bin/check_health.sh" HC_BIN="/opt/hc/bin/check_health.sh"
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin" PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
echo "INFO: starting post-uninstall script ..." echo "INFO: starting post-install script ..."
# refresh symbolic FPATH links # refresh symbolic FPATH links
if [[ -x ${HC_BIN} ]] if [[ -x ${HC_BIN} ]]
then then
${HC_BIN} --fix-symlinks ${HC_BIN} --fix-symlinks
(( $? == 0 )) || echo "WARN: updating symlinks failed" (( $? == 0 )) || echo "WARN: updating symlinks failed"
fi fi
echo "INFO: finished post-uninstall script" echo "INFO: finished post-install script"
%files %files
%defattr(-,root,root,755) %defattr(-,root,root,755)
%dir /opt/hc/lib %dir /opt/hc/lib
%dir /opt/hc/lib/platform %dir /opt/hc/lib/customer
%dir /opt/hc/lib/platform/clusterware %dir /opt/hc/lib/customer/kudos
%attr(755, root, root) /opt/hc/lib/platform/clusterware/check_clusterware_resource_config.sh %attr(755, root, root) /opt/hc/lib/customer/kudos/check_kudos_kapow_credits.sh
%attr(755, root, root) /opt/hc/lib/platform/clusterware/check_clusterware_resource_status.sh
%dir /etc/opt/hc %dir /etc/opt/hc
%attr(644, root, root) /etc/opt/hc/check_clusterware_resource_config.conf.dist %attr(644, root, root) /etc/opt/hc/check_kudos_kapow_credits.conf.dist
%attr(644, root, root) /etc/opt/hc/check_clusterware_resource_status.conf.dist
%dir /etc/opt/hc/core
%dir /etc/opt/hc/core/templates
%changelog %changelog
* Sat Apr 20 2019 <patrick@kudos.be> - 0.0.1 * Fri Nov 11 2016 <patrick@kudos.be> - 0.0.1
- Initial build - Initial build

View File

@ -27,60 +27,59 @@ 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
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform/linux install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform/linux
cp ../SOURCES/opt/hc/lib/platform/linux/check_linux_autofs.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_autofs.sh 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/opt/hc/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_burp_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_burp_status.sh
cp ../SOURCES/opt/hc/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_es_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_es_status.sh
cp ../SOURCES/opt/hc/lib/platform/linux/check_linux_dovecot_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_dovecot_status.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/opt/hc/lib/platform/linux/check_linux_es_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_es_status.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/opt/hc/lib/platform/linux/check_linux_fail2ban_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_fail2ban_status.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/opt/hc/lib/platform/linux/check_linux_fetchmail_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_fetchmail_status.sh cp ../SOURCES/lib/platform/linux/check_linux_fs_usage.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_fs_usage.sh
cp ../SOURCES/opt/hc/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_httpd_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_httpd_status.sh
cp ../SOURCES/opt/hc/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_mysqld_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_mysqld_status.sh
cp ../SOURCES/opt/hc/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_named_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_named_status.sh
cp ../SOURCES/opt/hc/lib/platform/linux/check_linux_fs_usage.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_fs_usage.sh cp ../SOURCES/lib/platform/linux/check_linux_ntp_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_ntp_status.sh
cp ../SOURCES/opt/hc/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_postfix_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_postfix_status.sh
cp ../SOURCES/opt/hc/lib/platform/linux/check_linux_mysqld_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_mysqld_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/opt/hc/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_shorewall_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_shorewall_status.sh
cp ../SOURCES/opt/hc/lib/platform/linux/check_linux_ntp_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_ntp_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/opt/hc/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_winbind_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_winbind_status.sh
cp ../SOURCES/opt/hc/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_hpasmcli.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_hpasmcli.sh
cp ../SOURCES/opt/hc/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_hpacucli.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_hpacucli.sh
cp ../SOURCES/opt/hc/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_hplog.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_hplog.sh
cp ../SOURCES/opt/hc/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_hpssacli.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_hpssacli.sh
cp ../SOURCES/opt/hc/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_process_limits.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_process_limits.sh
cp ../SOURCES/opt/hc/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_root_crontab.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_root_crontab.sh
cp ../SOURCES/opt/hc/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_sg_cluster_config.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_sg_cluster_config.sh
cp ../SOURCES/opt/hc/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_sg_cluster_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_sg_cluster_status.sh
cp ../SOURCES/opt/hc/lib/platform/linux/check_linux_process_limits.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_process_limits.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/opt/hc/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_package_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_sg_package_status.sh
cp ../SOURCES/opt/hc/lib/platform/linux/check_linux_uptime.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_uptime.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/opt/hc/lib/platform/linux/check_linux_vz_ct_counters.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_vz_ct_counters.sh cp ../SOURCES/lib/platform/linux/check_linux_vz_ct_counters.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_vz_ct_counters.sh
cp ../SOURCES/opt/hc/lib/platform/linux/check_linux_vz_ct_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_vz_ct_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 install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
cp ../SOURCES/etc/opt/hc/check_linux_autofs.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_autofs.conf.dist cp ../SOURCES/etc/check_linux_burp_backup.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_burp_backup.conf.dist
cp ../SOURCES/etc/opt/hc/check_linux_burp_backup.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_burp_backup.conf.dist cp ../SOURCES/etc/check_linux_es_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_es_status.conf.dist
cp ../SOURCES/etc/opt/hc/check_linux_es_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_es_status.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/opt/hc/check_linux_fail2ban_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_fail2ban_status.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/opt/hc/check_linux_fetchmail_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_fetchmail_status.conf.dist cp ../SOURCES/etc/check_linux_fs_usage.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_fs_usage.conf.dist
cp ../SOURCES/etc/opt/hc/check_linux_file_age.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_file_age.conf.dist cp ../SOURCES/etc/check_linux_hpasmcli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpasmcli.conf.dist
cp ../SOURCES/etc/opt/hc/check_linux_file_change.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_file_change.conf.dist cp ../SOURCES/etc/check_linux_hpacucli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpacucli.conf.dist
cp ../SOURCES/etc/opt/hc/check_linux_fs_usage.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_fs_usage.conf.dist cp ../SOURCES/etc/check_linux_hplog.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hplog.conf.dist
cp ../SOURCES/etc/opt/hc/check_linux_hpasmcli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpasmcli.conf.dist cp ../SOURCES/etc/check_linux_hpssacli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpssacli.conf.dist
cp ../SOURCES/etc/opt/hc/check_linux_hpacucli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpacucli.conf.dist cp ../SOURCES/etc/check_linux_mysqld_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_mysqld_status.conf.dist
cp ../SOURCES/etc/opt/hc/check_linux_hplog.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hplog.conf.dist cp ../SOURCES/etc/check_linux_ntp_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_ntp_status.conf.dist
cp ../SOURCES/etc/opt/hc/check_linux_hpssacli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpssacli.conf.dist cp ../SOURCES/etc/check_linux_process_limits.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_process_limits.conf.dist
cp ../SOURCES/etc/opt/hc/check_linux_httpd_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_httpd_status.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/opt/hc/check_linux_mysqld_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_mysqld_status.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/opt/hc/check_linux_ntp_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_ntp_status.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/opt/hc/check_linux_process_limits.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_process_limits.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/opt/hc/check_linux_root_crontab.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_root_crontab.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/opt/hc/check_linux_uptime.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_uptime.conf.dist cp ../SOURCES/etc/check_linux_vz_ct_counters.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_vz_ct_counters.conf.dist
cp ../SOURCES/etc/opt/hc/check_linux_vz_ct_counters.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_vz_ct_counters.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
cp ../SOURCES/etc/opt/hc/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
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/templates install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/templates
cp ../SOURCES/etc/opt/hc/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_fs_mounts_options $RPM_BUILD_ROOT/etc/opt/hc/core/templates
cp ../SOURCES/etc/opt/hc/core/templates/mail_body.tpl-check_linux_root_crontab $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 %post
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
@ -117,13 +116,9 @@ echo "INFO: finished post-uninstall script"
%dir /opt/hc/lib %dir /opt/hc/lib
%dir /opt/hc/lib/platform %dir /opt/hc/lib/platform
%dir /opt/hc/lib/platform/linux %dir /opt/hc/lib/platform/linux
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_autofs.sh
%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_burp_backup.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_burp_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_dovecot_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_es_status.sh %attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_es_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_fail2ban_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_fetchmail_status.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_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_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_fs_mounts.sh
@ -143,15 +138,16 @@ echo "INFO: finished post-uninstall script"
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_hpssacli.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_process_limits.sh %attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_process_limits.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_root_crontab.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_uptime.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_counters.sh %attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_vz_ct_counters.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_vz_ct_status.sh %attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_vz_ct_status.sh
%dir /etc/opt/hc %dir /etc/opt/hc
%attr(644, root, root) /etc/opt/hc/check_linux_autofs.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_burp_backup.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_burp_backup.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_es_status.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_es_status.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_fail2ban_status.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_fetchmail_status.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_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_file_change.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_fs_usage.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_fs_usage.conf.dist
@ -159,12 +155,14 @@ echo "INFO: finished post-uninstall script"
%attr(644, root, root) /etc/opt/hc/check_linux_hpacucli.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_hplog.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_hpssacli.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_hpssacli.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_httpd_status.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_mysqld_status.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_mysqld_status.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_ntp_status.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_ntp_status.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_process_limits.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_process_limits.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_root_crontab.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_root_crontab.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_uptime.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_counters.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_vz_ct_counters.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_vz_ct_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
@ -173,21 +171,6 @@ echo "INFO: finished post-uninstall script"
%attr(644, root, root) /etc/opt/hc/core/templates/mail_body.tpl-check_linux_root_crontab %attr(644, root, root) /etc/opt/hc/core/templates/mail_body.tpl-check_linux_root_crontab
%changelog %changelog
* Sat Dec 26 2020 <patrick@kudos.be> - 0.3.5
- Added check_linux_fetchmail_status plugin
- Added check_linux_dovecot_status plugin
* Mon Dec 21 2020 <patrick@kudos.be> - 0.3.4
- Added check_linux_uptime plugin
* Fri Oct 18 2020 <patrick@kudos.be> - 0.3.3
- Added check_linux_fail2ban_status plugin
* Fri Nov 1 2019 <patrick@kudos.be> - 0.3.2
- Added configuration file for check_linux_httpd_status plugin
* Sun Jul 14 2019 <patrick@kudos.be> - 0.3.1
- Removed check_linux_autofs plugin
* Sat Apr 20 2019 <patrick@kudos.be> - 0.3.0
- Removed Serviceguard plugins
* Tue Mar 26 2019 <patrick@kudos.be> - 0.2.0
- New git tree organization
* Sat Mar 09 2019 <patrick@kudos.be> - 0.1.5 * Sat Mar 09 2019 <patrick@kudos.be> - 0.1.5
- Added check_linux_es_status - Added check_linux_es_status
* Sun Feb 10 2019 <patrick@kudos.be> - 0.1.4 * Sun Feb 10 2019 <patrick@kudos.be> - 0.1.4

View File

@ -27,7 +27,7 @@ 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
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/security install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/security
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/security install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/security
cp ../SOURCES/opt/hc/lib/security/check_all_ssh_controls.sh $RPM_BUILD_ROOT/opt/hc/lib/security/check_all_ssh_controls.sh 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
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/templates install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/templates
@ -68,7 +68,5 @@ echo "INFO: finished post-install script"
%attr(755, root, root) /opt/hc/lib/security/check_all_ssh_controls.sh %attr(755, root, root) /opt/hc/lib/security/check_all_ssh_controls.sh
%changelog %changelog
* Tue Mar 26 2019 <patrick@kudos.be> - 0.1.0
- New git tree organization
* Fri Jan 01 2016 <patrick@kudos.be> - 0.0.1 * Fri Jan 01 2016 <patrick@kudos.be> - 0.0.1
- Initial build - Initial build

View File

@ -25,27 +25,27 @@ The Health Checker is collection of scripts (plugins) designed to perform regula
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/opt/hc install -d -m 755 $RPM_BUILD_ROOT/opt/hc
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/bin install -d -m 755 $RPM_BUILD_ROOT/opt/hc/bin
cp ../SOURCES/opt/hc/bin/check_health.sh $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
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/opt/hc/lib/core/include_core.sh $RPM_BUILD_ROOT/opt/hc/lib/core cp ../SOURCES/lib/core/include_core.sh $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/opt/hc/lib/core/include_data.sh $RPM_BUILD_ROOT/opt/hc/lib/core cp ../SOURCES/lib/core/include_data.sh $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/opt/hc/lib/core/include_os.sh $RPM_BUILD_ROOT/opt/hc/lib/core cp ../SOURCES/lib/core/include_os.sh $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/opt/hc/lib/core/notify_mail.sh $RPM_BUILD_ROOT/opt/hc/lib/core cp ../SOURCES/lib/core/notify_mail.sh $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/opt/hc/lib/core/report_std.sh $RPM_BUILD_ROOT/opt/hc/lib/core cp ../SOURCES/lib/core/report_std.sh $RPM_BUILD_ROOT/opt/hc/lib/core
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
cp ../SOURCES/etc/opt/hc/check_host.conf.dist $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 install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core
cp ../SOURCES/etc/opt/hc/core/check_health.conf.dist $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/providers
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/templates install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/templates
cp ../SOURCES/etc/opt/hc/core/templates/mail_info.tpl $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/opt/hc/core/templates/mail_header.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/opt/hc/core/templates/mail_body.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/opt/hc/core/templates/mail_footer.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 install -d -m 755 $RPM_BUILD_ROOT/var/opt/hc
install -d -m 755 $RPM_BUILD_ROOT/etc/logrotate.d install -d -m 755 $RPM_BUILD_ROOT/etc/logrotate.d
cp ../SOURCES/etc/logrotate.d/check_health $RPM_BUILD_ROOT/etc/logrotate.d/check_health cp ../SOURCES/logrotate.d/check_health $RPM_BUILD_ROOT/etc/logrotate.d/check_health
%post %post
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
@ -88,34 +88,6 @@ then
else else
echo "ERROR: could not locate or excute the HC main script (${HC_BIN})" echo "ERROR: could not locate or excute the HC main script (${HC_BIN})"
fi fi
# set SELinux contexts for logrotate
SESTATUS_BIN=$(command -v sestatus 2>/dev/null)
if [[ -n "${SESTATUS_BIN}" ]]
then
IS_ENFORCING=$(${SESTATUS_BIN} | grep -c "Current mode.*enforcing" 2>/dev/null)
if (( IS_ENFORCING > 0 ))
then
SEMANAGE_BIN=$(command -v semanage 2>/dev/null)
if [[ -n "${SEMANAGE_BIN}" ]]
then
${SEMANAGE_BIN} fcontext -a -t var_log_t "${HC_VAR_DIR}(/check_health\.sh\.log.*)?"
echo "INFO: SELinux fcontexts configured for log rotation"
if [[ -d ${HC_VAR_DIR} ]]
then
RESTORECON_BIN=$(command -v restorecon 2>/dev/null)
if [[ -n "${RESTORECON_BIN}" ]]
then
${RESTORECON_BIN} -Frv ${HC_VAR_DIR}
echo "INFO: SELinux fcontexts set on ${HC_VAR_DIR} for log rotation"
else
echo "WARN: SELinux is set to 'enforcing' but could not found 'restorecon' to set fcontexts for log rotation"
fi
fi
else
echo "WARN: SELinux is set to 'enforcing' but could not found 'semanage' to set fcontexts for log rotation"
fi
fi
fi
echo "INFO: finished post-install script" echo "INFO: finished post-install script"
%postun %postun
@ -188,8 +160,6 @@ fi
%attr(644, root, root) /etc/logrotate.d/check_health %attr(644, root, root) /etc/logrotate.d/check_health
%changelog %changelog
* Tue Mar 26 2019 <patrick@kudos.be> - 0.2.0
- New git tree organization
* Sat Nov 10 2018 <patrick@kudos.be> - 0.1.0 * Sat Nov 10 2018 <patrick@kudos.be> - 0.1.0
- Added logrotate file - Added logrotate file
* Mon Dec 18 2017 <patrick@kudos.be> - 0.0.9 * Mon Dec 18 2017 <patrick@kudos.be> - 0.0.9

View File

@ -26,11 +26,11 @@ This package contains core plugins (notify).
rm -rf $RPM_BUILD_ROOT 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
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/opt/hc/lib/core/notify_eif.sh $RPM_BUILD_ROOT/opt/hc/lib/core/notify_eif.sh 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
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/providers install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/providers
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/opt/hc/core/providers/notify_eif.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/core/providers/notify_eif.conf.dist cp ../SOURCES/etc/core/providers/notify_eif.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/core/providers/notify_eif.conf.dist
%post %post
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
@ -103,8 +103,6 @@ echo "INFO: finished post-uninstall script"
%attr(644, root, root) /etc/opt/hc/core/providers/notify_eif.conf.dist %attr(644, root, root) /etc/opt/hc/core/providers/notify_eif.conf.dist
%changelog %changelog
* Tue Mar 26 2019 <patrick@kudos.be> - 0.1.0
- New git tree organization
* Tue Jun 20 2017 <patrick@kudos.be> - 0.0.2 * Tue Jun 20 2017 <patrick@kudos.be> - 0.0.2
- Made %postun RPM update aware - Made %postun RPM update aware
* Sun Apr 30 2017 <patrick@kudos.be> - 0.0.1 * Sun Apr 30 2017 <patrick@kudos.be> - 0.0.1

View File

@ -1,107 +0,0 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-notify-slack
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (Slack 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/opt/hc/lib/core/notify_slack.sh $RPM_BUILD_ROOT/opt/hc/lib/core/notify_slack.sh
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc/core/providers
cp ../SOURCES/etc/opt/hc/core/providers/notify_slack.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/core/providers/notify_slack.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_slack.conf ]]
then
cp -p ${HC_ETC_DIR}/core/providers/notify_slack.conf.dist ${HC_ETC_DIR}/core/providers/notify_slack.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_slack.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_slack.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_slack.conf.dist
%changelog
* Sun Oct 14 2022 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -26,11 +26,11 @@ This package contains core plugins (notify).
rm -rf $RPM_BUILD_ROOT 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
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
cp ../SOURCES/opt/hc/lib/core/notify_sms.sh $RPM_BUILD_ROOT/opt/hc/lib/core/notify_sms.sh 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
install -d -m 755 $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/providers
cp ../SOURCES/etc/opt/hc/core/providers/notify_sms.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/core/providers/notify_sms.conf.dist 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 %post
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
@ -103,8 +103,6 @@ echo "INFO: finished post-uninstall script"
%attr(644, root, root) /etc/opt/hc/core/providers/notify_sms.conf.dist %attr(644, root, root) /etc/opt/hc/core/providers/notify_sms.conf.dist
%changelog %changelog
* Tue Mar 26 2019 <patrick@kudos.be> - 0.1.0
- New git tree organization
* Tue Jun 20 2017 <patrick@kudos.be> - 0.0.2 * Tue Jun 20 2017 <patrick@kudos.be> - 0.0.2
- Made %postun RPM update aware - Made %postun RPM update aware
* Sun Apr 30 2017 <patrick@kudos.be> - 0.0.1 * Sun Apr 30 2017 <patrick@kudos.be> - 0.0.1

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