Main script
The main check_health.sh
script requires a configuration in /etc/opt/hc/core/check_health.conf
:
Settings apply for any release >20200407:
#******************************************************************************
# @(#) check_health.conf
#******************************************************************************
# This is the main configuration file for the check_health.sh tool.
# All lines starting with a '#' are comment lines.
# [default: indicates hardcoded script values if no value is defined here]
#******************************************************************************
# --- general settings ---
# maximum timeout for HC calls/plugins (seconds) [default: 60]
HC_TIME_OUT=60
# enable/disable logging of passed health checks (warning: this may rapidly grow the HC log)
# see also: '--log-healthy' command-line parameter
# 'log_healthy' setting in HC plugin configuration file(s)
# [values: Yes|No]
HC_LOG_HEALTHY="No"
# enable/disable healing logic if available in HC plugin(s)
# see also: '--no-fix' command-line parameter
# [values: Yes|No]
HC_WILL_FIX="No"
# cache "last" reporting entries. Set to 'Yes' to speed up reporting of the last
# registered HC events
# [values: Yes|No]
HC_REPORT_CACHE_LAST="Yes"
# cache "today" reporting entries. Set to 'Yes' to speed up reporting of today's
# registered HC events
# [values: Yes|No]
HC_REPORT_CACHE_TODAY="Yes"
#******************************************************************************
# End of FILE
#******************************************************************************
Plugins
Each individual HC plugin may use one or more (custom) configuration files, depending on what the HC code foresees. Some HC plugins may support a default configuration file which can be identified by following construct in the plugin code:
# ------------------------- CONFIGURATION starts here -------------------------
...
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
...
# ------------------------- CONFIGURATION ends here ---------------------------
HC plugin configuration are also located in /etc/opt/hc
and should carry the name of the HC plugin, e.g.:
# ls -l /etc/opt/hc/*conf
-rw-r--r-- 1 root sys 751 Apr 4 08:45 check_hpux_ignite_backup.conf
-rw-r--r-- 1 root sys 962 Apr 4 16:32 check_hpux_ioscan.conf
-rw-r--r-- 1 root sys 896 Apr 18 08:07 check_hpux_root_crontab.conf
-rw-r--r-- 1 root sys 763 Apr 8 15:18 check_serviceguard_cluster_status.conf
-rw-r--r-- 1 root sys 873 Apr 8 15:19 check_serviceguard_package_status.conf
...
Leave a comment