Compare commits

..

114 Commits

Author SHA1 Message Date
aea7a22b8b Update link 2024-08-03 20:20:33 +02:00
746a674ab2 Set exec 2022-10-26 20:52:01 +02:00
07727979d0 Add exec bit 2022-10-22 23:54:53 +02:00
7a02be87c9 add exec bit 2022-10-22 23:54:26 +02:00
93c66e1d40 add exec bit 2022-10-22 23:53:22 +02:00
570f7534ab Fix README 2022-10-12 20:14:37 +02:00
65f6b4ac06 Fix build script permissions 2022-10-12 20:11:11 +02:00
e77d740adb Add notify_slack plugin 2022-10-12 19:55:09 +02:00
45225e7799 added support for systemd-timesyncd, new force_systemd configuration parameter 2022-02-16 21:10:26 +01:00
f2e52dc4ff Added fix in notify_mail() for different switch to mailx command between Linux distro 2022-02-16 21:03:14 +01:00
Patrick Van der Veken
c8cc6bd89f * Add new plugin: check_hpux_defunct_processes
* Small fixes
2021-04-07 15:59:43 +02:00
Patrick Van der Veken
eec674c972 Fixed bug for check host routine: do not reset HC_TIME_OUT to 60 by default 2021-03-30 17:42:58 +02:00
Patrick Van der Veken
11a888638d make _WAIT_TIME & _CRON_LOG_FILE configurable 2021-03-29 17:50:18 +02:00
a00d68afde Added --comment option for --disable & --disable features. 2021-03-28 20:59:34 +02:00
a807703f61 check_linux_burp_backup(): updated code for changing 'burp -v' option as of burp v2.2 quote fixes 2021-03-28 19:09:50 +02:00
54aeef0c71 Add option to disable the count of log entries in archive logs during the archiving operation (global setting: HC_COUNT_ARCHIVES). Disabling this will speed up archiving. 2021-02-13 22:59:06 +01:00
Patrick Van der Veken
ae20069c8a Merge branch 'master' of https://github.com/patvdv/check_health 2021-02-03 11:43:44 +01:00
Patrick Van der Veken
47484d1e09 Fixes for slot detection & reporting in check_linux_hpacucli & check_linux_hpssacli 2021-02-03 11:43:10 +01:00
41ad3542ab Merge branch 'master' of https://github.com/patvdv/check_health 2021-02-01 21:03:50 +01:00
4e75b3ceb6 Update documentation link 2021-02-01 21:03:22 +01:00
Patrick Van der Veken
c108237765 Comment fix 2021-01-13 10:56:55 +01:00
Patrick Van der Veken
b8d03a150d Fix for wrong logic in check_*_file_change 2021-01-13 10:50:26 +01:00
Patrick Van der Veken
888965a5b2
Create FUNDING.yml 2020-12-27 20:11:47 +01:00
6bbbb8970c * Refactored --archive-all feature so that archiving runs more efficiently (starting with the HC that has most messages in the HC log first, then with the HC that has the second most messages etc)
* show_statistics(): show archived events in proper order
* quoting fixes
2020-12-27 17:11:00 +01:00
04b5e8f8e5 Fixes 2020-12-27 01:05:31 +01:00
835189facf Fix typo 2020-12-26 19:43:08 +01:00
1fd486b036 * Added plugins: check_*_uptim, check_linux_fetchmail_status, check_linux_dovecot_status
* Fixes for check_*_ntp_status plugins.
* Added log check for check_*_postfix plugins.
2020-12-26 17:51:03 +01:00
cc1d9e5c98 Fix issue #9 : do_cleanup() removing plugin stdout & stderr log files when running multiple HC plugins 2020-11-08 22:01:10 +01:00
Patrick Van der Veken
4a8dcb035c Fix template comment 2020-10-28 17:27:14 +01:00
3e9b483e84 Added check_linux_fail2ban_status plugin 2020-10-18 20:10:45 +02:00
3f5c47da52 Fix in check_linux_httpd_status plugin 2020-10-10 18:09:55 +02:00
13bc933e89 * Fix in display_init plugin for larger field
* check_linux_httpd_status plugin: added support for configuration 
parameters 'httpd_path' and changed meaning of 'httpd_bin' in order to 
support debian/ubuntu distros using the 'apache(2)' binary
2020-10-10 17:15:30 +02:00
Patrick Van der Veken
e3da7e7b94 check_linux_mysqld_status(): fixes around systemctl handling, better error handling, corrected handling of DO_MYSQLCHECK, fix non-localhost process checking 2020-09-25 09:39:30 +02:00
2135f56abe Merge branch 'master' of https://github.com/patvdv/check_health 2020-09-05 14:16:00 +02:00
797ae2380a check_*_file_change plugin: fix log_hc call for failed checksum + quote fix 2020-09-05 14:15:50 +02:00
Patrick Van der Veken
6aedc6d180 Merge branch 'master' of https://github.com/patvdv/check_health 2020-07-07 14:39:28 +02:00
Patrick Van der Veken
92d20dd582 Added check_exadata_ib_status plugin 2020-07-07 14:39:08 +02:00
719e58d33d Update README 2020-05-09 22:43:35 +02:00
35ffe17b65 Add pgrep als another fallback check 2020-05-08 21:20:42 +02:00
c1896ec1c2 Fix in conffiles 2020-04-29 19:40:59 +02:00
32c8d035c0 Fix in conffiles 2020-04-29 19:38:39 +02:00
c0a22a0513 Comment fix 2020-04-19 11:18:51 +02:00
36726086c2 Comment fix 2020-04-18 23:35:04 +02:00
6028a3ad13 Comment fix 2020-04-18 23:15:37 +02:00
eed20b7110 Comment fix 2020-04-18 23:14:48 +02:00
Patrick Van der Veken
8c784c2c78 Fix for stupid copy/past type 2020-04-15 13:18:36 +02:00
Patrick Van der Veken
8c53a1586e Update comment 2020-04-14 21:07:58 +02:00
d14393ca85 Add more default settings to config files 2020-04-13 20:28:28 +02:00
be2c4fab8e Copy/paste fix 2020-04-12 10:47:35 +02:00
3e859f3c27 Fix error checking + updated comments 2020-04-11 11:45:14 +02:00
68eced6aa4 Add support for OpenVZ 7.x 2020-04-11 11:44:35 +02:00
85e88d78c4 Update comment 2020-04-10 19:56:43 +02:00
436821522d Add help comment 2020-04-10 18:44:01 +02:00
a72fbd1576 Added support for OpenVZ 7. Now using /proc/user_beancounters instead of the 'vzubc' tool. Added possbility to exclude UBC counters 2020-04-10 18:43:01 +02:00
Patrick Van der Veken
8b6b2e9c31 Rollback some stuff + whitespace fixes 2020-04-08 11:49:37 +02:00
Patrick Van der Veken
c8aa4aad79 * Add caching to reporting features
* Fixed a problem with LOG_HEALTHY="Yes" and check_params()
* Other smaller fixes
* Whitespace fixes
2020-04-08 10:17:22 +02:00
Patrick Van der Veken
8976184b45 Undo wrong fix 2020-03-26 16:41:12 +01:00
Patrick Van der Veken
302f8e79aa Small fixes 2020-03-25 13:33:29 +01:00
Patrick Van der Veken
4b45ed81ed Merge branch 'master' of https://github.com/patvdv/check_health 2020-03-12 21:51:00 +01:00
Patrick Van der Veken
c262342448 Add --list-details to replace --list and make --list displaying only a terse list of health checks. This makes --list a lot more peformant. 2020-03-12 21:50:47 +01:00
Patrick Van der Veken
534c935589 Fix for numerical range conversion 2020-03-06 10:21:07 +01:00
Patrick Van der Veken
daf50c64cb Added possibility to do check based on an hourly schedule 2020-03-04 10:15:48 +01:00
Patrick Van der Veken
7d575cab86 Merge branch 'master' of https://github.com/patvdv/check_health 2020-01-30 11:43:58 +01:00
Patrick Van der Veken
982a237d77 Added possbility to do checks based on weekday in check_exadata_zfs_share_replication plugin
Added data_has_newline()
2020-01-30 11:43:36 +01:00
Patrick Van der Veken
2481032360 Fix in archiving routine for bogus messages 2019-11-03 19:33:30 +01:00
Patrick Van der Veken
6184a1a061 Fix in check_linux_httpd_status plugin 2019-11-01 16:47:49 +01:00
Patrick Van der Veken
f2b4970977 Added configuration parameters for the check_linux_httpd_status() plugin to support httpd that were compiled from source (no sysv or systemd) 2019-11-01 16:40:17 +01:00
Patrick Van der Veken
b460eca52c Update Debian conffiles 2019-10-29 20:42:35 +01:00
Patrick Van der Veken
048e7bd758 Fix Debian postrm 2019-10-29 20:32:56 +01:00
Patrick Van der Veken
f91efc6520 Build updates for Debian 2019-10-29 20:20:55 +01:00
Patrick Van der Veken
5425a44afb Strip post-install for Debian 2019-10-24 20:37:29 +02:00
Patrick Van der Veken
bb703e2964 Fixed post-install logic for Debian 2019-10-23 20:42:11 +02:00
Patrick Van der Veken
b60f383f48 Added HC_LOG_HEALTHY & HC_WILL_FIX as global settings
Fixed missing error checking in check_linux_autofs
2019-10-23 19:56:36 +02:00
Patrick Van der Veken
f392c884bb Merge branch 'master' of https://github.com/patvdv/check_health 2019-10-19 19:41:02 +02:00
Patrick Van der Veken
446d9c97ef Comments update 2019-10-19 19:40:54 +02:00
Patrick Van der Veken
9fcf788b59 Fix for cron nicknames extensions 2019-10-16 15:06:30 +02:00
Patrick Van der Veken
26292b398d Fixed syslog.log check 2019-10-07 10:17:23 +02:00
Patrick Van der Veken
f8fd322439 fix for systemd service on Ubuntu/Mint 2019-09-01 20:12:08 +02:00
Patrick Van der Veken
30693afe5d Added supercap monitoring for megaraid plugins 2019-07-19 11:46:54 +02:00
Patrick Van der Veken
bab155e752 pdksh hack for sourcing include files 2019-07-16 16:08:47 +02:00
Patrick Van der Veken
976f1f8b84 Added check_linux_autofs + check_hpux_autofs plugins (w/ healing code) 2019-07-14 14:11:42 +02:00
Patrick Van der Veken
f7975c73cd Fix command 2019-07-08 09:00:07 +02:00
Patrick Van der Veken
e770029fac Update _CELL_COMMAND: use real target instead of symlink 2019-07-08 08:56:52 +02:00
Patrick Van der Veken
61970663d9 Added plugin check_exadata_zfs_cluster 2019-07-05 16:08:58 +02:00
Patrick Van der Veken
b58bd9d20c Make hc-linux dependent on aptitude (more reliable for install) 2019-06-29 11:16:54 +02:00
Patrick Van der Veken
0f0185c739 Fix in function name of plugin 2019-06-23 09:29:55 +02:00
Patrick Van der Veken
b56bfac0ff Merge branch 'master' of https://github.com/patvdv/check_health 2019-06-17 15:17:37 +02:00
Patrick Van der Veken
8e779b6062 Added code for support of fix/healing logic. Command-line opion --no-fix & global var ARG_NO_FIX 2019-06-17 15:17:22 +02:00
Patrick Van der Veken
97d28a87a0 Merge branch 'master' of https://github.com/patvdv/check_health 2019-06-07 21:57:24 +02:00
Patrick Van der Veken
b0d3f40de4 fixes: #3 2019-06-07 21:57:12 +02:00
Patrick Van der Veken
197e02cfde Merge branch 'master' of https://github.com/patvdv/check_health 2019-06-07 21:56:41 +02:00
Patrick Van der Veken
c69d982c2b fixes: #1 2019-06-07 21:56:16 +02:00
Patrick Van der Veken
049c0e8cd6 Merge branch 'master' of https://github.com/patvdv/check_health 2019-06-07 21:54:27 +02:00
Patrick Van der Veken
982079a631 Merge branch 'master' of https://github.com/patvdv/check_health 2019-06-07 21:53:45 +02:00
Patrick Van der Veken
382dfdebe8 Merge branch 'master' of https://github.com/patvdv/check_health 2019-06-07 21:34:11 +02:00
Patrick Van der Veken
c08d63cb34 Added SELinux fcontexts for logrotate in post-installer script 2019-06-07 21:34:01 +02:00
Patrick Van der Veken
a4868cda09 White space fixes 2019-05-28 14:45:49 +02:00
Patrick Van der Veken
f891b1bfea Import bug fix which obsoletes --fix-logs 2019-05-19 09:03:57 +02:00
Patrick Van der Veken
62095c510e Added Exadata stuff:
- 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
2019-05-16 16:23:06 +02:00
Patrick Van der Veken
a6c907f236 Fixed in clusterware plugins & others 2019-04-26 13:07:52 +02:00
Patrick Van der Veken
556da803d7 Fix in build files/scripts 2019-04-24 21:03:36 +02:00
Patrick Van der Veken
60e8ae2a33 Remove build script 2019-04-24 20:50:50 +02:00
Patrick Van der Veken
ea5e1b4ca7 Fix build files for Arch Linux 2019-04-24 20:47:47 +02:00
Patrick Van der Veken
937ed5a3fe Exec:
modified:   clusterware/linux/DEBIAN/hc-clusterware-platform/postinst
modified:   clusterware/linux/DEBIAN/hc-clusterware-platform/postrm
modified:   exadata/linux/DEBIAN/hc-exadata-platform/postinst
modified:   exadata/linux/DEBIAN/hc-exadata-platform/postrm
modified:   serviceguard/linux/DEBIAN/hc-serviceguard-platform/postinst
modified:   serviceguard/linux/DEBIAN/hc-serviceguard-platform/postrm
2019-04-24 20:38:42 +02:00
Patrick Van der Veken
3dba613ca2 Fix & move build files 2019-04-24 20:24:52 +02:00
Patrick Van der Veken
85e8f0e24e Fix 2019-04-24 14:47:22 +02:00
Patrick Van der Veken
e6a080a2b4 Updates 2019-04-24 14:46:48 +02:00
Patrick Van der Veken
59d05758cc Some updates 2019-04-24 14:44:22 +02:00
Patrick Van der Veken
05dd91edc4 * Added Clusterware (CRS) plugins (as a platform).
* Moved Serviceguard plugins to separate platform (+fixes)
* Other fixes
2019-04-24 14:19:02 +02:00
Patrick Van der Veken
a4e1b4b954 Added build files for check_exadata_pool_usage() 2019-04-12 14:41:55 +02:00
Patrick Van der Veken
974d063a51 * Added plugin check_exadata_zfs_pool_usage
* Smaller fixes to other Exadata plugins
2019-04-12 13:58:25 +02:00
Patrick Van der Veken
57a820a893 Fix bad math in ZFS script 2019-04-09 12:12:00 +02:00
Patrick Van der Veken
4397e759da Fix version 2019-04-09 11:57:28 +02:00
Patrick Van der Veken
88e7c2e461 Fix in check_exadata_zfs_share_usage() 2019-04-09 11:54:16 +02:00
176 changed files with 12046 additions and 2450 deletions

3
.github/FUNDING.yml vendored Normal file
View File

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

View File

@ -10,15 +10,15 @@ Health checker for UNIX/Linux is a small framework of monitoring scripts. It is
## 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
* system dependant tools/utilities (see individual health checks)
* UNIX cron or other scheduler
* execute as user root only
* system dependent tools/utilities (see individual health checks)
* UNIX *cron* or other scheduler
* execute as user *root* only
## Build
## Downloads
Use the build templates & scripts in the `build/` directory to roll your own packages.
See the [Releases](https://github.com/patvdv/check_health/releases) page.
## Installation
@ -41,7 +41,7 @@ Install the core bundle:
zypper install hc-linux-<version>.noarch.rpm
pacman -U hc-linux-<version>-any.pkg.tar.xz
Install the Linux plugin bundle:
Install the Linux OS plugins bundle:
yum localinstall hc-linux-platform-<version>.noarch.rpm
dpkg --install hc-linux-platform-<version>.noarch.rpm
@ -54,20 +54,33 @@ Install the core bundle:
installp -Xap -d hc-aix-<version>.bff all
Install the AIX plugin bundle:
Install the AIX OS plugins bundle:
installp -Xap -d hc-aix-platform-<version> all
### Exadata
### Clusterware/Exadata
Install the core bundle:
yum localinstall hc-linux-<version>.noarch.rpm
Install the Linux plugin bundle:
Install Clusterware/Exadata Linux plugin bundle(s):
yum localinstall hc-clusterware-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
Additionally, there may be bundles for display or notification plugins, e.g.:
@ -77,6 +90,11 @@ Additionally, there may be bundles for display or notification plugins, e.g.:
* hc-display-terse
* hc-notify-eif
* hc-notify-sms
* hc-notify-slack
## Configure & deploy
An Ansible role is available at: https://github.com/patvdv/kudos.check_health
## Execute (examples)
@ -119,19 +137,19 @@ Additionally, there may be bundles for display or notification plugins, e.g.:
/opt/hc/bin/check_health.sh --report --today
/opt/hc/bin/check_health.sh --report --newer=20180101
/opt/hc/bin/check_health.sh --report --id=20160704154001 --detail
```
* **Alerting** on failed health checks:
```
/opt/hc/bin/check_health.sh --hc=check_hpux_root_crontab --run --notify=mail --mail-to="alert@acme.com"
/opt/hc/bin/check_health.sh --hc=check_linux_fs_usage --run --notify=slack
```
## References
### Documentation
More documentation can be found at http://www.kudos.be/Projects/Health_checker.html
More documentation can be found at <https://www.kudos.be/check_health/>
### Logo

View File

@ -32,12 +32,14 @@ Fileset
/opt/hc/lib/platform/aix/check_aix_subsystems.sh
/opt/hc/lib/platform/aix/check_aix_sysbackup.sh
/opt/hc/lib/platform/aix/check_aix_topasrec.sh
/opt/hc/lib/platform/aix/check_aix_uptime.sh
/etc/opt/hc
/etc/opt/hc/check_aix_file_age.conf.dist
/etc/opt/hc/check_aix_file_change.conf.dist
/etc/opt/hc/check_aix_root_crontab.conf.dist
/etc/opt/hc/check_aix_subsystems.conf.dist
/etc/opt/hc/check_aix_sysbackup.conf.dist
/etc/opt/hc/check_aix_uptime.conf.dist
EOROOTFiles
Relocatable: N
EOFileset

View File

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

View File

@ -0,0 +1,31 @@
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

@ -0,0 +1,51 @@
#!/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

@ -0,0 +1,48 @@
#!/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

@ -0,0 +1,29 @@
# 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

@ -0,0 +1,10 @@
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

@ -0,0 +1,83 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-clusterware-platform
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (Clusterware 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 Serviceguard platform 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/clusterware
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/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
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/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
# ------------------------- 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/clusterware
%attr(755, root, root) /opt/hc/lib/platform/clusterware/check_clusterware_resource_config.sh
%attr(755, root, root) /opt/hc/lib/platform/clusterware/check_clusterware_resource_status.sh
%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_clusterware_resource_status.conf.dist
%dir /etc/opt/hc/core
%dir /etc/opt/hc/core/templates
%changelog
* Sat Apr 20 2019 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -0,0 +1,53 @@
#!/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

@ -1,32 +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/lib/platform
install -d -m 755 ${pkgdir}/opt/hc/lib/platform/exadata
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_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_zfs_logs.conf.dist ${pkgdir}/etc/opt/hc/check_exadata_zfs_logs.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,92 +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/platform
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform/exadata
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_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_zfs_logs.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_exadata_zfs_logs.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/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
* 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

@ -0,0 +1,33 @@
# -- 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

@ -0,0 +1,54 @@
# 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

@ -0,0 +1,16 @@
#!/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

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

@ -0,0 +1,154 @@
%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

@ -59,9 +59,11 @@ This is the OS/platform plugin package"
file_permissions -u 0222 -o root -g sys
directory ../../../opt/hc/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_cdsf_cluster.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_file_age.sh
file -m 755 check_hpux_file_change.sh
@ -71,7 +73,7 @@ This is the OS/platform plugin package"
file -m 755 check_hpux_ignite_backup.sh
file -m 755 check_hpux_ioscan.sh
file -m 755 check_hpux_guid_status.sh
file -m 644 check_hpux_hpvm_vpar_status.sh
file -m 755 check_hpux_hpvm_vpar_status.sh
file -m 755 check_hpux_httpd_status.sh
file -m 755 check_hpux_kernel_params.sh
file -m 755 check_hpux_kernel_usage.sh
@ -83,14 +85,10 @@ This is the OS/platform plugin package"
file -m 755 check_hpux_postfix_status.sh
file -m 755 check_hpux_root_crontab.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_syslog.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
end
@ -107,6 +105,9 @@ This is the OS/platform plugin package"
file_permissions -u 0222 -o root -g sys
directory ../../../etc/opt/hc/=/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_file_age.conf.dist
file -m 644 check_hpux_file_change.conf.dist
@ -118,15 +119,12 @@ This is the OS/platform plugin package"
file -m 644 check_hpux_kernel_params.conf.dist
file -m 644 check_hpux_kernel_usage.conf.dist
file -m 644 check_hpux_ntp_status.conf.dist
file -m 755 check_hpux_ovpa_status.conf.dist
file -m 755 check_hpux_patch_version.conf.dist
file -m 644 check_hpux_ovpa_status.conf.dist
file -m 644 check_hpux_patch_version.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_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_uptime.conf.dist
end
fileset

View File

@ -0,0 +1,80 @@
# Depot definition:
depot
layout_version 1.0
# Vendor definition:
vendor
tag KUDOS
title "KUDOS BVBA - http://www.kudos.be"
end
# Bundle definitions:
bundle
tag HC-NOTIFY-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

@ -0,0 +1,51 @@
#!/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

@ -0,0 +1,48 @@
#!/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

@ -19,9 +19,13 @@ package() {
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
@ -41,16 +45,15 @@ package() {
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_sg_cluster_config.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_sg_cluster_config.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_sg_cluster_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_sg_cluster_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_sg_package_config.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_sg_package_config.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_sg_package_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_sg_package_status.sh
install -D -m 755 opt/hc/lib/platform/linux/check_linux_sg_qs_status.sh ${pkgdir}/opt/hc/lib/platform/linux/check_linux_sg_qs_status.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
@ -58,14 +61,12 @@ package() {
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_sg_cluster_config.conf.dist ${pkgdir}/etc/opt/hc/check_linux_sg_cluster_config.conf.dist
install -D -m 644 etc/opt/hc/check_linux_sg_cluster_status.conf.dist ${pkgdir}/etc/opt/hc/check_linux_sg_cluster_status.conf.dist
install -D -m 644 etc/opt/hc/check_linux_sg_package_config.conf.dist ${pkgdir}/etc/opt/hc/check_linux_sg_package_config.conf.dist
install -D -m 644 etc/opt/hc/check_linux_sg_package_status.conf.dist ${pkgdir}/etc/opt/hc/check_linux_sg_package_status.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

View File

@ -40,6 +40,34 @@ post_install() {
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

@ -0,0 +1,33 @@
# -- 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

@ -0,0 +1,26 @@
# 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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@ Architecture: all
Maintainer: Patrick Van der Veken <patrick@kudos.be>
Essential: no
Installed-Size: 300
Depends: ksh
Depends: ksh, aptitude
Section: tools
Priority: extra
Description: The KUDOS Health Checker (HC) for UNIX.

View File

@ -16,25 +16,35 @@ 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 ]]
if [[ -f ${HC_ETC_DIR}/core/check_health.conf.dist ]]
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
}
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 ]]
if [[ -f ${HC_ETC_DIR}/check_host.conf.dist ]]
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
}
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} ]]
@ -43,4 +53,32 @@ then
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

@ -10,8 +10,9 @@ HC_VAR_DIR="/var/opt/hc"
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}"
# 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

View File

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

View File

@ -10,14 +10,19 @@ 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 ]]
if [[ -f ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist ]]
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
}
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} ]]

View File

@ -0,0 +1,10 @@
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

@ -0,0 +1,33 @@
#!/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

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

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

View File

@ -10,14 +10,19 @@ 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 ]]
if [[ -f ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist ]]
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
}
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} ]]

View File

@ -27,9 +27,13 @@ rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/platform/linux
cp ../SOURCES/opt/hc/lib/platform/linux/check_linux_autofs.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_autofs.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/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/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/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/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/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/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/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/opt/hc/lib/platform/linux/check_linux_fs_mounts.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_fs_mounts.sh
@ -49,16 +53,15 @@ cp ../SOURCES/opt/hc/lib/platform/linux/check_linux_hplog.sh $RPM_BUILD_ROOT/opt
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/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/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/opt/hc/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_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_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_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_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_uptime.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_uptime.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/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
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/opt/hc/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_es_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_es_status.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/opt/hc/check_linux_fetchmail_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_fetchmail_status.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/opt/hc/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_fs_usage.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_fs_usage.conf.dist
@ -66,14 +69,12 @@ cp ../SOURCES/etc/opt/hc/check_linux_hpasmcli.conf.dist $RPM_BUILD_ROOT/etc/opt/
cp ../SOURCES/etc/opt/hc/check_linux_hpacucli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpacucli.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/opt/hc/check_linux_hpssacli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpssacli.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/opt/hc/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_ntp_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_ntp_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/opt/hc/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_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_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_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_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/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/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
@ -116,9 +117,13 @@ echo "INFO: finished post-uninstall script"
%dir /opt/hc/lib
%dir /opt/hc/lib/platform
%dir /opt/hc/lib/platform/linux
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_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_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_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_change.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_fs_mounts.sh
@ -138,16 +143,15 @@ 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_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_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_uptime.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
%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_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_change.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_fs_usage.conf.dist
@ -155,14 +159,12 @@ 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_hplog.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_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_root_crontab.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_sg_cluster_config.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_sg_cluster_status.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_sg_package_config.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_sg_package_status.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_uptime.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
%dir /etc/opt/hc/core
@ -171,6 +173,19 @@ echo "INFO: finished post-uninstall script"
%attr(644, root, root) /etc/opt/hc/core/templates/mail_body.tpl-check_linux_root_crontab
%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

View File

@ -88,6 +88,34 @@ then
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"
%postun

View File

@ -0,0 +1,107 @@
%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

@ -47,6 +47,7 @@ rpmbuild -bb ${BUILD_DIR}/SPECS/hc-linux-platform.spec
# build core plugins
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-notify-eif.spec
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-notify-sms.spec
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-notify-slack.spec
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-display-init.spec
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-display-json.spec
rpmbuild -bb ${BUILD_DIR}/SPECS/hc-display-csv.spec

View File

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

View File

@ -0,0 +1,104 @@
# 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-SERVICEGUARD-PLATFORM
title "The Health Checker (HC) for UNIX (Serviceguard plugins)"
os_name HP-UX
revision %BUILD_DATE%
architecture HP-UX_B.11_32/64
machine_type ia64*
vendor_tag KUDOS
contents HC-SERVICEGUARD-PLATFORM-MAIN,r=,a=,v=
end
# Product definitions:
product
tag HC-SERVICEGUARD-PLATFORM-MAIN
revision %BUILD_DATE%
category tools
category_title Tools
title "The Health Checker (HC) for UNIX (Serviceguard plugins)"
description "The Health Checker is collection of scripts (plugins)
designed to perform regular - but not intensive - health checks on
UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as
well customer specific checks. Checks may include topics such file
system mounts, process checks, file consistency etc.
This is the OS/platform plugin package"
architecture S700/S800_HP-UX_10/HP-UX_11/IA64_HP-UX_11
machine_type 9000/7*|9000/8*|ia64*
os_name HP-UX
os_release ?.1?.*
os_version [A-Z]
directory /opt/hc
is_locatable false
is_patch false
postinstall scripts/hc_serviceguard_platform.postinstall
postremove scripts/hc_serviceguard_platform.postremove
# Fileset definitions:
fileset
tag plugins
title UX Health Checker (Serviceguard 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/platform/serviceguard=/opt/hc/lib/platform/serviceguard
file -m 755 check_serviceguard_package_status.sh
file -m 755 check_serviceguard_package_config.sh
file -m 755 check_serviceguard_cluster_status.sh
file -m 755 check_serviceguard_cluster_config.sh
file -m 755 check_serviceguard_qs_status.sh
end
fileset
tag config
title UX Health Checker (Serviceguard plugins: configuration)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-SERVICEGUARD-PLATFORM-MAIN.plugins
file_permissions -u 0222 -o root -g sys
directory ../../../../etc/opt/hc/=/etc/opt/hc
file -m 644 check_serviceguard_package_status.conf.dist
file -m 644 check_serviceguard_package_config.conf.dist
file -m 644 check_serviceguard_cluster_status.conf.dist
file -m 644 check_serviceguard_cluster_config.conf.dist
end
fileset
tag templates
title UX Health Checker (Serviceguard plugins: templates)
is_kernel false
is_locatable false
is_reboot false
is_sparse false
is_patch false
prerequisite HC-SERVICEGUARD-PLATFORM-MAIN.plugins
file_permissions -u 0222 -o root -g sys
directory ../../../../etc/opt/hc/core/templates=/etc/opt/hc/core/templates
file -m 644 mail_body.tpl-check_hpux_sg_cluster_status
file -m 644 mail_body.tpl-check_hpux_sg_package_status
end
end

View File

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

View File

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

View File

@ -0,0 +1,33 @@
# -- 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

@ -0,0 +1,34 @@
# Maintainer: Patrick Van der Veken <patrick@kudos.be>
_pkgname="check_health"
pkgname="hc-serviceguard-platform"
pkgver="%BUILD_DATE%"
pkgrel=1
pkgdesc="The KUDOS Health Checker (HC) for UNIX (Serviceguard 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/serviceguard
install -D -m 755 opt/hc/lib/platform/serviceguard/check_serviceguard_cluster_config.sh ${pkgdir}/opt/hc/lib/platform/serviceguard/check_serviceguard_cluster_config.sh
install -D -m 755 opt/hc/lib/platform/serviceguard/check_serviceguard_cluster_status.sh ${pkgdir}/opt/hc/lib/platform/serviceguard/check_serviceguard_cluster_status.sh
install -D -m 755 opt/hc/lib/platform/serviceguard/check_serviceguard_package_config.sh ${pkgdir}/opt/hc/lib/platform/serviceguard/check_serviceguard_package_config.sh
install -D -m 755 opt/hc/lib/platform/serviceguard/check_serviceguard_package_status.sh ${pkgdir}/opt/hc/lib/platform/serviceguard/check_serviceguard_package_status.sh
install -D -m 755 opt/hc/lib/platform/serviceguard/check_serviceguard_qs_status.sh ${pkgdir}/opt/hc/lib/platform/serviceguard/check_serviceguard_qs_status.sh
install -d -m 755 ${pkgdir}/etc/opt/hc
install -D -m 644 etc/opt/hc/check_serviceguard_cluster_config.conf.dist ${pkgdir}/etc/opt/hc/check_serviceguard_cluster_config.conf.dist
install -D -m 644 etc/opt/hc/check_serviceguard_cluster_status.conf.dist ${pkgdir}/etc/opt/hc/check_serviceguard_cluster_status.conf.dist
install -D -m 644 etc/opt/hc/check_serviceguard_package_config.conf.dist ${pkgdir}/etc/opt/hc/check_serviceguard_package_config.conf.dist
install -D -m 644 etc/opt/hc/check_serviceguard_package_status.conf.dist ${pkgdir}/etc/opt/hc/check_serviceguard_package_status.conf.dist
install -d -m 755 ${pkgdir}/etc/opt/hc/core
install -d -m 755 ${pkgdir}/etc/opt/hc/core/templates
}

View File

@ -0,0 +1,10 @@
Package: hc-serviceguard-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 (Serviceguard plugins).

View File

@ -0,0 +1,16 @@
#!/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

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

@ -0,0 +1,93 @@
%define build_timestamp %(date +"%Y%m%d")
Name: hc-serviceguard-platform
Version: %{build_timestamp}
Release: 1
Summary: The KUDOS Health Checker (HC) for UNIX (Serviceguard 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 Serviceguard platform 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/serviceguard
cp ../SOURCES/opt/hc/lib/platform/serviceguard/check_serviceguard_cluster_config.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/serviceguard/check_serviceguard_cluster_config.sh
cp ../SOURCES/opt/hc/lib/platform/serviceguard/check_serviceguard_cluster_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/serviceguard/check_serviceguard_cluster_status.sh
cp ../SOURCES/opt/hc/lib/platform/serviceguard/check_serviceguard_package_config.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/serviceguard/check_serviceguard_package_config.sh
cp ../SOURCES/opt/hc/lib/platform/serviceguard/check_serviceguard_package_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/serviceguard/check_serviceguard_package_status.sh
cp ../SOURCES/opt/hc/lib/platform/serviceguard/check_serviceguard_qs_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/serviceguard/check_serviceguard_qs_status.sh
install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
cp ../SOURCES/etc/opt/hc/check_serviceguard_cluster_config.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_serviceguard_cluster_config.conf.dist
cp ../SOURCES/etc/opt/hc/check_serviceguard_cluster_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_serviceguard_cluster_status.conf.dist
cp ../SOURCES/etc/opt/hc/check_serviceguard_package_config.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_serviceguard_package_config.conf.dist
cp ../SOURCES/etc/opt/hc/check_serviceguard_package_status.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_serviceguard_package_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
# ------------------------- 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/serviceguard
%attr(755, root, root) /opt/hc/lib/platform/serviceguard/check_serviceguard_cluster_config.sh
%attr(755, root, root) /opt/hc/lib/platform/serviceguard/check_serviceguard_cluster_status.sh
%attr(755, root, root) /opt/hc/lib/platform/serviceguard/check_serviceguard_package_config.sh
%attr(755, root, root) /opt/hc/lib/platform/serviceguard/check_serviceguard_package_status.sh
%attr(755, root, root) /opt/hc/lib/platform/serviceguard/check_serviceguard_qs_status.sh
%dir /etc/opt/hc
%attr(644, root, root) /etc/opt/hc/check_serviceguard_cluster_config.conf.dist
%attr(644, root, root) /etc/opt/hc/check_serviceguard_cluster_status.conf.dist
%attr(644, root, root) /etc/opt/hc/check_serviceguard_package_config.conf.dist
%attr(644, root, root) /etc/opt/hc/check_serviceguard_package_status.conf.dist
%dir /etc/opt/hc/core
%dir /etc/opt/hc/core/templates
%changelog
* Sat Apr 20 2019 <patrick@kudos.be> - 0.0.1
- Initial build

View File

@ -0,0 +1,53 @@
#!/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-serviceguard-platform.spec
print "List of built packages:"
ls -l ${BUILD_DIR}/RPMS/*/*
exit 0
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -13,9 +13,11 @@ log_healthy="no"
# full path to the location of mksysb images, the tool expects sub-directories
# per host underneath this location
# [default: /export/images]
backup_path=/export/images
# name of the file containing the mksysb output
# [default: mksysb.log]
mksysb_log=mksysb.log
# maximum days before backup gets flagged as 'too old'

View File

@ -0,0 +1,41 @@
#******************************************************************************
# @(#) check_aix_uptime.conf
#******************************************************************************
# This is a configuration file for the check_aix_uptime HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="no"
# trigger event when current uptime is less than previously record uptime?
# [default: yes]
check_reboot="yes"
# time to wait before the current uptime is considered for the reboot check.
# Example: a value of 60m means the check for a previous reboot will be at earliest
# performed 1 hour after the last reboot of the host.
# Format: <value>m|h|d where m=minutes, h=hours, d=days (lowercase suffix).
# if no suffix is specified, then minutes are assumed.
# [default: 60m]
reboot_time="60m"
# trigger event when current uptime goes over the maximum threshold?
# [default: no]
check_old_age="no"
# time to expire before the current uptime is considered "old age".
# Example: a value of 365d means a must-reboot will be flagged at earliest after
# 1 year of uptime of the host
# Format: <value>m|h|d where m=minutes, h=hours, d=days (lowercase suffix).
# if no suffix is specified, then minutes are assumed.
# [default: 365d]
old_age_time="365d"
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,28 @@
#******************************************************************************
# @(#) check_clusterware_resource_config.conf
#******************************************************************************
# This is a configuration file for the check_clusterware_resource_config HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="no"
# location of the crsctl tool
# [default: null (autodiscovery)]
crsctl_bin=""
# stanza(s) of resource definitions (case sensitive).
# Example:
#[myresource]
#NAME=myresource
#TYPE=cluster_resource
#ACL=owner:root:rwx,pgrp:root:r-x,other::r--,user:oracle:r-x
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,30 @@
#******************************************************************************
# @(#) check_clusterware_resource_status.conf
#******************************************************************************
# This is a configuration file for the check_clusterware_resource_status HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="no"
# location of the crsctl tool
# [default: null (autodiscovery)]
crsctl_bin=""
# list of required resource statuses
# Format:
# crs:<resource_name>:<*|node>=<ONLINE|OFFLINE>,<*|node>=<ONLINE|OFFLINE>,...
# Note: ONLINE definitions must precede OFFLINE definitions (if used)
# Examples:
#crs:res1:node1=ONLINE
#crs:res2:*=ONLINE
#crs:res3:node1=ONLINE,node2=OFFLINE
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,30 @@
#******************************************************************************
# @(#) check_exadata_cell_alerts.conf
#******************************************************************************
# This is a configuration file for the check_exadata_cell_alerts HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="yes"
# specify the user account for the dcli session to the cell server
# [default: root]
dcli_user=""
# specify the cell servers to query
# [default: null]
cell_servers=""
# specify the alert severities to report (comma-separated)
# Possible values: critical/warning/info/clear
# [default: critical]
alert_severities="critical"
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,29 @@
#******************************************************************************
# @(#) check_exadata_cell_celldisks.conf
#******************************************************************************
# This is a configuration file for the check_exadata_cell_celldisks HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="yes"
# specify the user account for the dcli session to the cell server
# [default: root]
dcli_user=""
# specify the cell servers to query
# [default: null]
cell_servers=""
# specify which cell disks to exclude from the check (comma-separated)
# [default: null]
excluded_disks=""
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,37 @@
#******************************************************************************
# @(#) check_exadata_cell_flash.conf
#******************************************************************************
# This is a configuration file for the check_exadata_cell_flash HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="yes"
# specify the user account for the dcli session to the cell server
# [default: root]
dcli_user=""
# specify the cell servers to query
# [default: null]
cell_servers=""
# specify which flash devices to exclude from the check (comma-separated)
# [default: null]
excluded_devices=""
# specify whether to check the flash cache status (yes|no)
# [default: yes]
check_flashcache="yes"
# specify whether to check the flash log status (yes|no)
# [default: yes]
check_flashlog="yes"
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,33 @@
#******************************************************************************
# @(#) check_exadata_cell_griddisks.conf
#******************************************************************************
# This is a configuration file for the check_exadata_cell_griddisks HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="yes"
# specify the user account for the dcli session to the cell server
# [default: root]
dcli_user=""
# specify the cell servers to query
# [default: null]
cell_servers=""
# specify which grid disks to exclude from the check (comma-separated)
# [default: null]
excluded_disks=""
# specify whether to check the errorCount of griddisks (yes|no)
# [default: yes]
check_errorcount="yes"
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,29 @@
#******************************************************************************
# @(#) check_exadata_cell_luns.conf
#******************************************************************************
# This is a configuration file for the check_exadata_cell_luns HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="yes"
# specify the user account for the dcli session to the cell server
# [default: root]
dcli_user=""
# specify the cell servers to query
# [default: null]
cell_servers=""
# specify which luns to exclude from the check (comma-separated)
# [default: null]
excluded_luns=""
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,53 @@
#******************************************************************************
# @(#) check_exadata_cell_megaraid.conf
#******************************************************************************
# This is a configuration file for the check_exadata_cell_megaraid HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="yes"
# specify the user account for the dcli session to the cell server
# [default: root]
dcli_user=""
# specify the cell servers to query
# [default: null]
cell_servers=""
# specify whether to check the controller state (yes|no)
# [default: yes]
check_controller="yes"
# specify whether to check the BBU (battery) state (yes|no)
# [default: yes]
check_bbu="yes"
# specify whether to check the BBU (supercap) state (yes|no)
# [default: yes]
check_supercap="yes"
# specify whether to check the physical devices (yes|no)
# [default: yes]
check_physical="yes"
# specify whether to check the virtual devices (yes|no)
# [default: yes]
check_virtual="yes"
# individual checks that should be disabled (wildcards are not supported)
# cell_exclude:<cell_server>:<controller|bbu|supercap|physical|virtual>
# Examples:
# disable controller check on mycell1
# cell_exclude:mycell1:controller
# disable bbu check on mycell2
# cell_exclude:mycell2:bbu
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,29 @@
#******************************************************************************
# @(#) check_exadata_cell_physicaldisks.conf
#******************************************************************************
# This is a configuration file for the check_exadata_cell_physicaldisks HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="yes"
# specify the user account for the dcli session to the cell server
# [default: root]
dcli_user=""
# specify the cell servers to query
# [default: null]
cell_servers=""
# specify which physical disks to exclude from the check (comma-separated)
# [default: null]
excluded_disks=""
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,37 @@
#******************************************************************************
# @(#) check_exadata_megaraid.conf
#******************************************************************************
# This is a configuration file for the check_exadata_megaraid HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="yes"
# specify whether to check the controller state (yes|no)
# [default: yes]
check_controller="yes"
# specify whether to check the BBU (battery) state (yes|no)
# [default: yes]
check_bbu="yes"
# specify whether to check the BBU (supercap) state (yes|no)
# [default: yes]
check_supercap="yes"
# specify whether to check the physical devices (yes|no)
# [default: yes]
check_physical="yes"
# specify whether to check the virtual devices (yes|no)
# [default: yes]
check_virtual="yes"
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,35 @@
#******************************************************************************
# @(#) check_exadata_zfs_cluster.conf
#******************************************************************************
# This is a configuration file for the check_exadata_zfs_cluster HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="yes"
# specify the user account for the SSH session to the ZFS appliance(s)
# [default: root]
ssh_user=""
# specify the private key file for the SSH session to the ZFS appliance(s)
# [default: ~root/.ssh/id_rsa]
ssh_key_file=""
# specify additional options for the SSH session to the ZFS appliance(s)
# [default: null]
ssh_opts=""
# specify the ZFS hostname(s) to check the cluster states on
# Format:
# zfs:<host_name>
# Examples:
# zfs:myzfs1
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -1,7 +1,7 @@
#******************************************************************************
# @(#) check_exadata_zfs_share_usage.conf
# @(#) check_exadata_zfs_logs.conf
#******************************************************************************
# This is a configuration file for the check_exadata_zfs_share_usage HC plugin.
# This is a configuration file for the check_exadata_zfs_logs HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
@ -25,7 +25,7 @@ ssh_opts=""
# specify the ZFS hostname(s), log name(s) & alert levels. Filters
# should be comma-separated. Following logs are supported (filters in brackets)
# alert (critical,major,minor
# alert (critical,major,minor)
# fltlog (critical,major,minor)
# system (error)
# scrk (failed)

View File

@ -0,0 +1,53 @@
#******************************************************************************
# @(#) check_exadata_zfs_pool_usage.conf
#******************************************************************************
# This is a configuration file for the check_exadata_zfs_pool_usage HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="yes"
# specify the user account for the SSH session to the ZFS appliance(s)
# [default: root]
ssh_user=""
# specify the private key file for the SSH session to the ZFS appliance(s)
# [default: ~root/.ssh/id_rsa]
ssh_key_file=""
# specify additional options for the SSH session to the ZFS appliance(s)
# [default: null]
ssh_opts=""
# specify the maximum % of space usage a share may reach (general threshold)
# [default: 90]
max_space_usage=90
# specify the ZFS hostname(s), pool name(s) and their maximum usage (in %)
# When not defining a threshold for a given share, the general threshold will
# be used (see above). When defining a threshold of 0 (zero), then the check
# will for this given pool will be skipped (this allows for exclusion of pools)
# In order to check pool(s) for a given ZFS appliance at least one configuration
# entry must be present: either a wildcard or custom entry.
# Format:
# zfs:<host_name>:<pool_name|*>:[<usage_threshold_%>]
# Examples:
# check pool1 on myzfs1 with a custom threshold of 75%
# zfs:myzfs1:pool1:75
# check all pools of myzfs2 with a custom threshold of 85%
# zfs:myzfs2:*:85
# check all shares of myzfs3 with the general threshold
# zfs:myzfs3:*:
# disable all shares of myzfs4 from checking
# zfs:myzfs4:*:0
# disable check of pool7 on myzfs5
# zfs:myzfs5:pool7:0
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -30,24 +30,29 @@ max_replication_lag=300
# specify the ZFS hostname(s), replication name(s) and their maximum lag (in seconds)
# When not defining a threshold for a given share, the general threshold will
# be used (see above). When defining a threshold of 0 (zero), then the check
# will for this give share will be skipped (this allows for exclusion of shares)
# will for this given share will be skipped (this allows for exclusion of shares)
# In order to check share(s) for a given ZFS appliance at least one configuration
# entry must be present: either a wildcard or custom entry.
# Caveat: any share must finally resolve to one entry only.
# Format:
# zfs:<host_name>:<replication_name|*>:<true|false|*>:<success|failed|*>:[<max_replication_lag>]
# zfs:<host_name>:<replication_name|*>:<true|false|*>:<success|failed|*>:[<max_replication_lag>]:[day1,day2,..|*>]:[<hour|<start_hour-end_hour>|*>]
#
# <day>: 3 letter day name (case insensitive)
# <hour>: 24 hours notation (start and end hours are inclusive)
#
# Examples:
# check rep_share1 on myzfs1 with a custom threshold of 300 seconds
# zfs:myzfs1:rep_share1:*:*:600
# check all shares of myzfs2 with a custom threshold of 1200 seconds
# zfs:myzfs2:*:*:*:1200
# check all shares of myzfs3 with the general threshold
# zfs:myzfs3:*:*:*:
# check rep_share1 on myzfs1 with a custom threshold of 300 seconds on every day of the week
# zfs:myzfs1:rep_share1:*:*:600:*
# check all shares of myzfs2 with a custom threshold of 1200 seconds on Sunday and Monday
# zfs:myzfs2:*:*:*:1200:Sun,Mon
# check all shares of myzfs3 with the general threshold but only on Friday between 7am-10m
# zfs:myzfs3:*:*:*:Fri:07-10
# disable all shares of myzfs4 from checking
# zfs:myzfs4:*:*:*:0
# zfs:myzfs4:*:*:*:0:*
# disable check of rep_share7 on myzfs5
# zfs:myzfs5:rep_share7:*:*:0
# check that rep_share4 on myzfs6 is inactive
# zfs:myzfs6:rep_share4:false:*:
# zfs:myzfs5:rep_share7:*:*:0:*
# check that rep_share4 on myzfs6 is inactive (every day of the week)
# zfs:myzfs6:rep_share4:false:*:*
#******************************************************************************

View File

@ -30,13 +30,14 @@ max_space_usage=90
# specify the ZFS hostname(s), project+share name(s) and their maximum usage (in %)
# When not defining a threshold for a given share, the general threshold will
# be used (see above). When defining a threshold of 0 (zero), then the check
# will for this give share will be skipped (this allows for exclusion of shares)
# will for this given share will be skipped (this allows for exclusion of shares)
# In order to check share(s) for a given ZFS appliance at least one configuration
# entry must be present: either a wildcard or custom entry.
# Caveat: any share must finally resolve to one entry only.
# Format:
# zfs:<host_name>:<project_name|*>:<share_name|*>:[<usage_threshold_%>]
# Examples:
# check share1 on myzfs1 with a custom threshold of 75%
# check share1 of projectX on myzfs1 with a custom threshold of 75%
# zfs:myzfs1:projectX:share1:75
# check all shares of myzfs2 with a custom threshold of 85%
# zfs:myzfs2:*:*:85
@ -44,7 +45,7 @@ max_space_usage=90
# zfs:myzfs3:*:*:
# disable all shares of myzfs4 from checking
# zfs:myzfs4:*:*:0
# disable check of share7 on myzfs5
# disable check of share7 of projectY on myzfs5
# zfs:myzfs5:projectY:share7:0

View File

@ -0,0 +1,31 @@
#******************************************************************************
# @(#) check_hpux_autofs.conf
#******************************************************************************
# This is a configuration file for the check_hpux_autofs HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="no"
# specify whether to fix autofs (if needed)
# [default: no]
fix_autofs="no"
# number of times to attempt to restart the autofs daemon
# (requires fix_autofs=yes)
# [default: 3]
retry_start=3
# number of seconds to sleep between daemon restart attempts
# (requires fix_autofs=yes)
# [default: 5]
sleep_time=5
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,25 @@
#******************************************************************************
# @(#) check_hpux_cron_status.conf
#******************************************************************************
# This is a configuration file for the check_hpux_cron_status HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="no"
# specify the wait time (in seconds) between registering and checking a cron task
# [default: 10]
wait_time=10
# specify the path the cron log file
# [default: /var/adm/cron/log]
cron_log="/var/adm/cron/log"
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,27 @@
#******************************************************************************
# @(#) check_hpux_defunct_processes.conf
#******************************************************************************
# This is a configuration file for the check_hpux_defunct_processes HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="yes"
# specify above which threshold of defunct processes to generate a HC fail event
# If group_by_ppid is set to 'yes' then the value of 'process_threshold' will
# apply for each PPID, otherwise it will apply to all defunct processes together
# [default: 10]
process_threshold=10
# specify whether to group by parent ID or not.
# [default: yes]
group_by_ppid="yes"
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -32,7 +32,7 @@ max_space_usage=90
# defining a threshold of 0 (zero), then the check will for this give filesystem
# will be skipped (this allows for exclusion of filesystems)
# Format:
# fs:<mount_point>:[<max_inode_usage_%>]:[<max_space_usage_%]
# fs:<mount_point>:[<max_inodes_usage_%>]:[<max_space_usage_%]
# Examples:
# check myfs1 with a custom inodes + space usage threshold
#fs:myfs1:70:95

View File

@ -11,7 +11,7 @@
# [default: no]
log_healthy="no"
# specify properties as displayed by the 'vzlist -a -H -o ctid,status,onboot' command
# specify properties as displayed by the 'hpvmstatus -M' command
# Format:
# [vpar:<parid>:<runtime_status>:<boot_status>]
# runtime_status should be 'on' or 'off'

View File

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

View File

@ -0,0 +1,41 @@
#******************************************************************************
# @(#) check_hpux_uptime.conf
#******************************************************************************
# This is a configuration file for the check_hpux_uptime HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="no"
# trigger event when current uptime is less than previously record uptime?
# [default: yes]
check_reboot="yes"
# time to wait before the current uptime is considered for the reboot check.
# Example: a value of 60m means the check for a previous reboot will be at earliest
# performed 1 hour after the last reboot of the host.
# Format: <value>m|h|d where m=minutes, h=hours, d=days (lowercase suffix).
# if no suffix is specified, then minutes are assumed.
# [default: 60m]
reboot_time="60m"
# trigger event when current uptime goes over the maximum threshold?
# [default: no]
check_old_age="no"
# time to expire before the current uptime is considered "old age".
# Example: a value of 365d means a must-reboot will be flagged at earliest after
# 1 year of uptime of the host
# Format: <value>m|h|d where m=minutes, h=hours, d=days (lowercase suffix).
# if no suffix is specified, then minutes are assumed.
# [default: 365d]
old_age_time="365d"
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,31 @@
#******************************************************************************
# @(#) check_linux_autofs.conf
#******************************************************************************
# This is a configuration file for the check_linux_autofs HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="no"
# specify whether to fix autofs (if needed)
# [default: no]
fix_autofs="no"
# number of times to attempt to restart the autofs daemon
# (requires fix_autofs=yes)
# [default: 3]
retry_start=3
# number of seconds to sleep between daemon restart attempts
# (requires fix_autofs=yes)
# [default: 5]
sleep_time=5
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,27 @@
#******************************************************************************
# @(#) check_linux_fail2ban_status.conf
#******************************************************************************
# This is a configuration file for the check_linux_fail2ban_status HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="no"
# specify which type of process check to use
# Format: <auto|pgrep|sysv|systemd>. NULL value equals to "auto"
# [default: auto]
check_type="auto"
# specify the list jails to status check (comma-separated)
# Format: jail1,jail2,jail3,...
# [default: none]
check_jails=""
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -0,0 +1,28 @@
#******************************************************************************
# @(#) check_linux_fetchmail_status.conf
#******************************************************************************
# This is a configuration file for the check_linux_fetchmail_status HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="no"
# specify the regex of error codes that will be used to search the log file_path
# [default: error|authfail|lockbusy|ioerr]
error_regex="error|authfail|lockbusy|ioerr"
# specify fetchmail details
# Format:
# fetchmail:<account>:<rc_file>:<check_log=Yes|No>
# Examples:
#fetchmail:vmail:/srv/vmail/janedoe/.fetchmailrc:Yes
#fetchmail:vmail:/srv/vmail/johndoe/.fetchmailrc:No
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -32,7 +32,7 @@ max_space_usage=90
# defining a threshold of 0 (zero), then the check will for this give filesystem
# will be skipped (this allows for exclusion of filesystems)
# Format:
# fs:<mount_point>:[<max_inode_usage_%>]:[<max_space_usage_%]
# fs:<mount_point>:[<max_inodes_usage_%>]:[<max_space_usage_%]
# Examples:
# check myfs1 with a custom inodes + space usage threshold
#fs:myfs1:70:95

View File

@ -12,18 +12,23 @@
log_healthy="no"
# location of 'hpacucli' tool
# [default: /usr/sbin/hpacucli]
hpacucli_bin="/usr/sbin/hpacucli"
# controller all show status (0=off, 1=on) [default: 1]
# controller all show status (0=off, 1=on)
# [default: 1]
do_acu_controller=1
# controller slot=X enclosure all show (0=off, 1=on) [default: 1]
# controller slot=X enclosure all show (0=off, 1=on)
# [default: 1]
do_acu_enclosure=1
# controller slot=X physicaldrive all show status (0=off, 1=on) [default: 1]
# controller slot=X physicaldrive all show status (0=off, 1=on)
# [default: 1]
do_acu_physical=1
# controller slot=X logicaldrive all show status (0=off, 1=on) [default: 1]
# controller slot=X logicaldrive all show status (0=off, 1=on)
# [default: 1]
do_acu_logical=1

View File

@ -12,21 +12,27 @@
log_healthy="no"
# location of 'hpasmcli' tool
# [default: /sbin/hpasmcli]
hpasmcli_bin="/sbin/hpasmcli"
# SHOW FANS (0=off, 1=on) [default: 1]
# SHOW FANS (0=off, 1=on)
# [default: 1]
do_asm_fans=1
# SHOW DIMM (0=off, 1=on) [default: 1]
# SHOW DIMM (0=off, 1=on)
# [default: 1]
do_asm_dimm=1
# SHOW POWERSUPPLY (0=off, 1=on) [default: 1]
# SHOW POWERSUPPLY (0=off, 1=on)
# [default: 1]
do_asm_powersupply=1
# SHOW SERVER (0=off, 1=on) [default: 1]
# SHOW SERVER (0=off, 1=on)
# [default: 1]
do_asm_server=1
# SHOW TEMPERATURE (0=off, 1=on) [default: 1]
# SHOW TEMPERATURE (0=off, 1=on)
# [default: 1]
do_asm_temperature=1

View File

@ -12,6 +12,7 @@
log_healthy="no"
# location of 'hpacucli' tool
# [default: /sbin/hplog]
hplog_bin="/sbin/hplog"
# comma-separated list of severities to search for (case insensitive)

View File

@ -12,18 +12,23 @@
log_healthy="no"
# location of 'hpssacli' tool
# [default: /usr/sbin/hpssacli]
hpssacli_bin="/usr/sbin/hpssacli"
# controller all show status (0=off, 1=on) [default: 1]
# controller all show status (0=off, 1=on)
# [default: 1]
do_ssa_controller=1
# controller slot=X enclosure all show (0=off, 1=on) [default: 1]
# controller slot=X enclosure all show (0=off, 1=on)
# [default: 1]
do_ssa_enclosure=1
# controller slot=X physicaldrive all show status (0=off, 1=on) [default: 1]
# controller slot=X physicaldrive all show status (0=off, 1=on)
# [default: 1]
do_ssa_physical=1
# controller slot=X logicaldrive all show status (0=off, 1=on) [default: 1]
# controller slot=X logicaldrive all show status (0=off, 1=on)
# [default: 1]
do_ssa_logical=1
#******************************************************************************

View File

@ -0,0 +1,34 @@
#******************************************************************************
# @(#) check_linux_httpd_status.conf
#******************************************************************************
# This is a configuration file for the check_linux_httpd_status HC plugin.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy="no"
# specify which type of process check to use
# Format: <auto|pgrep|sysv|systemd>. NULL value equals to "auto"
# [default: auto]
# [release >20191101]
check_type="auto"
# specify name of the httpd binary
# Format: httpd|apache|apache2
# [default: httpd]
# [release >20201010]
httpd_bin="httpd"
# specify custom path to the httpd binary
# [default: null]
# [release >20201010]
httpd_path=""
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -19,6 +19,11 @@ force_chrony="no"
# [default: no]
force_ntp="no"
# whether to force the use of systemd-timesyncd?
# [default: no]
# [release >20220129]
force_systemd="no"
# maximum allowed offset (in milliseconds (positive integers only)
# [default: 500]
max_offset=500

View File

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

View File

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

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