* New plugin check_hpux_fs_usage + check_linux_fs_usage()

* Fix for archiving issue (not rotating until HC_LOG becomes empty)
* Fix for data_space2comma -> data_comma2space
* Report layout updates
* Smaller fixes + updates
This commit is contained in:
Patrick Van der Veken 2019-01-24 20:53:51 +01:00
parent cbddbf0eec
commit 178dcc6ad3
94 changed files with 1160 additions and 273 deletions

View File

@ -66,6 +66,7 @@ This is the OS/platform plugin package"
file -m 755 check_hpux_file_change.sh file -m 755 check_hpux_file_change.sh
file -m 755 check_hpux_fs_mounts.sh file -m 755 check_hpux_fs_mounts.sh
file -m 755 check_hpux_fs_mounts_options.sh file -m 755 check_hpux_fs_mounts_options.sh
file -m 755 check_hpux_fs_usage.sh
file -m 755 check_hpux_ignite_backup.sh file -m 755 check_hpux_ignite_backup.sh
file -m 755 check_hpux_ioscan.sh file -m 755 check_hpux_ioscan.sh
file -m 755 check_hpux_guid_status.sh file -m 755 check_hpux_guid_status.sh
@ -108,6 +109,7 @@ This is the OS/platform plugin package"
file -m 644 check_hpux_file_age.conf.dist file -m 644 check_hpux_file_age.conf.dist
file -m 644 check_hpux_file_change.conf.dist file -m 644 check_hpux_file_change.conf.dist
file -m 644 check_hpux_fs_mounts_options.conf.dist file -m 644 check_hpux_fs_mounts_options.conf.dist
file -m 644 check_hpux_fs_usage.conf.dist
file -m 644 check_hpux_hpvm_vpar_status.conf.dist file -m 644 check_hpux_hpvm_vpar_status.conf.dist
file -m 644 check_hpux_ignite_backup.conf.dist file -m 644 check_hpux_ignite_backup.conf.dist
file -m 644 check_hpux_ioscan.conf.dist file -m 644 check_hpux_ioscan.conf.dist

View File

@ -13,8 +13,8 @@ URL: http://www.kudos.be
Requires: ksh,hc-linux Requires: ksh,hc-linux
BuildArch: noarch BuildArch: noarch
BuildRoot: %{_topdir}/%{name}-%{version}-root BuildRoot: %{_topdir}/%{name}-%{version}-root
%description %description
The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc.
This package contains platform/OS specific plugins. This package contains platform/OS specific plugins.
@ -31,6 +31,7 @@ cp ../SOURCES/lib/platform/linux/check_linux_burp_backup.sh $RPM_BUILD_ROOT/opt/
cp ../SOURCES/lib/platform/linux/check_linux_file_age.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_file_age.sh cp ../SOURCES/lib/platform/linux/check_linux_file_age.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_file_age.sh
cp ../SOURCES/lib/platform/linux/check_linux_file_change.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_file_change.sh cp ../SOURCES/lib/platform/linux/check_linux_file_change.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_file_change.sh
cp ../SOURCES/lib/platform/linux/check_linux_fs_mounts.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_fs_mounts.sh cp ../SOURCES/lib/platform/linux/check_linux_fs_mounts.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_fs_mounts.sh
cp ../SOURCES/lib/platform/linux/check_linux_fs_usage.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_fs_usage.sh
cp ../SOURCES/lib/platform/linux/check_linux_burp_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_burp_status.sh cp ../SOURCES/lib/platform/linux/check_linux_burp_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_burp_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_httpd_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_httpd_status.sh cp ../SOURCES/lib/platform/linux/check_linux_httpd_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_httpd_status.sh
cp ../SOURCES/lib/platform/linux/check_linux_named_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_named_status.sh cp ../SOURCES/lib/platform/linux/check_linux_named_status.sh $RPM_BUILD_ROOT/opt/hc/lib/platform/linux/check_linux_named_status.sh
@ -56,6 +57,7 @@ install -d -m 755 $RPM_BUILD_ROOT/etc/opt/hc
cp ../SOURCES/etc/check_linux_burp_backup.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_burp_backup.conf.dist cp ../SOURCES/etc/check_linux_burp_backup.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_burp_backup.conf.dist
cp ../SOURCES/etc/check_linux_file_age.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_file_age.conf.dist cp ../SOURCES/etc/check_linux_file_age.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_file_age.conf.dist
cp ../SOURCES/etc/check_linux_file_change.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_file_change.conf.dist cp ../SOURCES/etc/check_linux_file_change.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_file_change.conf.dist
cp ../SOURCES/etc/check_linux_fs_usage.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_fs_usage.conf.dist
cp ../SOURCES/etc/check_linux_hpasmcli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpasmcli.conf.dist cp ../SOURCES/etc/check_linux_hpasmcli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpasmcli.conf.dist
cp ../SOURCES/etc/check_linux_hpacucli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpacucli.conf.dist cp ../SOURCES/etc/check_linux_hpacucli.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hpacucli.conf.dist
cp ../SOURCES/etc/check_linux_hplog.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hplog.conf.dist cp ../SOURCES/etc/check_linux_hplog.conf.dist $RPM_BUILD_ROOT/etc/opt/hc/check_linux_hplog.conf.dist
@ -112,6 +114,7 @@ echo "INFO: finished post-uninstall script"
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_file_age.sh %attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_file_age.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_file_change.sh %attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_file_change.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_fs_mounts.sh %attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_fs_mounts.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_fs_usage.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_burp_status.sh %attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_burp_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_httpd_status.sh %attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_httpd_status.sh
%attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_named_status.sh %attr(755, root, root) /opt/hc/lib/platform/linux/check_linux_named_status.sh
@ -137,6 +140,7 @@ echo "INFO: finished post-uninstall script"
%attr(644, root, root) /etc/opt/hc/check_linux_burp_backup.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_burp_backup.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_file_age.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_file_age.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_file_change.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_file_change.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_fs_usage.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_hpasmcli.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_hpasmcli.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_hpacucli.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_hpacucli.conf.dist
%attr(644, root, root) /etc/opt/hc/check_linux_hplog.conf.dist %attr(644, root, root) /etc/opt/hc/check_linux_hplog.conf.dist
@ -155,6 +159,8 @@ echo "INFO: finished post-uninstall script"
%attr(644, root, root) /etc/opt/hc/core/templates/mail_body.tpl-check_linux_root_crontab %attr(644, root, root) /etc/opt/hc/core/templates/mail_body.tpl-check_linux_root_crontab
%changelog %changelog
* Tue Jan 22 2019 <patrick@kudos.be> - 0.1.2
- Added check_linux_fs_usage
* Tue Jul 10 2018 <patrick@kudos.be> - 0.1.1 * Tue Jul 10 2018 <patrick@kudos.be> - 0.1.1
- Added check_linux_process_limits - Added check_linux_process_limits
* Sat Apr 21 2018 <patrick@kudos.be> - 0.1.0 * Sat Apr 21 2018 <patrick@kudos.be> - 0.1.0

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_aix_file_age.conf.dist # @(#) check_aix_file_age.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_aix_file_age HC plugin. # This is a configuration file for the check_aix_file_age HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -12,4 +12,4 @@
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_aix_root_crontab.conf.dist # @(#) check_aix_root_crontab.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_aix_root_crontab HC plugin. # This is a configuration file for the check_aix_root_crontab HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -13,4 +13,4 @@
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_aix_subsystems.conf.dist # @(#) check_aix_subsystems.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_aix_subsystems HC plugin. # This is a configuration file for the check_aix_subsystems HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -32,4 +32,4 @@ IBM.CSMAgentRM
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_aix_sysbackup.conf.dist # @(#) check_aix_sysbackup.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_aix_sysbackup HC plugin. # This is a configuration file for the check_aix_sysbackup HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -19,4 +19,4 @@ backup_age=14
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -12,11 +12,11 @@ ignore_missing_fs=yes
# specify mount points and their options (use the mount options as displayed # specify mount points and their options (use the mount options as displayed
# by the 'mount' command; order of the options is not important) # by the 'mount' command; order of the options is not important)
# [fs:<mount point>:<mount options>] # [fs:<mount_point>:<mount_options>]
fs:myfs1:myopts1 #fs:my_fs1:my_opts1
fs:myfs2:myopts2 #fs:my_fs2:my_opts2
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -0,0 +1,40 @@
#******************************************************************************
# @(#) check_hpux_fs_usage.conf
#******************************************************************************
# This is a configuration file for the check_hpux_fs_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 whether to perform inode usage check
# [default: yes]
check_inodes_usage=yes
# specify whether to perform space usage check
# [default: yes]
check_space_usage=yes
# specify the maximum % of inodes usage a filesystem may reach (general threshold)
# [default: 90]
max_inodes_usage=90
# specify the maximum % of space usage a filesystem may reach (general threshold)
# [default: 90]
max_space_usage=90
# specify mount points and their maximum usage (in %). Leave undefined to
# perform check on all active filesystems. When not defining individual thresholds
# for a given filesystem, the general threshold will be used (see above)
# [fs:<mount_point>:<max_inode_usage_%>:<max_space_usage_%]
#fs:myfs1:70:95
#fs:myfs2:75:90
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_hpux_ignite_backup.conf.dist # @(#) check_hpux_ignite_backup.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_hpux_ignite_backup HC plugin. # This is a configuration file for the check_hpux_ignite_backup HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -16,4 +16,4 @@ exclude_hosts=""
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_hpux_ntp_status.conf.dist # @(#) check_hpux_ntp_status.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_hpux_ntp_status HC plugin. # This is a configuration file for the check_hpux_ntp_status HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_hpux_ovpa_status.conf.dist # @(#) check_hpux_ovpa_status.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_hpux_ovpa_status HC plugin. # This is a configuration file for the check_hpux_ovpa_status HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -17,4 +17,4 @@ ovpa_daemons=""
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_hpux_root_crontab.conf.dist # @(#) check_hpux_root_crontab.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_hpux_root_crontab HC plugin. # This is a configuration file for the check_hpux_root_crontab HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -11,4 +11,4 @@
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_hpux_sfm_status.conf.dist # @(#) check_hpux_sfm_status.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_hpux_sfm_status HC plugin. # This is a configuration file for the check_hpux_sfm_status HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_hpux_sg_cluster_config.conf.dist # @(#) check_hpux_sg_cluster_config.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_hpux_sg_cluster_config HC plugin. # This is a configuration file for the check_hpux_sg_cluster_config HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -13,4 +13,4 @@
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_hpux_sg_cluster_status.conf.dist # @(#) check_hpux_sg_cluster_status.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_hpux_sg_cluster_status HC plugin. # This is a configuration file for the check_hpux_sg_cluster_status HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -12,4 +12,4 @@
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_hpux_sg_package_config.conf.dist # @(#) check_hpux_sg_package_config.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_hpux_sg_package_config HC plugin. # This is a configuration file for the check_hpux_sg_package_config HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -17,4 +17,4 @@
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_hpux_sg_package_status.conf.dist # @(#) check_hpux_sg_package_status.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_hpux_sg_package_status HC plugin. # This is a configuration file for the check_hpux_sg_package_status HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -12,4 +12,4 @@
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_hpux_syslog.conf.dist # @(#) check_hpux_syslog.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_hpux_syslog HC plugin. # This is a configuration file for the check_hpux_syslog HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -17,4 +17,4 @@ syslog_classes="vmunix"
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -0,0 +1,40 @@
#******************************************************************************
# @(#) check_linux_fs_usage.conf
#******************************************************************************
# This is a configuration file for the check_linux_fs_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 whether to perform inode usage check
# [default: yes]
check_inodes_usage=yes
# specify whether to perform space usage check
# [default: yes]
check_space_usage=yes
# specify the maximum % of inodes usage a filesystem may reach (general threshold)
# [default: 90]
max_inodes_usage=90
# specify the maximum % of space usage a filesystem may reach (general threshold)
# [default: 90]
max_space_usage=90
# specify mount points and their maximum usage (in %). Leave undefined to
# perform check on all active filesystems. When not defining individual thresholds
# for a given filesystem, the general threshold will be used (see above)
# [fs:<mount_point>:<max_inode_usage_%>:<max_space_usage_%]
#fs:myfs1:70:95
#fs:myfs2:75:90
#******************************************************************************
# End of FILE
#******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_linux_ntp_status.conf.dist # @(#) check_linux_ntp_status.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_linux_ntp_status HC plugin. # This is a configuration file for the check_linux_ntp_status HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_linux_root_crontab.conf.dist # @(#) check_linux_root_crontab.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_linux_root_crontab HC plugin. # This is a configuration file for the check_linux_root_crontab HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -11,4 +11,4 @@
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_linux_sg_cluster_config.conf.dist # @(#) check_linux_sg_cluster_config.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_linux_sg_cluster_config HC plugin. # This is a configuration file for the check_linux_sg_cluster_config HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -13,4 +13,4 @@
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_linux_sg_cluster_status.conf.dist # @(#) check_linux_sg_cluster_status.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_linux_sg_cluster_status HC plugin. # This is a configuration file for the check_linux_sg_cluster_status HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -12,4 +12,4 @@
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_linux_sg_package_config.conf.dist # @(#) check_linux_sg_package_config.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_linux_sg_package_config HC plugin. # This is a configuration file for the check_linux_sg_package_config HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -17,4 +17,4 @@
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -1,5 +1,5 @@
#****************************************************************************** #******************************************************************************
# @(#) check_linux_sg_package_status.conf.dist # @(#) check_linux_sg_package_status.conf
#****************************************************************************** #******************************************************************************
# This is a configuration file for the check_linux_sg_package_status HC plugin. # This is a configuration file for the check_linux_sg_package_status HC plugin.
# All lines starting with a '#' are comment lines. # All lines starting with a '#' are comment lines.
@ -12,4 +12,4 @@
#****************************************************************************** #******************************************************************************
# End of FILE # End of FILE
#****************************************************************************** #******************************************************************************

View File

@ -37,6 +37,8 @@ typeset ARCHIVE_FILE=""
typeset ARCHIVE_RC=0 typeset ARCHIVE_RC=0
typeset YEAR_MONTH="" typeset YEAR_MONTH=""
typeset LOG_COUNT=0 typeset LOG_COUNT=0
typeset PRE_LOG_COUNT=0
typeset TODO_LOG_COUNT=0
typeset ARCHIVE_RC=0 typeset ARCHIVE_RC=0
typeset SAVE_HC_LOG="${HC_LOG}.$$" typeset SAVE_HC_LOG="${HC_LOG}.$$"
typeset TMP1_FILE="${TMP_DIR}/.$0.tmp1.archive.$$" typeset TMP1_FILE="${TMP_DIR}/.$0.tmp1.archive.$$"
@ -46,16 +48,24 @@ typeset TMP2_FILE="${TMP_DIR}/.$0.tmp2.archive.$$"
# shellcheck disable=SC2064 # shellcheck disable=SC2064
trap "rm -f ${TMP1_FILE} ${TMP2_FILE} ${SAVE_LOG_FILE} >/dev/null 2>&1; return 1" 1 2 3 15 trap "rm -f ${TMP1_FILE} ${TMP2_FILE} ${SAVE_LOG_FILE} >/dev/null 2>&1; return 1" 1 2 3 15
# get pre-archive log co
PRE_LOG_COUNT=$(wc -l ${HC_LOG} 2>/dev/null | cut -f1 -d' ' 2>/dev/null)
if (( PRE_LOG_COUNT == 0 ))
then
warn "${HC_LOG} is empty, nothing to archive"
return 0
fi
# isolate messages from HC, find unique %Y-%m combinations # isolate messages from HC, find unique %Y-%m combinations
grep ".*${LOG_SEP}${HC_NAME}${LOG_SEP}" ${HC_LOG} 2>/dev/null |\ grep ".*${LOG_SEP}${HC_NAME}${LOG_SEP}" ${HC_LOG} 2>/dev/null |\
cut -f1 -d"${LOG_SEP}" 2>/dev/null | cut -f1 -d' ' 2>/dev/null |\ cut -f1 -d"${LOG_SEP}" 2>/dev/null | cut -f1 -d' ' 2>/dev/null |\
cut -f1-2 -d'-' 2>/dev/null | sort -u 2>/dev/null |\ cut -f1-2 -d'-' 2>/dev/null | sort -u 2>/dev/null |\
while read YEAR_MONTH while read -r YEAR_MONTH
do do
# find all messages for that YEAR-MONTH combination # find all messages for that YEAR-MONTH combination
grep "${YEAR_MONTH}.*${LOG_SEP}${HC_NAME}${LOG_SEP}" ${HC_LOG} >${TMP1_FILE} grep "${YEAR_MONTH}.*${LOG_SEP}${HC_NAME}${LOG_SEP}" ${HC_LOG} >${TMP1_FILE}
LOG_COUNT=$(wc -l ${TMP1_FILE} 2>/dev/null | cut -f1 -d' ' 2>/dev/null) TODO_LOG_COUNT=$(wc -l ${TMP1_FILE} 2>/dev/null | cut -f1 -d' ' 2>/dev/null)
log "# of entries in ${YEAR_MONTH} to archive: ${LOG_COUNT}" log "# of entries in ${YEAR_MONTH} to archive: ${TODO_LOG_COUNT}"
# combine existing archived messages and resort # combine existing archived messages and resort
ARCHIVE_FILE="${ARCHIVE_DIR}/hc.${YEAR_MONTH}.log" ARCHIVE_FILE="${ARCHIVE_DIR}/hc.${YEAR_MONTH}.log"
@ -73,13 +83,15 @@ do
sort ${HC_LOG} >${TMP1_FILE} sort ${HC_LOG} >${TMP1_FILE}
comm -23 ${TMP1_FILE} ${ARCHIVE_FILE} 2>/dev/null >${TMP2_FILE} comm -23 ${TMP1_FILE} ${ARCHIVE_FILE} 2>/dev/null >${TMP2_FILE}
if [[ -s ${TMP2_FILE} ]] # check archive action (HC_LOG should not be empty unless it contained
# only messages from one single HC plugin before archival)
if [[ -s ${TMP2_FILE} ]] || (( PRE_LOG_COUNT == TODO_LOG_COUNT ))
then then
mv ${TMP2_FILE} ${HC_LOG} 2>/dev/null || { mv ${TMP2_FILE} ${HC_LOG} 2>/dev/null || {
warn "failed to move HC log file, aborting" warn "failed to move HC log file, aborting"
return 2 return 2
} }
LOG_COUNT=$(wc -l ${HC_LOG} 2>/dev/null | cut -f1 -d' ' 2>/dev/null ) LOG_COUNT=$(wc -l ${HC_LOG} 2>/dev/null | cut -f1 -d' ' 2>/dev/null)
log "# entries in ${HC_LOG} now: ${LOG_COUNT}" log "# entries in ${HC_LOG} now: ${LOG_COUNT}"
ARCHIVE_RC=1 ARCHIVE_RC=1
else else

View File

@ -30,7 +30,7 @@
function report_std function report_std
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="AIX,HP-UX,Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="AIX,HP-UX,Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
@ -63,7 +63,7 @@ fi
# --last report # --last report
if (( ARG_LAST > 0 )) if (( ARG_LAST > 0 ))
then then
printf "\n| %-30s | %-20s | %-14s | %-4s\n" "HC" "Timestamp" "FAIL ID" "STC (combined value)" printf "\n| %-40s | %-20s | %-14s | %-4s\n" "HC" "Timestamp" "FAIL ID" "STC (combined value)"
# shellcheck disable=SC2183 # shellcheck disable=SC2183
printf "%100s\n" | tr ' ' - printf "%100s\n" | tr ' ' -
# loop over all HCs # loop over all HCs
@ -102,7 +102,7 @@ then
' 2>/dev/null | read _HC_LAST_FAIL_ID _HC_LAST_STC ' 2>/dev/null | read _HC_LAST_FAIL_ID _HC_LAST_STC
fi fi
# report on findings # report on findings
printf "| %-30s | %-20s | %-14s | %-4s\n" \ printf "| %-40s | %-20s | %-14s | %-4s\n" \
"${_HC_LAST}" "${_HC_LAST_TIME}" "${_HC_LAST_FAIL_ID}" "${_HC_LAST_STC}" "${_HC_LAST}" "${_HC_LAST_TIME}" "${_HC_LAST_FAIL_ID}" "${_HC_LAST_STC}"
done done
# disclaimer # disclaimer
@ -134,7 +134,7 @@ else
# global or detailed? # global or detailed?
if (( ARG_DETAIL == 0 )) if (( ARG_DETAIL == 0 ))
then then
printf "\n| %-20s | %-14s | %-30s | %-s\n" \ printf "\n| %-20s | %-14s | %-40s | %-s\n" \
"Timestamp" "FAIL ID" "HC" "Message" "Timestamp" "FAIL ID" "HC" "Message"
# shellcheck disable=SC2183 # shellcheck disable=SC2183
printf "%120s\n" | tr ' ' - printf "%120s\n" | tr ' ' -
@ -146,7 +146,7 @@ else
' '
{ {
if ($5 ~ id_needle && NF <= '"${NUM_LOG_FIELDS}"') { if ($5 ~ id_needle && NF <= '"${NUM_LOG_FIELDS}"') {
printf ("| %-20s | %-14s | %-30s | %-s\n", $1, $5, $2, $4) printf ("| %-20s | %-14s | %-40s | %-s\n", $1, $5, $2, $4)
} }
} }
' 2>/dev/null ' 2>/dev/null

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_aix_errpt # @(#) MAIN: check_aix_errpt
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-15: initial version [Patrick Van der Veken] # @(#) 2013-05-15: initial version [Patrick Van der Veken]
# @(#) 2013-05-29: small fix errpt last check time [Patrick Van der Veken] # @(#) 2013-05-29: small fix errpt last check time [Patrick Van der Veken]
# @(#) 2013-06-24: big fix errpt last check time [Patrick Van der Veken] # @(#) 2013-06-24: big fix errpt last check time [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -34,14 +35,14 @@
function check_aix_errpt function check_aix_errpt
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,11 +19,12 @@
# @(#) MAIN: check_aix_file_age # @(#) MAIN: check_aix_file_age
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-27: initial version [Patrick Van der Veken] # @(#) 2013-05-27: initial version [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -33,14 +34,14 @@ function check_aix_file_age
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_aix_file_change # @(#) MAIN: check_aix_file_change
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc(), warn(), # REQUIRES: data_comma2space(), init_hc(), log_hc(), warn(),
# openssl (sha256 digest) OR cksum (CRC32 digest) # openssl (sha256 digest) OR cksum (CRC32 digest)
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-05-18: initial version [Patrick Van der Veken] # @(#) 2017-05-18: initial version [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,14 +36,14 @@ function check_aix_file_change
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,10 +19,11 @@
# @(#) MAIN: check_aix_fs_mounts # @(#) MAIN: check_aix_fs_mounts
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-15: initial version [Patrick Van der Veken] # @(#) 2013-05-15: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -31,14 +32,14 @@
function check_aix_fs_mounts function check_aix_fs_mounts
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2013-05-15" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,10 +19,11 @@
# @(#) MAIN: check_aix_lppchk # @(#) MAIN: check_aix_lppchk
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-17: initial version [Patrick Van der Veken] # @(#) 2013-05-17: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -31,14 +32,14 @@
function check_aix_lppchk function check_aix_lppchk
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2013-05-17" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,10 +19,11 @@
# @(#) MAIN: check_aix_paths # @(#) MAIN: check_aix_paths
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-07: initial version [Patrick Van der Veken] # @(#) 2013-05-07: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -31,14 +32,14 @@
function check_aix_paths function check_aix_paths
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2013-05-07" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,10 +19,11 @@
# @(#) MAIN: check_aix_root_crontab # @(#) MAIN: check_aix_root_crontab
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-09-19: initial version [Patrick Van der Veken] # @(#) 2013-09-19: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -32,14 +33,14 @@ function check_aix_root_crontab
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2013-09-19" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,10 +19,11 @@
# @(#) MAIN: check_aix_subsystems # @(#) MAIN: check_aix_subsystems
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-07: initial version [Patrick Van der Veken] # @(#) 2013-05-07: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -32,14 +33,14 @@ function check_aix_subsystems
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2013-05-07" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,10 +19,11 @@
# @(#) MAIN: check_aix_sysbackup # @(#) MAIN: check_aix_sysbackup
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-28: initial version [Patrick Van der Veken] # @(#) 2013-05-28: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -34,14 +35,14 @@ function check_aix_sysbackup
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
# mksysb identifier prefix of error code(s) # mksysb identifier prefix of error code(s)
typeset _MKSYSB_NEEDLE="^0512" typeset _MKSYSB_NEEDLE="^0512"
typeset _VERSION="2013-05-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,11 +19,12 @@
# @(#) MAIN: check_aix_topasrec # @(#) MAIN: check_aix_topasrec
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-07: initial version [Patrick Van der Veken] # @(#) 2013-05-07: initial version [Patrick Van der Veken]
# @(#) 2013-08-16: comparison fix [Patrick Van der Veken] # @(#) 2013-08-16: comparison fix [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -32,14 +33,14 @@
function check_aix_topasrec function check_aix_topasrec
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2013-08-16" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match typeset _SUPPORTED_PLATFORMS="AIX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,11 +19,12 @@
# @(#) MAIN: check_hpux_autopath # @(#) MAIN: check_hpux_autopath
# DOES: see _show_usage(). # DOES: see _show_usage().
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-08-29: initial version [Patrick Van der Veken] # @(#) 2013-08-29: initial version [Patrick Van der Veken]
# @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken] # @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -34,14 +35,14 @@ function check_hpux_autopath
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _AUTOPATH_BIN="/sbin/autopath" typeset _AUTOPATH_BIN="/sbin/autopath"
typeset _AUTOPATH_NEEDLE="Failed" typeset _AUTOPATH_NEEDLE="Failed"
typeset _VERSION="2018-05-20" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,10 +19,11 @@
# @(#) MAIN: check_hpux_cdsf_cluster # @(#) MAIN: check_hpux_cdsf_cluster
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-07-21: initial version [Patrick Van der Veken] # @(#) 2016-07-21: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -31,7 +32,7 @@
function check_hpux_cdsf_cluster function check_hpux_cdsf_cluster
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2018-07-21" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
typeset _CDSF_BIN="/usr/sbin/io_cdsf_config" typeset _CDSF_BIN="/usr/sbin/io_cdsf_config"
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
@ -39,7 +40,7 @@ typeset _CDSF_BIN="/usr/sbin/io_cdsf_config"
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _LOG_HEALTHY=0 typeset _LOG_HEALTHY=0
typeset _CDSF_CONFLICTS="" typeset _CDSF_CONFLICTS=""

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_hpux_drd_status # @(#) MAIN: check_hpux_drd_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), data_get_lvalue_from_config(), data_date2epoch(), # REQUIRES: data_comma2space(), data_get_lvalue_from_config(), data_date2epoch(),
# data_lc(), data_strip_space(), data_strip_outer_space(), # data_lc(), data_strip_space(), data_strip_outer_space(),
# dump_logs(), init_hc(), log_hc(), warn() # dump_logs(), init_hc(), log_hc(), warn()
# #
@ -39,14 +39,14 @@ function check_hpux_drd_status
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _DRD_BIN="/opt/drd/bin/drd" typeset _DRD_BIN="/opt/drd/bin/drd"
typeset _VERSION="2018-10-31" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _RC=0 typeset _RC=0

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_hpux_file_age # @(#) MAIN: check_hpux_file_age
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-27: initial version [Patrick Van der Veken] # @(#) 2013-05-27: initial version [Patrick Van der Veken]
# @(#) 2013-05-29: added local trap for cleanup [Patrick Van der Veken] # @(#) 2013-05-29: added local trap for cleanup [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,14 +36,14 @@ function check_hpux_file_age
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_hpux_file_change # @(#) MAIN: check_hpux_file_change
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc(), warn(), # REQUIRES: data_comma2space(), init_hc(), log_hc(), warn(),
# openssl (sha256 digest) OR cksum (CRC32 digest) # openssl (sha256 digest) OR cksum (CRC32 digest)
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-05-18: initial version [Patrick Van der Veken] # @(#) 2017-05-18: initial version [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,14 +36,14 @@ function check_hpux_file_change
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,12 +19,13 @@
# @(#) MAIN: check_hpux_fs_mounts # @(#) MAIN: check_hpux_fs_mounts
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-27: initial version [Patrick Van der Veken] # @(#) 2013-05-27: initial version [Patrick Van der Veken]
# @(#) 2016-04-04: exclude dump/swap spaces (...) [Patrick Van der Veken] # @(#) 2016-04-04: exclude dump/swap spaces (...) [Patrick Van der Veken]
# @(#) 2016-07-04: fix for nfs exclusion [Patrick Van der Veken] # @(#) 2016-07-04: fix for nfs exclusion [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -33,14 +34,14 @@
function check_hpux_fs_mounts function check_hpux_fs_mounts
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2016-07-04" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0
@ -59,12 +60,16 @@ done
# collect data (mount only) # collect data (mount only)
mount >>${HC_STDOUT_LOG} 2>>${HC_STDERR_LOG} mount >>${HC_STDOUT_LOG} 2>>${HC_STDERR_LOG}
(( $? == 0)) || return $? if (( $? > 0 ))
then
warn "unable to execute {mount} command"
return 1
fi
# check for each configured file system (except / and dump/swap) # check for each configured file system (except / and dump/swap)
grep -v -E -e '^#' -e '^$' \ grep -v -E -e '^#' -e '^$' \
-e '[[:space:]]*\/[[:space:]]+' -e '\.\.\.' /etc/fstab 2>/dev/null |\ -e '[[:space:]]*\/[[:space:]]+' -e '\.\.\.' /etc/fstab 2>/dev/null |\
awk '{print $2}' |\ awk '{print $2}' 2>/dev/null |\
while read _FS while read _FS
do do
_FS_COUNT=$(grep -c -E -e "^${_FS}[ \t]+on.*[ \t]+" ${HC_STDOUT_LOG} 2>/dev/null) _FS_COUNT=$(grep -c -E -e "^${_FS}[ \t]+on.*[ \t]+" ${HC_STDOUT_LOG} 2>/dev/null)

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_hpux_fs_mounts_options # @(#) MAIN: check_hpux_fs_mounts_options
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-04-04: original version [Patrick Van der Veken] # @(#) 2016-04-04: original version [Patrick Van der Veken]
# @(#) 2016-12-02: add support for ignore_missing_fs option [Patrick Van der Veken] # @(#) 2016-12-02: add support for ignore_missing_fs option [Patrick Van der Veken]
# @(#) 2017-07-31: added support for current/expected value output [Patrick Van der Veken] # @(#) 2017-07-31: added support for current/expected value output [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,14 +36,14 @@ function check_hpux_fs_mounts_options
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -0,0 +1,334 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) check_hpux_fs_usage.sh
#******************************************************************************
# @(#) Copyright (C) 2019 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
#******************************************************************************
#
# DOCUMENTATION (MAIN)
# -----------------------------------------------------------------------------
# @(#) MAIN: check_hpux_fs_usage
# DOES: see _show_usage()
# EXPECTS: n/a
# REQUIRES: data_comma2space(), init_hc(), log_hc(), data_is_numeric(), warn()
#
# @(#) HISTORY:
# @(#) 2019-01-24: initial version [Patrick Van der Veken]
# -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#******************************************************************************
# -----------------------------------------------------------------------------
function check_hpux_fs_usage
{
# ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here ---------------------------
# set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_comma2space "$*")
typeset _ARG=""
typeset _MSG=""
typeset _STC=0
typeset _CFG_HEALTHY=""
typeset _LOG_HEALTHY=0
typeset _CFG_CHECK_INODES_USAGE=""
typeset _CFG_CHECK_SPACE_USAGE=""
typeset _CFG_MAX_INODES_USAGE=""
typeset _CFG_MAX_SPACE_USAGE=""
typeset _CFG_FS=""
typeset _CFG_INODES_THRESHOLD=""
typeset _CFG_SPACE_THRESHOLD=""
typeset _FS=""
typeset _DO_INODES=0
typeset _DO_SPACE=0
typeset _INODES_USAGE=1
typeset _SPACE_USAGE=1
typeset _LINE_COUNT=1
# handle arguments (originally comma-separated)
for _ARG in ${_ARGS}
do
case "${_ARG}" in
help)
_show_usage $0 ${_VERSION} ${_CONFIG_FILE} && return 0
;;
check_inodes)
log "enabled check of inodes usage via cmd-line option"
_DO_INODES=1
;;
check_space)
log "enabled check of space usage via cmd-line option"
_DO_SPACE=1
;;
esac
done
# handle configuration file
[[ -n "${ARG_CONFIG_FILE}" ]] && _CONFIG_FILE="${ARG_CONFIG_FILE}"
if [[ ! -r ${_CONFIG_FILE} ]]
then
warn "unable to read configuration file at ${_CONFIG_FILE}"
return 1
fi
# read configuration values
_CFG_HEALTHY=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'log_healthy')
case "${_CFG_HEALTHY}" in
yes|YES|Yes)
_LOG_HEALTHY=1
;;
*)
# do not override hc_arg
(( _LOG_HEALTHY > 0 )) || _LOG_HEALTHY=0
;;
esac
_CFG_CHECK_INODES_USAGE=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'check_inodes_usage')
case "${_CFG_CHECK_INODES_USAGE}" in
yes|YES|Yes)
log "enabled check of inodes usage via configuration file"
_DO_INODES=1
;;
*)
: # not set
;;
esac
_CFG_CHECK_SPACE_USAGE=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'check_space_usage')
case "${_CFG_CHECK_SPACE_USAGE}" in
yes|YES|Yes)
log "enabled check of space usage via configuration file"
_DO_SPACE=1
;;
*)
: # not set
;;
esac
_CFG_MAX_INODES_USAGE=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'max_inodes_usage')
if [[ -z "${_CFG_MAX_INODES_USAGE}" ]]
then
# default
_CFG_MAX_INODES_USAGE=90
fi
_CFG_MAX_SPACE_USAGE=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'max_space_usage')
if [[ -z "${_CFG_MAX_SPACE_USAGE}" ]]
then
# default
_CFG_MAX_SPACE_USAGE=90
fi
if (( _DO_INODES == 0 && _DO_SPACE == 0 ))
then
warn "you must enable at least one check (inode and/or space)"
return 1
fi
# log_healthy
(( ARG_LOG_HEALTHY > 0 )) && _LOG_HEALTHY=1
if (( _LOG_HEALTHY > 0 ))
then
if (( ARG_LOG > 0 ))
then
log "logging/showing passed health checks"
else
log "showing passed health checks (but not logging)"
fi
else
log "not logging/showing passed health checks"
fi
# collect data (use a rewritten one-liner bdf, remove % signs and invalidate the
# result if we get non-empty STDERR). Output will be FS<space>INODES_%<space>SPACE_%
bdf -il 2>${HC_STDERR_LOG} |\
awk '{gsub(/%/,"");if ($0~/^\//&&NF>2){print $9, $5, $8;};if($0!~/^\//&&NF>2){print $8, $4, $7;}}' >>${HC_STDOUT_LOG} 2>>${HC_STDERR_LOG}
if [[ -s ${HC_STDERR_LOG} ]]
then
warn "error(s) occurred executing {bdf -il}"
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && dump_logs
return 1
fi
# check for each configured filesystem or for all
if (( $(grep -c -i '^fs:' ${_CONFIG_FILE} 2>/dev/null) > 0 ))
then
# 1) --- configured FS ---
# a) --- inodes ---
if (( _DO_INODES > 0 ))
then
_LINE_COUNT=1
grep -i '^fs:' ${_CONFIG_FILE} 2>/dev/null |\
while IFS=':' read _ _CFG_FS _CFG_INODES_THRESHOLD _
do
# report on missing FS name of threshold
if [[ -z "${_CFG_FS}" ]] && [[ -z "${_CFG_INODES_THRESHOLD}" ]]
then
warn "missing filesystem name and/or threshold in configuration file ${_CONFIG_FILE} at data line ${_LINE_COUNT}"
continue
fi
data_is_numeric ${_CFG_INODES_THRESHOLD}
if (( $? > 0 ))
then
warn "parameter is not numeric in configuration file ${_CONFIG_FILE} at data line ${_LINE_COUNT}"
continue
fi
if (( _CFG_INODES_THRESHOLD == 0 || _CFG_INODES_THRESHOLD >= 100 ))
then
(( ARG_DEBUG > 0 )) && debug "found out-of-bounds inodes threshold for ${_CFG_FS}, using general threshold"
_CFG_INODES_THRESHOLD=${_CFG_MAX_INODES_USAGE}
fi
_INODES_USAGE=$(grep -E -e "^${_CFG_FS} " ${HC_STDOUT_LOG} 2>/dev/null | awk '{print $2}' 2>/dev/null)
data_is_numeric ${_INODES_USAGE}
if (( $? > 0 ))
then
warn "discovered value for inode usage is incorrect [${_CFG_FS}:${_INODES_USAGE}]"
continue
fi
# check against the threshold
if (( _INODES_USAGE > _CFG_INODES_THRESHOLD ))
then
_MSG="${_CFG_FS} exceedes its inode threshold (${_INODES_USAGE}%>${_CFG_INODES_THRESHOLD}%)"
_STC=1
else
_MSG="${_CFG_FS} does not exceede its inode threshold (${_INODES_USAGE}%<=${_CFG_INODES_THRESHOLD}%)"
_STC=0
fi
if (( _LOG_HEALTHY > 0 || _STC > 0 ))
then
log_hc "$0" ${_STC} "${_MSG}" ${_INODES_USAGE} ${_CFG_INODES_THRESHOLD}
fi
_LINE_COUNT=$(( _LINE_COUNT + 1 ))
done
fi
# a) --- space ---
if (( _DO_SPACE > 0 ))
then
_LINE_COUNT=1
grep -i '^fs:' ${_CONFIG_FILE} 2>/dev/null |\
while IFS=':' read _ _CFG_FS _ _CFG_SPACE_THRESHOLD _
do
# report on missing FS name of threshold
if [[ -z "${_CFG_FS}" ]] && [[ -z "${_CFG_SPACE_THRESHOLD}" ]]
then
warn "missing filesystem name and/or threshold in configuration file ${_CONFIG_FILE} at data line ${_LINE_COUNT}"
continue
fi
data_is_numeric ${_CFG_SPACE_THRESHOLD}
if (( $? > 0 ))
then
warn "parameter is not numeric in configuration file ${_CONFIG_FILE} at data line ${_LINE_COUNT}"
continue
fi
if (( _CFG_SPACE_THRESHOLD == 0 || _CFG_SPACE_THRESHOLD >= 100 ))
then
(( ARG_DEBUG > 0 )) && debug "found out-of-bounds space threshold for ${_CFG_FS}, using general threshold"
_CFG_SPACE_THRESHOLD=${_CFG_MAX_SPACE_USAGE}
fi
_SPACE_USAGE=$(grep -E -e "^${_CFG_FS} " ${HC_STDOUT_LOG} 2>/dev/null | awk '{print $3}' 2>/dev/null)
data_is_numeric ${_SPACE_USAGE}
if (( $? > 0 ))
then
warn "discovered value for space usage is incorrect [${_CFG_FS}:${_SPACE_USAGE}]"
continue
fi
# check against the threshold
if (( _SPACE_USAGE > _CFG_SPACE_THRESHOLD ))
then
_MSG="${_CFG_FS} exceedes its space threshold (${_SPACE_USAGE}%>${_CFG_SPACE_THRESHOLD}%)"
_STC=1
else
_MSG="${_CFG_FS} does not exceede its space threshold (${_SPACE_USAGE}%<=${_CFG_SPACE_THRESHOLD}%)"
_STC=0
fi
if (( _LOG_HEALTHY > 0 || _STC > 0 ))
then
log_hc "$0" ${_STC} "${_MSG}" ${_SPACE_USAGE} ${_CFG_SPACE_THRESHOLD}
fi
_LINE_COUNT=$(( _LINE_COUNT + 1 ))
done
fi
else
# 2) --- ALL FS ---
grep '^\/' ${HC_STDOUT_LOG} 2>/dev/null | awk '{print $1}' 2>/dev/null |\
while read _FS
do
# a) --- inodes ---
_INODES_USAGE=$(grep "^${_FS} " ${HC_STDOUT_LOG} 2>/dev/null | awk '{print $2}' 2>/dev/null)
data_is_numeric ${_INODES_USAGE}
if (( $? > 0 ))
then
warn "discovered value for inode usage is incorrect [${_FS}:${_INODES_USAGE}]"
continue
fi
# check against the threshold
if (( _INODES_USAGE > _CFG_MAX_INODES_USAGE ))
then
_MSG="${_FS} exceedes its inode threshold (${_INODES_USAGE}%>${_CFG_MAX_INODES_USAGE}%)"
_STC=1
else
_MSG="${_FS} does not exceede its inode threshold (${_INODES_USAGE}%<=${_CFG_MAX_INODES_USAGE}%)"
_STC=0
fi
if (( _LOG_HEALTHY > 0 || _STC > 0 ))
then
log_hc "$0" ${_STC} "${_MSG}" ${_INODES_USAGE} ${_CFG_MAX_INODES_USAGE}
fi
# b) --- space ---
_SPACE_USAGE=$(grep "^${_FS} " ${HC_STDOUT_LOG} 2>/dev/null | awk '{print $3}' 2>/dev/null)
data_is_numeric ${_SPACE_USAGE}
if (( $? > 0 ))
then
warn "discovered value for space usage is incorrect [${_FS}:${_SPACE_USAGE}]"
continue
fi
# check against the threshold
if (( _SPACE_USAGE > _CFG_MAX_SPACE_USAGE ))
then
_MSG="${_FS} exceedes its space threshold (${_SPACE_USAGE}%>${_CFG_MAX_SPACE_USAGE}%)"
_STC=1
else
_MSG="${_FS} does not exceede its space threshold (${_SPACE_USAGE}%<=${_CFG_MAX_SPACE_USAGE}%)"
_STC=0
fi
if (( _LOG_HEALTHY > 0 || _STC > 0 ))
then
log_hc "$0" ${_STC} "${_MSG}" ${_SPACE_USAGE} ${_CFG_MAX_SPACE_USAGE}
fi
done
fi
return 0
}
# -----------------------------------------------------------------------------
function _show_usage
{
cat <<- EOT
NAME : $1
VERSION : $2
CONFIG : $3 with formatted stanzas (optional):
fs:<fs_name>:<max_inodes_usage_in_%>:<max_space_usage_in%>
Other options:
check_inodes_usage=<yes|no>
check_space_usage=<yes|no>
max_inodes_usage=<general_inodes_usage_treshold>
max_space_usage=<general_space_usage_treshold>
PURPOSE : Checks the inodes & space usage for the configured or all (local) filesystems
EOT
return 0
}
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -19,11 +19,12 @@
# @(#) MAIN: check_hpux_guid_status # @(#) MAIN: check_hpux_guid_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-05-18: initial version [Patrick Van der Veken] # @(#) 2017-05-18: initial version [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -32,14 +33,14 @@
function check_hpux_guid_status function check_hpux_guid_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _GUID_PID="" typeset _GUID_PID=""
typeset _MSG="" typeset _MSG=""

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_hpux_hpvm_vpar_status # @(#) MAIN: check_hpux_hpvm_vpar_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), dump_logs(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), dump_logs(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-06-01: initial version [Patrick Van der Veken] # @(#) 2017-06-01: initial version [Patrick Van der Veken]
# @(#) 2017-06-08: return 1 on error [Patrick Van der Veken] # @(#) 2017-06-08: return 1 on error [Patrick Van der Veken]
# @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken] # @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -36,14 +37,14 @@ function check_hpux_hpvm_vpar_status
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _HPVMSTATUS_BIN="/opt/hpvm/bin/hpvmstatus" typeset _HPVMSTATUS_BIN="/opt/hpvm/bin/hpvmstatus"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _LINE_COUNT=1 typeset _LINE_COUNT=1
typeset _PAR_ENTRY="" typeset _PAR_ENTRY=""

View File

@ -19,11 +19,12 @@
# @(#) MAIN: check_hpux_httpd_status # @(#) MAIN: check_hpux_httpd_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-04-23: initial version [Patrick Van der Veken] # @(#) 2017-04-23: initial version [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -33,14 +34,14 @@ function check_hpux_httpd_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _HTTPD_PID_FILE="/var/run/httpd/httpd.pid" typeset _HTTPD_PID_FILE="/var/run/httpd/httpd.pid"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _HTTPD_BIN="" typeset _HTTPD_BIN=""
typeset _HTTPD_PID="" typeset _HTTPD_PID=""

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_hpux_ignite_backup # @(#) MAIN: check_hpux_ignite_backup
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-28: initial version [Patrick Van der Veken] # @(#) 2013-05-28: initial version [Patrick Van der Veken]
@ -27,6 +27,7 @@
# @(#) parameter [Patrick Van der Veken] # @(#) parameter [Patrick Van der Veken]
# @(#) 2016-06-03: small fix [Patrick Van der Veken] # @(#) 2016-06-03: small fix [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -38,14 +39,14 @@ function check_hpux_ignite_backup
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
# backup DONE identifier # backup DONE identifier
typeset _IGNITE_NEEDLE="^DONE" typeset _IGNITE_NEEDLE="^DONE"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_hpux_ioscan # @(#) MAIN: check_hpux_ioscan
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), data_comma2pipe(), data_dequote(), dump_logs(), # REQUIRES: data_comma2space(), data_comma2pipe(), data_dequote(), dump_logs(),
# init_hc(), log_hc(), warn() # init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
@ -30,6 +30,7 @@
# @(#) 2018-05-11: small optimizations [Patrick Van der Veken] # @(#) 2018-05-11: small optimizations [Patrick Van der Veken]
# @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken] # @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -41,14 +42,14 @@ function check_hpux_ioscan
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _IOSCAN_BIN="/usr/sbin/ioscan" typeset _IOSCAN_BIN="/usr/sbin/ioscan"
typeset _IOSCAN_OPTS="-Fn" typeset _IOSCAN_OPTS="-Fn"
typeset _VERSION="2018-08-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_hpux_kernel_params # @(#) MAIN: check_hpux_kernel_params
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), dump_logs(), init_hc(), log_hc() # REQUIRES: data_comma2space(), dump_logs(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-12-22: original version [Patrick Van der Veken] # @(#) 2017-12-22: original version [Patrick Van der Veken]
# @(#) 2018-01-05: added validation on config values [Patrick Van der Veken] # @(#) 2018-01-05: added validation on config values [Patrick Van der Veken]
# @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken] # @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -36,14 +37,14 @@ function check_hpux_kernel_params
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _KCTUNE_BIN="/usr/sbin/kctune" typeset _KCTUNE_BIN="/usr/sbin/kctune"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_hpux_kernel_usage # @(#) MAIN: check_hpux_kernel_usage
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), dump_logs(), init_hc(), log_hc() # REQUIRES: data_comma2space(), dump_logs(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-12-22: original version [Patrick Van der Veken] # @(#) 2017-12-22: original version [Patrick Van der Veken]
@ -27,6 +27,7 @@
# @(#) 2018-01-09: bug fix [Patrick Van der Veken] # @(#) 2018-01-09: bug fix [Patrick Van der Veken]
# @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken] # @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -37,14 +38,14 @@ function check_hpux_kernel_usage
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _KCUSAGE_BIN="/usr/sbin/kcusage" typeset _KCUSAGE_BIN="/usr/sbin/kcusage"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_hpux_lunpaths # @(#) MAIN: check_hpux_lunpaths
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-12-20: initial version [Patrick Van der Veken] # @(#) 2017-12-20: initial version [Patrick Van der Veken]
# @(#) 2018-18-22: reworked discovery routine (accommdate large number of LUNS) # @(#) 2018-18-22: reworked discovery routine (accommdate large number of LUNS)
# @(#) [Patrick Van der Veken] # @(#) [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -38,14 +39,14 @@ typeset _IOSCAN_BIN="/usr/sbin/ioscan"
typeset _IOSCAN_OPTS="-C disk -P wwid" typeset _IOSCAN_OPTS="-C disk -P wwid"
typeset _SCSIMGR_BIN="/usr/sbin/scsimgr" typeset _SCSIMGR_BIN="/usr/sbin/scsimgr"
typeset _SCSIMGR_OPTS="-v get_info all_lun" typeset _SCSIMGR_OPTS="-v get_info all_lun"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,10 +19,11 @@
# @(#) MAIN: check_hpux_named_status # @(#) MAIN: check_hpux_named_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-01-07: initial version [Patrick Van der Veken] # @(#) 2017-01-07: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -32,7 +33,7 @@ function check_hpux_named_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _NAMED_PID_FILE="/var/run/named/named.pid" typeset _NAMED_PID_FILE="/var/run/named/named.pid"
typeset _VERSION="2017-01-07" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
@ -41,7 +42,7 @@ typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _NAMED_CHECKCONF_BIN="" typeset _NAMED_CHECKCONF_BIN=""
typeset _NAMED_PID="" typeset _NAMED_PID=""
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_hpux_ntp_status # @(#) MAIN: check_hpux_ntp_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-12-01: initial version [Patrick Van der Veken] # @(#) 2016-12-01: initial version [Patrick Van der Veken]
@ -28,6 +28,7 @@
# @(#) 2018-10-31: added support for --log-healthy [Patrick Van der Veken] # @(#) 2018-10-31: added support for --log-healthy [Patrick Van der Veken]
# @(#) 2019-01-10: added configuration option 'ntpq_use_ipv4', fixed problem # @(#) 2019-01-10: added configuration option 'ntpq_use_ipv4', fixed problem
# @(#) with offset calculation [Patrick Van der Veken] # @(#) with offset calculation [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
@ -37,7 +38,7 @@ function check_hpux_ntp_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2019-01-10" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
typeset _NTPQ_BIN="/usr/sbin/ntpq" typeset _NTPQ_BIN="/usr/sbin/ntpq"
typeset _NTPQ_OPTS="-pn" typeset _NTPQ_OPTS="-pn"
@ -46,7 +47,7 @@ typeset _NTPQ_OPTS="-pn"
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0
@ -180,15 +181,19 @@ return 0
function _show_usage function _show_usage
{ {
cat <<- EOT cat <<- EOT
NAME : $1 NAME : $1
VERSION : $2 VERSION : $2
CONFIG : $3 with: CONFIG : $3 with:
log_healthy=<yes|no> log_healthy=<yes|no>
max_offset=<max_offset (ms)> max_offset=<max_offset (ms)>
force_chrony=<yes|no> force_chrony=<yes|no>
force_ntp=<yes|no> force_ntp=<yes|no>
ntpq_use_ipv4=<yes|no> ntpq_use_ipv4=<yes|no>
PURPOSE : Checks the status of NTP synchronization EXTRA OPTS : --hc-args=force_chrony, --hc-args=force_ntp
PURPOSE : Checks the status of NTP service & synchronization.
Supports chronyd & ntpd.
Assumes chronyd is the preferred time synchronization.
LOG HEALTHY : Supported
EOT EOT

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_hpux_ovpa_status # @(#) MAIN: check_hpux_ovpa_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-04-08: initial version [Patrick Van der Veken] # @(#) 2016-04-08: initial version [Patrick Van der Veken]
@ -28,6 +28,7 @@
# @(#) 2018-08-30: added config file + check list for daemons [Patrick Van der Veken] # @(#) 2018-08-30: added config file + check list for daemons [Patrick Van der Veken]
# @(#) 2018-10-22: small fixes [Patrick Van der Veken] # @(#) 2018-10-22: small fixes [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -37,7 +38,7 @@ function check_hpux_ovpa_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
typeset _OVPA_BIN="/opt/perf/bin/perfstat" typeset _OVPA_BIN="/opt/perf/bin/perfstat"
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
@ -45,7 +46,7 @@ typeset _OVPA_BIN="/opt/perf/bin/perfstat"
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_hpux_patch_version # @(#) MAIN: check_hpux_patch_version
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), data_get_lvalue_from_config(), data_dequote(), # REQUIRES: data_comma2space(), data_get_lvalue_from_config(), data_dequote(),
# dump_logs(), init_hc(), log_hc(), warn() # dump_logs(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
@ -27,6 +27,7 @@
# @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken] # @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken]
# @(#) 2018-10-22: added check on fileset state [Patrick Van der Veken] # @(#) 2018-10-22: added check on fileset state [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -40,14 +41,14 @@ typeset _SWLIST_BIN="/usr/sbin/swlist"
typeset _SWLIST_OPTS="" typeset _SWLIST_OPTS=""
typeset _SHOW_PATCHES_BIN="/usr/contrib/bin/show_patches" typeset _SHOW_PATCHES_BIN="/usr/contrib/bin/show_patches"
typeset _SHOW_PATCHES_OPTS="" typeset _SHOW_PATCHES_OPTS=""
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _CFG_HEALTHY="" typeset _CFG_HEALTHY=""

View File

@ -19,10 +19,11 @@
# @(#) MAIN: check_hpux_postfix_status # @(#) MAIN: check_hpux_postfix_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-12-01: initial version [Patrick Van der Veken] # @(#) 2016-12-01: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -31,14 +32,14 @@
function check_hpux_postfix_status function check_hpux_postfix_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2016-12-01" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _POSTFIX_BIN="" typeset _POSTFIX_BIN=""
typeset _MSG="" typeset _MSG=""

View File

@ -19,10 +19,11 @@
# @(#) MAIN: check_hpux_root_crontab # @(#) MAIN: check_hpux_root_crontab
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-09-19: initial version [Patrick Van der Veken] # @(#) 2013-09-19: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -32,14 +33,14 @@ function check_hpux_root_crontab
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2013-09-09" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,11 +19,12 @@
# @(#) MAIN: check_hpux_sfm_statuss # @(#) MAIN: check_hpux_sfm_statuss
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), data_contains_string(), data_is_numeric(), # REQUIRES: data_comma2space(), data_contains_string(), data_is_numeric(),
# init_hc(), log_hc(), warn() # init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2018-10-28: initial version [Patrick Van der Veken] # @(#) 2018-10-28: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -36,14 +37,14 @@ typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _SFMCONFIG_BIN="/opt/sfm/bin/sfmconfig" typeset _SFMCONFIG_BIN="/opt/sfm/bin/sfmconfig"
typeset _EVWEB_BIN="/opt/sfm/bin/evweb" typeset _EVWEB_BIN="/opt/sfm/bin/evweb"
typeset _CIMPROVIDER_BIN="/opt/wbem/bin/cimprovider" typeset _CIMPROVIDER_BIN="/opt/wbem/bin/cimprovider"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_hpux_sg_cluster_status # @(#) MAIN: check_hpux_sg_cluster_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-03-08: initial version [Patrick Van der Veken] # @(#) 2016-03-08: initial version [Patrick Van der Veken]
# @(#) 2016-12-01: more standardized error handling [Patrick Van der Veken] # @(#) 2016-12-01: more standardized error handling [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,7 +36,7 @@ function check_hpux_sg_cluster_config
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
typeset _SG_DAEMON="/usr/lbin/cmcld" typeset _SG_DAEMON="/usr/lbin/cmcld"
# rubbish that cmgetconf outputs to STDOUT instead of STDERR # rubbish that cmgetconf outputs to STDOUT instead of STDERR
@ -45,7 +46,7 @@ typeset _SG_CMGETCONF_FILTER="Permission denied|Number of configured"
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_hpux_sg_cluster_status # @(#) MAIN: check_hpux_sg_cluster_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), dump_logs(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), dump_logs(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-03-25: initial version [Patrick Van der Veken] # @(#) 2016-03-25: initial version [Patrick Van der Veken]
@ -27,6 +27,7 @@
# @(#) 2017-05-07: made checks more detailed for log_hc() [Patrick Van der Veken] # @(#) 2017-05-07: made checks more detailed for log_hc() [Patrick Van der Veken]
# @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken] # @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -36,7 +37,7 @@ function check_hpux_sg_cluster_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
typeset _SG_DAEMON="/usr/lbin/cmcld" typeset _SG_DAEMON="/usr/lbin/cmcld"
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
@ -44,7 +45,7 @@ typeset _SG_DAEMON="/usr/lbin/cmcld"
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_hpux_sg_package_config # @(#) MAIN: check_hpux_sg_package_config
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-03-08: initial version [Patrick Van der Veken] # @(#) 2016-03-08: initial version [Patrick Van der Veken]
# @(#) 2016-12-01: more standardized error handling [Patrick Van der Veken] # @(#) 2016-12-01: more standardized error handling [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,7 +36,7 @@ function check_hpux_sg_package_config
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
typeset _SG_DAEMON="/usr/lbin/cmcld" typeset _SG_DAEMON="/usr/lbin/cmcld"
# rubbish that cmgetconf outputs to STDOUT instead of STDERR # rubbish that cmgetconf outputs to STDOUT instead of STDERR
@ -45,7 +46,7 @@ typeset _SG_CMGETCONF_FILTER="Permission denied|Number of configured"
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_hpux_sg_package_status # @(#) MAIN: check_hpux_sg_package_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), dump_logs(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), dump_logs(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-03-08: initial version [Patrick Van der Veken] # @(#) 2016-03-08: initial version [Patrick Van der Veken]
@ -27,6 +27,7 @@
# @(#) 2017-05-07: made checks more detailed for log_hc() [Patrick Van der Veken] # @(#) 2017-05-07: made checks more detailed for log_hc() [Patrick Van der Veken]
# @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken] # @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -36,7 +37,7 @@ function check_hpux_sg_package_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
typeset _SG_DAEMON="/usr/lbin/cmcld" typeset _SG_DAEMON="/usr/lbin/cmcld"
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
@ -44,7 +45,7 @@ typeset _SG_DAEMON="/usr/lbin/cmcld"
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,11 +19,12 @@
# @(#) MAIN: check_hpux_sg_qs_status # @(#) MAIN: check_hpux_sg_qs_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-05-01: initial version [Patrick Van der Veken] # @(#) 2017-05-01: initial version [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -32,7 +33,7 @@
function check_hpux_sg_qs_status function check_hpux_sg_qs_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
typeset _QS_BIN="/usr/lbin/qsc" typeset _QS_BIN="/usr/lbin/qsc"
typeset _QS_AUTH_FILE="/etc/cmcluster/qs_authfile" typeset _QS_AUTH_FILE="/etc/cmcluster/qs_authfile"
@ -41,7 +42,7 @@ typeset _QS_AUTH_FILE="/etc/cmcluster/qs_authfile"
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,11 +19,12 @@
# @(#) MAIN: check_hpux_sshd_status # @(#) MAIN: check_hpux_sshd_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: datadata_comma2spacespace2comma(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-04-01: initial version [Patrick Van der Veken] # @(#) 2017-04-01: initial version [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -33,14 +34,14 @@ function check_hpux_sshd_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _SSHD_PID_FILE="/var/run/sshd/sshd.pid" typeset _SSHD_PID_FILE="/var/run/sshd/sshd.pid"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _SSHD_PID="" typeset _SSHD_PID=""
typeset _MSG="" typeset _MSG=""

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_hpux_syslog # @(#) MAIN: check_hpux_syslog
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-06-20: initial version [Patrick Van der Veken] # @(#) 2016-06-20: initial version [Patrick Van der Veken]
# @(#) 2017-05-18: do not update the state file with --no-log [Patrick Van der Veken] # @(#) 2017-05-18: do not update the state file with --no-log [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -36,14 +37,14 @@ function check_hpux_syslog
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _STATE_FILE="${STATE_PERM_DIR}/discovered.syslog" typeset _STATE_FILE="${STATE_PERM_DIR}/discovered.syslog"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,10 +19,11 @@
# @(#) MAIN: check_hpux_vg_minor_number # @(#) MAIN: check_hpux_vg_minor_number
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-04-28: initial version [Patrick Van der Veken] # @(#) 2016-04-28: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -31,14 +32,14 @@
function check_hpux_vg_minor_number function check_hpux_vg_minor_number
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2016-04-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match typeset _SUPPORTED_PLATFORMS="HP-UX" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_linux_burp_backup # @(#) MAIN: check_linux_burp_backup
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(),init_hc(), log_hc(), # REQUIRES: data_comma2space(),init_hc(), log_hc(),
# GNU date that can calculate UNIX epoch seconds from given date, # GNU date that can calculate UNIX epoch seconds from given date,
# BURP server must be be able to impersonate configured clients # BURP server must be be able to impersonate configured clients
# #
@ -28,6 +28,7 @@
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-08-25: support for burp v2 [Patrick Van der Veken] # @(#) 2018-08-25: support for burp v2 [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -39,14 +40,14 @@ function check_linux_burp_backup
typeset _BURP_SERVER_CONFIG_FILE="/etc/burp/burp-server.conf" typeset _BURP_SERVER_CONFIG_FILE="/etc/burp/burp-server.conf"
typeset _BURP_CLIENT_CONFIG_FILE="/etc/burp/burp.conf" typeset _BURP_CLIENT_CONFIG_FILE="/etc/burp/burp.conf"
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,12 +19,13 @@
# @(#) MAIN: check_linux_burp_status # @(#) MAIN: check_linux_burp_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), linux_get_init(), init_hc(), log_hc() # REQUIRES: data_comma2space(), linux_get_init(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-12-01: initial version [Patrick Van der Veken] # @(#) 2016-12-01: initial version [Patrick Van der Veken]
# @(#) 2017-05-08: fix fall-back for sysv->pgrep [Patrick Van der Veken] # @(#) 2017-05-08: fix fall-back for sysv->pgrep [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,14 +36,14 @@ function check_linux_burp_status
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _BURP_INIT_SCRIPT="/etc/init.d/burp" typeset _BURP_INIT_SCRIPT="/etc/init.d/burp"
typeset _BURP_SYSTEMD_SERVICE="burp.service" typeset _BURP_SYSTEMD_SERVICE="burp.service"
typeset _VERSION="2018-05-21" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,12 +19,13 @@
# @(#) MAIN: check_linux_file_age # @(#) MAIN: check_linux_file_age
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-27: initial version [Patrick Van der Veken] # @(#) 2013-05-27: initial version [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -34,14 +35,14 @@ function check_linux_file_age
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_linux_file_change # @(#) MAIN: check_linux_file_change
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc(), warn(), # REQUIRES: data_comma2space(), init_hc(), log_hc(), warn(),
# openssl (sha256 digest) OR cksum (CRC32 digest) # openssl (sha256 digest) OR cksum (CRC32 digest)
# #
# @(#) HISTORY: # @(#) HISTORY:
@ -27,6 +27,7 @@
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -36,14 +37,14 @@ function check_linux_file_change
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_linux_fs_mounts # @(#) MAIN: check_linux_fs_mounts
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-17: initial version [Patrick Van der Veken] # @(#) 2013-05-17: initial version [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-08-25: small fix [Patrick Van der Veken] # @(#) 2018-08-25: small fix [Patrick Van der Veken]
# @(#) 2018-10-02: regex fix [Patrick Van der Veken] # @(#) 2018-10-02: regex fix [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -34,17 +35,16 @@
function check_linux_fs_mounts function check_linux_fs_mounts
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2018-10-02" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _MSG=""
typeset _STC=0 typeset _STC=0
typeset _FS="" typeset _FS=""
typeset _FS_COUNT=0 typeset _FS_COUNT=0
@ -61,14 +61,18 @@ done
# collect data (mount only) # collect data (mount only)
mount >>${HC_STDOUT_LOG} 2>>${HC_STDERR_LOG} mount >>${HC_STDOUT_LOG} 2>>${HC_STDERR_LOG}
(( $? == 0 )) || return $? if (( $? > 0 ))
then
warn "unable to execute {mount} command"
return 1
fi
# check for each configured file system (except /) # check for each configured file system (except /)
grep -v -E -e '^#' -e '^$' \ grep -v -E -e '^#' -e '^$' \
-e '[[:space:]]*.*[[:space:]]+(proc|swap|sysfs|devpts|tmpfs).*' \ -e '[[:space:]]*.*[[:space:]]+(proc|swap|sysfs|devpts|tmpfs).*' \
-e '(floppy|cdrom)' \ -e '(floppy|cdrom)' \
-e '[[:space:]]*\/[[:space:]]+' /etc/fstab 2>/dev/null |\ -e '[[:space:]]*\/[[:space:]]+' /etc/fstab 2>/dev/null |\
awk '{print $2}' |\ awk '{print $2}' 2>/dev/null |\
while read _FS while read _FS
do do
_FS_COUNT=$(grep -c -E -e ".*on[ \t]+${_FS}[ \t]+.*" ${HC_STDOUT_LOG} 2>/dev/null) _FS_COUNT=$(grep -c -E -e ".*on[ \t]+${_FS}[ \t]+.*" ${HC_STDOUT_LOG} 2>/dev/null)

View File

@ -0,0 +1,376 @@
#!/usr/bin/env ksh
#******************************************************************************
# @(#) check_linux_fs_usage.sh
#******************************************************************************
# @(#) Copyright (C) 2019 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
#******************************************************************************
#
# DOCUMENTATION (MAIN)
# -----------------------------------------------------------------------------
# @(#) MAIN: check_linux_fs_usage
# DOES: see _show_usage()
# EXPECTS: n/a
# REQUIRES: data_comma2space(), init_hc(), log_hc(), warn()
#
# @(#) HISTORY:
# @(#) 2019-01-24: initial version [Patrick Van der Veken]
# -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#******************************************************************************
# -----------------------------------------------------------------------------
function check_linux_fs_usage
{
# ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here ---------------------------
# set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_comma2space "$*")
typeset _ARG=""
typeset _MSG=""
typeset _STC=0
typeset _CFG_HEALTHY=""
typeset _LOG_HEALTHY=0
typeset _CFG_CHECK_INODES_USAGE=""
typeset _CFG_CHECK_SPACE_USAGE=""
typeset _CFG_MAX_INODES_USAGE=""
typeset _CFG_MAX_SPACE_USAGE=""
typeset _CFG_FS=""
typeset _CFG_INODES_THRESHOLD=""
typeset _CFG_SPACE_THRESHOLD=""
typeset _FS=""
typeset _DO_INODES=0
typeset _DO_SPACE=0
typeset _INODES_USAGE=1
typeset _SPACE_USAGE=1
typeset _LINE_COUNT=1
typeset _INODES_FILE="${TMP_DIR}/.$0.inodes.$$"
typeset _SPACE_FILE="${TMP_DIR}/.$0.space.$$"
# set local trap for cleanup
# shellcheck disable=SC2064
trap "rm -f ${_SPACE_FILE}.* ${_INODES_FILE}.* >/dev/null 2>&1; return 1" 1 2 3 15
# handle arguments (originally comma-separated)
for _ARG in ${_ARGS}
do
case "${_ARG}" in
help)
_show_usage $0 ${_VERSION} ${_CONFIG_FILE} && return 0
;;
check_inodes)
log "enabled check of inodes usage via cmd-line option"
_DO_INODES=1
;;
check_space)
log "enabled check of space usage via cmd-line option"
_DO_SPACE=1
;;
esac
done
# handle configuration file
[[ -n "${ARG_CONFIG_FILE}" ]] && _CONFIG_FILE="${ARG_CONFIG_FILE}"
if [[ ! -r ${_CONFIG_FILE} ]]
then
warn "unable to read configuration file at ${_CONFIG_FILE}"
return 1
fi
# read configuration values
_CFG_HEALTHY=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'log_healthy')
case "${_CFG_HEALTHY}" in
yes|YES|Yes)
_LOG_HEALTHY=1
;;
*)
# do not override hc_arg
(( _LOG_HEALTHY > 0 )) || _LOG_HEALTHY=0
;;
esac
_CFG_CHECK_INODES_USAGE=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'check_inodes_usage')
case "${_CFG_CHECK_INODES_USAGE}" in
yes|YES|Yes)
log "enabled check of inodes usage via configuration file"
_DO_INODES=1
;;
*)
: # not set
;;
esac
_CFG_CHECK_SPACE_USAGE=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'check_space_usage')
case "${_CFG_CHECK_SPACE_USAGE}" in
yes|YES|Yes)
log "enabled check of space usage via configuration file"
_DO_SPACE=1
;;
*)
: # not set
;;
esac
_CFG_MAX_INODES_USAGE=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'max_inodes_usage')
if [[ -z "${_CFG_MAX_INODES_USAGE}" ]]
then
# default
_CFG_MAX_INODES_USAGE=90
fi
_CFG_MAX_SPACE_USAGE=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'max_space_usage')
if [[ -z "${_CFG_MAX_SPACE_USAGE}" ]]
then
# default
_CFG_MAX_SPACE_USAGE=90
fi
if (( _DO_INODES == 0 && _DO_SPACE == 0 ))
then
warn "you must enable at least one check (inode and/or space)"
return 1
fi
# log_healthy
(( ARG_LOG_HEALTHY > 0 )) && _LOG_HEALTHY=1
if (( _LOG_HEALTHY > 0 ))
then
if (( ARG_LOG > 0 ))
then
log "logging/showing passed health checks"
else
log "showing passed health checks (but not logging)"
fi
else
log "not logging/showing passed health checks"
fi
# collect data (POSIX format)
if (( _DO_INODES > 0 ))
then
df -Pil >>${_INODES_FILE} 2>>${HC_STDERR_LOG}
if (( $? > 0 ))
then
# df exits >0 if there are issues with some filesystems, consider non-fatal
warn "error(s) occurred executing the {df -Pil}"
fi
fi
if (( _DO_SPACE > 0 ))
then
df -Pl >>${_SPACE_FILE} 2>>${HC_STDERR_LOG}
if (( $? > 0 ))
then
# df exits >0 if there are issues with some filesystems, consider non-fatal
warn "error(s) occurred executing {df -Pl}"
fi
fi
# do inodes/space checks
if (( $(grep -c -i '^fs:' ${_CONFIG_FILE} 2>/dev/null) > 0 ))
then
# 1) --- configured FS ---
# a) --- inodes (df -Pil) ---
if (( _DO_INODES > 0 ))
then
_LINE_COUNT=1
grep -i '^fs:' ${_CONFIG_FILE} 2>/dev/null |\
while IFS=':' read _ _CFG_FS _CFG_INODES_THRESHOLD _
do
# report on missing FS name or threshold
if [[ -z "${_CFG_FS}" ]] && [[ -z "${_CFG_INODES_THRESHOLD}" ]]
then
warn "missing filesystem name and/or threshold in configuration file ${_CONFIG_FILE} at data line ${_LINE_COUNT}"
continue
fi
data_is_numeric ${_CFG_INODES_THRESHOLD}
if (( $? > 0 ))
then
warn "parameter is not numeric in configuration file ${_CONFIG_FILE} at data line ${_LINE_COUNT}"
continue
fi
if (( _CFG_INODES_THRESHOLD == 0 || _CFG_INODES_THRESHOLD >= 100 ))
then
(( ARG_DEBUG > 0 )) && debug "found out-of-bounds inodes threshold for ${_CFG_FS}, using general threshold"
_CFG_INODES_THRESHOLD=${_CFG_MAX_INODES_USAGE}
fi
_INODES_USAGE=$(grep -E -e "${_CFG_FS}$" ${_INODES_FILE} 2>/dev/null | awk '{gsub(/%/,"",$5);print $5}' 2>/dev/null)
data_is_numeric ${_INODES_USAGE}
if (( $? > 0 ))
then
warn "discovered value for inodes usage is incorrect [${_CFG_FS}:${_INODES_USAGE}]"
continue
fi
# check against the threshold
if (( _INODES_USAGE > _CFG_INODES_THRESHOLD ))
then
_MSG="${_CFG_FS} exceedes its inode threshold (${_INODES_USAGE}%>${_CFG_INODES_THRESHOLD}%)"
_STC=1
else
_MSG="${_CFG_FS} does not exceede its inode threshold (${_INODES_USAGE}%<=${_CFG_INODES_THRESHOLD}%)"
_STC=0
fi
if (( _LOG_HEALTHY > 0 || _STC > 0 ))
then
log_hc "$0" ${_STC} "${_MSG}" ${_INODES_USAGE} ${_CFG_INODES_THRESHOLD}
fi
_LINE_COUNT=$(( _LINE_COUNT + 1 ))
done
# add df output to stdout log_hc
print "==== df -Pil ====" >>${HC_STDOUT_LOG}
cat ${_INODES_FILE} >>${HC_STDOUT_LOG}
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && dump_logs
fi
# b) --- space (df -Pl) ---
if (( _DO_SPACE > 0 ))
then
_LINE_COUNT=1
grep -i '^fs:' ${_CONFIG_FILE} 2>/dev/null |\
while IFS=':' read _ _CFG_FS _ _CFG_SPACE_THRESHOLD
do
# report on missing FS name or threshold
if [[ -z "${_CFG_FS}" ]] && [[ -z "${_CFG_SPACE_THRESHOLD}" ]]
then
warn "missing filesystem name and/or threshold in configuration file ${_CONFIG_FILE} at data line ${_LINE_COUNT}"
continue
fi
data_is_numeric ${_CFG_SPACE_THRESHOLD}
if (( $? > 0 ))
then
warn "parameter is not numeric in configuration file ${_CONFIG_FILE} at data line ${_LINE_COUNT}"
continue
fi
if (( _CFG_SPACE_THRESHOLD == 0 || _CFG_SPACE_THRESHOLD >= 100 ))
then
(( ARG_DEBUG > 0 )) && debug "found out-of-bounds space threshold for ${_CFG_FS}, using general threshold"
_CFG_SPACE_THRESHOLD=${_CFG_MAX_SPACE_USAGE}
fi
_SPACE_USAGE=$(grep -E -e "${_CFG_FS}$" ${_SPACE_FILE} 2>/dev/null | awk '{gsub(/%/,"",$5);print $5}' 2>/dev/null)
data_is_numeric ${_SPACE_USAGE}
if (( $? > 0 ))
then
warn "discovered value for space usage is incorrect [${_CFG_FS}:${_SPACE_USAGE}]"
continue
fi
# check against the threshold
if (( _SPACE_USAGE > _CFG_SPACE_THRESHOLD ))
then
_MSG="${_CFG_FS} exceedes its space threshold (${_SPACE_USAGE}%>${_CFG_SPACE_THRESHOLD}%)"
_STC=1
else
_MSG="${_CFG_FS} does not exceede its space threshold (${_SPACE_USAGE}%<=${_CFG_SPACE_THRESHOLD}%)"
_STC=0
fi
if (( _LOG_HEALTHY > 0 || _STC > 0 ))
then
log_hc "$0" ${_STC} "${_MSG}" ${_SPACE_USAGE} ${_CFG_SPACE_THRESHOLD}
fi
_LINE_COUNT=$(( _LINE_COUNT + 1 ))
done
# add df output to stdout log_hc
print "==== df -Pl ====" >>${HC_STDOUT_LOG}
cat ${_SPACE_FILE} >>${HC_STDOUT_LOG}
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && dump_logs
fi
else
# 2) --- ALL FS ---
df -Pl 2>/dev/null | grep '^\/' 2>/dev/null | awk '{print $6}' 2>/dev/null |\
while read _FS
do
# a) --- inodes (df -Pil) ---
if (( _DO_INODES > 0 ))
then
_INODES_USAGE=$(grep -E -e "${_FS}$" ${_INODES_FILE} 2>/dev/null | awk '{gsub(/%/,"",$5);print $5}' 2>/dev/null)
data_is_numeric ${_INODES_USAGE}
if (( $? > 0 ))
then
warn "discovered value for inodes usage is incorrect [${_FS}:${_INODES_USAGE}]"
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && dump_logs
continue
fi
# check against the threshold
if (( _INODES_USAGE > _CFG_MAX_INODES_USAGE ))
then
_MSG="${_FS} exceedes its inode threshold (${_INODES_USAGE}%>${_CFG_MAX_INODES_USAGE}%)"
_STC=1
else
_MSG="${_FS} does not exceede its inode threshold (${_INODES_USAGE}%<=${_CFG_MAX_INODES_USAGE}%)"
_STC=0
fi
if (( _LOG_HEALTHY > 0 || _STC > 0 ))
then
log_hc "$0" ${_STC} "${_MSG}" ${_INODES_USAGE} ${_CFG_MAX_INODES_USAGE}
fi
# add df output to stdout log_hc
print "==== df -Pil ====" >>${HC_STDOUT_LOG}
cat ${_INODES_FILE} >>${HC_STDOUT_LOG}
fi
# b) --- space (df -Pl) ---
if (( _DO_SPACE > 0 ))
then
_SPACE_USAGE=$(grep -E -e "${_FS}$" ${_SPACE_FILE} 2>/dev/null | awk '{gsub(/%/,"",$5);print $5}' 2>/dev/null)
data_is_numeric ${_SPACE_USAGE}
if (( $? > 0 ))
then
warn "discovered value for space usage is incorrect [${_FS}:${_SPACE_USAGE}]"
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && dump_logs
continue
fi
# check against the threshold
if (( _SPACE_USAGE > _CFG_MAX_SPACE_USAGE ))
then
_MSG="${_FS} exceedes its space threshold (${_SPACE_USAGE}%>${_CFG_MAX_SPACE_USAGE}%)"
_STC=1
else
_MSG="${_FS} does not exceede its space threshold (${_SPACE_USAGE}%<=${_CFG_MAX_SPACE_USAGE}%)"
_STC=0
fi
if (( _LOG_HEALTHY > 0 || _STC > 0 ))
then
log_hc "$0" ${_STC} "${_MSG}" ${_SPACE_USAGE} ${_CFG_MAX_SPACE_USAGE}
fi
# add df output to stdout log_hc
print "==== df -Pl ====" >>${HC_STDOUT_LOG}
cat ${_SPACE_FILE} >>${HC_STDOUT_LOG}
fi
done
fi
# do cleanup
rm -f ${_INODES_FILE}.* ${_SPACE_FILE}.* >/dev/null 2>&1
return 0
}
# -----------------------------------------------------------------------------
function _show_usage
{
cat <<- EOT
NAME : $1
VERSION : $2
CONFIG : $3 with formatted stanzas (optional):
fs:<fs_name>:<max_INODES_USAGE_in_%>:<max_space_usage_in%>
Other options:
check_inodes_usage=<yes|no>
check_space_usage=<yes|no>
max_inodes_usage=<general_inodes_usage_treshold>
max_space_usage=<general_space_usage_treshold>
EXT OPTS : --hc-args=check_inodes, --hc-args=check_space
PURPOSE : Checks the inodes & space usage for the configured or all (local) filesystems
LOG HEALTHY : Supported
EOT
return 0
}
#******************************************************************************
# END of script
#******************************************************************************

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_linux_hpacucli # @(#) MAIN: check_linux_hpacucli
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-09-09: initial version [Patrick Van der Veken] # @(#) 2013-09-09: initial version [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,14 +36,14 @@ function check_linux_hpacucli
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC_COUNT=0 typeset _STC_COUNT=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_linux_hpasmcli # @(#) MAIN: check_linux_hpasmcli
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-09-07: initial version [Patrick Van der Veken] # @(#) 2013-09-07: initial version [Patrick Van der Veken]
@ -27,6 +27,7 @@
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -36,14 +37,14 @@ function check_linux_hpasmcli
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC_COUNT=0 typeset _STC_COUNT=0

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_linux_hplog # @(#) MAIN: check_linux_hplog
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), dump_logs(), init_hc(), log_hc() # REQUIRES: data_comma2space(), dump_logs(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-04-22: initial version [Patrick Van der Veken] # @(#) 2017-04-22: initial version [Patrick Van der Veken]
# @(#) 2018-05-21: added dump_logs() & STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: added dump_logs() & STDERR fixes [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -36,14 +37,14 @@ function check_linux_hplog
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _STATE_FILE="${STATE_PERM_DIR}/discovered.hplog" typeset _STATE_FILE="${STATE_PERM_DIR}/discovered.hplog"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_linux_hpssacli # @(#) MAIN: check_linux_hpssacli
# DOES: _show_usage() # DOES: _show_usage()
# EXPECTS: _show_usage() # EXPECTS: _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-04-01: initial version [Patrick Van der Veken] # @(#) 2016-04-01: initial version [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,14 +36,14 @@ function check_linux_hpssacli
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC_COUNT=0 typeset _STC_COUNT=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_linux_httpd_status # @(#) MAIN: check_linux_httpd_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), linux_get_init(), init_hc(), log_hc() # REQUIRES: data_comma2space(), linux_get_init(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-04-23: initial version [Patrick Van der Veken] # @(#) 2017-04-23: initial version [Patrick Van der Veken]
@ -27,6 +27,7 @@
# @(#) 2017-05-17: removed _MSG dupe [Patrick Van der Veken] # @(#) 2017-05-17: removed _MSG dupe [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-11-18: add linux_has_systemd_service() [Patrick Van der Veken] # @(#) 2018-11-18: add linux_has_systemd_service() [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -37,14 +38,14 @@ function check_linux_httpd_status
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _HTTPD_INIT_SCRIPT="/etc/init.d/httpd" typeset _HTTPD_INIT_SCRIPT="/etc/init.d/httpd"
typeset _HTTPD_SYSTEMD_SERVICE="httpd.service" typeset _HTTPD_SYSTEMD_SERVICE="httpd.service"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _CHECK_SYSTEMD_SERVICE=0 typeset _CHECK_SYSTEMD_SERVICE=0
typeset _HTTPD_BIN="" typeset _HTTPD_BIN=""

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_linux_named_status # @(#) MAIN: check_linux_named_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), linux_get_init(), init_hc(), log_hc() # REQUIRES: data_comma2space(), linux_get_init(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-12-01: initial version [Patrick Van der Veken] # @(#) 2013-12-01: initial version [Patrick Van der Veken]
# @(#) 2017-05-08: fix fall-back for sysv->pgrep [Patrick Van der Veken] # @(#) 2017-05-08: fix fall-back for sysv->pgrep [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-11-18: add linux_has_systemd_service() [Patrick Van der Veken] # @(#) 2018-11-18: add linux_has_systemd_service() [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -34,14 +35,14 @@
function check_linux_named_status function check_linux_named_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_linux_ntp_status # @(#) MAIN: check_linux_ntp_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc(), # REQUIRES: data_comma2space(), init_hc(), log_hc(),
# linux_has_systemd_service(), warn() # linux_has_systemd_service(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
@ -33,6 +33,7 @@
# @(#) 'force_chrony', added check on chronyd service alive, added # @(#) 'force_chrony', added check on chronyd service alive, added
# @(#) run user for chronyd+ntpd, added forced IPv4 support for ntpq, # @(#) run user for chronyd+ntpd, added forced IPv4 support for ntpq,
# @(#) fixed problem with offset calculation [Patrick Van der Veken] # @(#) fixed problem with offset calculation [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
@ -48,7 +49,7 @@ typeset _CHRONYD_SYSTEMD_SERVICE="chronyd.service"
typeset _NTPD_SYSTEMD_SERVICE="ntpd.service" typeset _NTPD_SYSTEMD_SERVICE="ntpd.service"
typeset _CHRONYD_USER="chrony" typeset _CHRONYD_USER="chrony"
typeset _NTPD_USER="ntp" typeset _NTPD_USER="ntp"
typeset _VERSION="2019-01-10" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
typeset _CHRONYC_BIN="/bin/chronyc" typeset _CHRONYC_BIN="/bin/chronyc"
typeset _NTPQ_BIN="/usr/sbin/ntpq" typeset _NTPQ_BIN="/usr/sbin/ntpq"
@ -58,7 +59,7 @@ typeset _NTPQ_OPTS="-pn"
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0
@ -448,17 +449,19 @@ return 0
function _show_usage function _show_usage
{ {
cat <<- EOT cat <<- EOT
NAME : $1 NAME : $1
VERSION : $2 VERSION : $2
CONFIG : $3 with: CONFIG : $3 with:
log_healthy=<yes|no> log_healthy=<yes|no>
max_offset=<max_offset (ms)> max_offset=<max_offset (ms)>
force_chrony=<yes|no> force_chrony=<yes|no>
force_ntp=<yes|no> force_ntp=<yes|no>
ntpq_use_ipv4=<yes|no> ntpq_use_ipv4=<yes|no>
PURPOSE : Checks the status of NTP service & synchronization. EXTRA OPTS : --hc-args=force_chrony, --hc-args=force_ntp
Supports chronyd & ntpd. PURPOSE : Checks the status of NTP service & synchronization.
Assumes chronyd is the preferred time synchronization. Supports chronyd & ntpd.
Assumes chronyd is the preferred time synchronization.
LOG HEALTHY : Supported
EOT EOT

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_linux_postfix_status # @(#) MAIN: check_linux_postfix_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), linux_get_init(), init_hc(), log_hc() # REQUIRES: data_comma2space(), linux_get_init(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-12-01: initial version [Patrick Van der Veken] # @(#) 2016-12-01: initial version [Patrick Van der Veken]
@ -27,6 +27,7 @@
# @(#) for sysv->pgrep[Patrick Van der Veken] # @(#) for sysv->pgrep[Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-11-18: add linux_has_systemd_service() [Patrick Van der Veken] # @(#) 2018-11-18: add linux_has_systemd_service() [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -37,14 +38,14 @@ function check_linux_postfix_status
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _POSTFIX_INIT_SCRIPT="/etc/init.d/postfix" typeset _POSTFIX_INIT_SCRIPT="/etc/init.d/postfix"
typeset _POSTFIX_SYSTEMD_SERVICE="postfix.service" typeset _POSTFIX_SYSTEMD_SERVICE="postfix.service"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _POSTFIX_BIN="" typeset _POSTFIX_BIN=""
typeset _MSG="" typeset _MSG=""

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_linux_process_limits # @(#) MAIN: check_linux_process_limits
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc(), data_is_numeric()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2018-07-10: original version [Patrick Van der Veken] # @(#) 2018-07-10: original version [Patrick Van der Veken]
# @(#) 2018-07-12: better log_healthy handling [Patrick Van der Veken] # @(#) 2018-07-12: better log_healthy handling [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,14 +36,14 @@ function check_linux_process_limits
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _LINE_COUNT=1 typeset _LINE_COUNT=1

View File

@ -19,11 +19,12 @@
# @(#) MAIN: check_linux_root_crontab # @(#) MAIN: check_linux_root_crontab
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-09-19: initial version [Patrick Van der Veken] # @(#) 2013-09-19: initial version [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -33,14 +34,14 @@ function check_linux_root_crontab
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-05-21" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_linux_samba_status # @(#) MAIN: check_linux_samba_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), linux_get_init(), init_hc(), log_hc() # REQUIRES: data_comma2space(), linux_get_init(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-17: initial version [Patrick Van der Veken] # @(#) 2013-05-17: initial version [Patrick Van der Veken]
@ -28,6 +28,7 @@
# @(#) 2017-07-23: fix for systemd service names [Patrick Van der Veken] # @(#) 2017-07-23: fix for systemd service names [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-11-18: add linux_has_systemd_service() [Patrick Van der Veken] # @(#) 2018-11-18: add linux_has_systemd_service() [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -39,14 +40,14 @@ function check_linux_samba_status
typeset _SMB_INIT_SCRIPT="/etc/init.d/samba" typeset _SMB_INIT_SCRIPT="/etc/init.d/samba"
typeset _SMB_SYSTEMD_SERVICE="smb.service" typeset _SMB_SYSTEMD_SERVICE="smb.service"
typeset _NMB_SYSTEMD_SERVICE="nmb.service" typeset _NMB_SYSTEMD_SERVICE="nmb.service"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_linux_sg_cluster_status # @(#) MAIN: check_linux_sg_cluster_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), dump_logs(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), dump_logs(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-04-01: initial version [Patrick Van der Veken] # @(#) 2017-04-01: initial version [Patrick Van der Veken]
# @(#) 2018-05-21: added dump_logs() & other fixes [Patrick Van der Veken] # @(#) 2018-05-21: added dump_logs() & other fixes [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,7 +36,7 @@ function check_linux_sg_cluster_config
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
typeset _SG_DAEMON="/opt/cmcluster/bin/cmcld" typeset _SG_DAEMON="/opt/cmcluster/bin/cmcld"
# rubbish that cmgetconf outputs to STDOUT instead of STDERR # rubbish that cmgetconf outputs to STDOUT instead of STDERR
@ -46,7 +47,7 @@ typeset _SG_CMGETCONF_FILTER="Permission denied|Number of configured"
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
PATH=$PATH:/opt/cmcluster/bin PATH=$PATH:/opt/cmcluster/bin
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_linux_sg_cluster_status # @(#) MAIN: check_linux_sg_cluster_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), dump_logs(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), dump_logs(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-04-01: initial version [Patrick Van der Veken] # @(#) 2017-04-01: initial version [Patrick Van der Veken]
@ -27,6 +27,7 @@
# @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken] # @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -36,7 +37,7 @@ function check_linux_sg_cluster_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
typeset _SG_DAEMON="/opt/cmcluster/bin/cmcld" typeset _SG_DAEMON="/opt/cmcluster/bin/cmcld"
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
@ -45,7 +46,7 @@ typeset _SG_DAEMON="/opt/cmcluster/bin/cmcld"
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
PATH=$PATH:/opt/cmcluster/bin PATH=$PATH:/opt/cmcluster/bin
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_linux_sg_package_config # @(#) MAIN: check_linux_sg_package_config
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), dump_logs(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), dump_logs(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-04-01: initial version [Patrick Van der Veken] # @(#) 2017-04-01: initial version [Patrick Van der Veken]
# @(#) 2018-05-21: added dump_logs() & other fixes [Patrick Van der Veken] # @(#) 2018-05-21: added dump_logs() & other fixes [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken] # @(#) 2018-11-18: do not trap on signal 0 [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,7 +36,7 @@ function check_linux_sg_package_config
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
typeset _SG_DAEMON="/opt/cmcluster/bin/cmcld" typeset _SG_DAEMON="/opt/cmcluster/bin/cmcld"
# rubbish that cmgetconf outputs to STDOUT instead of STDERR # rubbish that cmgetconf outputs to STDOUT instead of STDERR
@ -46,7 +47,7 @@ typeset _SG_CMGETCONF_FILTER="Permission denied|Number of configured"
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
PATH=$PATH:/opt/cmcluster/bin PATH=$PATH:/opt/cmcluster/bin
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_linux_sg_package_status # @(#) MAIN: check_linux_sg_package_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), dump_logs(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), dump_logs(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-04-01: initial version [Patrick Van der Veken] # @(#) 2017-04-01: initial version [Patrick Van der Veken]
@ -27,6 +27,7 @@
# @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken] # @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -36,7 +37,7 @@ function check_linux_sg_package_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
typeset _SG_DAEMON="/opt/cmcluster/bin/cmcld" typeset _SG_DAEMON="/opt/cmcluster/bin/cmcld"
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
@ -45,7 +46,7 @@ typeset _SG_DAEMON="/opt/cmcluster/bin/cmcld"
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
PATH=$PATH:/opt/cmcluster/bin PATH=$PATH:/opt/cmcluster/bin
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,11 +19,12 @@
# @(#) MAIN: check_linux_sg_qs_status # @(#) MAIN: check_linux_sg_qs_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-05-01: initial version [Patrick Van der Veken] # @(#) 2017-05-01: initial version [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -32,7 +33,7 @@
function check_linux_sg_qs_status function check_linux_sg_qs_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
typeset _QS_BIN="/opt/qs/bin/qsc" typeset _QS_BIN="/opt/qs/bin/qsc"
typeset _QS_AUTH_FILE="/opt/qs/conf/qs_authfile" typeset _QS_AUTH_FILE="/opt/qs/conf/qs_authfile"
@ -41,7 +42,7 @@ typeset _QS_AUTH_FILE="/opt/qs/conf/qs_authfile"
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,10 +19,11 @@
# @(#) MAIN: check_linux_shorewall_status # @(#) MAIN: check_linux_shorewall_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), init_hc(), log_hc() # REQUIRES: data_comma2space(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-12-01: initial version [Patrick Van der Veken] # @(#) 2016-12-01: initial version [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -32,14 +33,14 @@ function check_linux_shorewall_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _SHOREWALL_BIN="/sbin/shorewall" typeset _SHOREWALL_BIN="/sbin/shorewall"
typeset _VERSION="2016-12-01" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_linux_sshd_status # @(#) MAIN: check_linux_sshd_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), linux_get_init(), init_hc(), log_hc() # REQUIRES: data_comma2space(), linux_get_init(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2016-12-01: initial version [Patrick Van der Veken] # @(#) 2016-12-01: initial version [Patrick Van der Veken]
@ -27,6 +27,7 @@
# @(#) 2017-05-08: set init/systemd based on distro [Patrick Van der Veken] # @(#) 2017-05-08: set init/systemd based on distro [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-11-18: add linux_has_systemd_service() [Patrick Van der Veken] # @(#) 2018-11-18: add linux_has_systemd_service() [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -35,14 +36,14 @@
function check_linux_sshd_status function check_linux_sshd_status
{ {
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _VERSION="2018-11-18" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _SSHD_INIT_SCRIPT="" typeset _SSHD_INIT_SCRIPT=""

View File

@ -19,7 +19,7 @@
# @(#) MAIN: check_linux_vz_ct_status # @(#) MAIN: check_linux_vz_ct_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: see _show_usage() # EXPECTS: see _show_usage()
# REQUIRES: data_space2comma(), dump_logs(), init_hc(), log_hc(), warn() # REQUIRES: data_comma2space(), dump_logs(), init_hc(), log_hc(), warn()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2017-04-01: initial version [Patrick Van der Veken] # @(#) 2017-04-01: initial version [Patrick Van der Veken]
@ -29,6 +29,7 @@
# @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken] # @(#) 2018-05-20: added dump_logs() [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken] # @(#) 2018-10-28: fixed (linter) errors [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -39,14 +40,14 @@ function check_linux_vz_ct_status
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf" typeset _CONFIG_FILE="${CONFIG_DIR}/$0.conf"
typeset _VZLIST_BIN="/usr/sbin/vzlist" typeset _VZLIST_BIN="/usr/sbin/vzlist"
typeset _VERSION="2018-10-28" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _LINE_COUNT=1 typeset _LINE_COUNT=1
typeset _CT_ENTRY="" typeset _CT_ENTRY=""

View File

@ -19,13 +19,14 @@
# @(#) MAIN: check_linux_winbind_status # @(#) MAIN: check_linux_winbind_status
# DOES: see _show_usage() # DOES: see _show_usage()
# EXPECTS: n/a # EXPECTS: n/a
# REQUIRES: data_space2comma(), linux_get_init(), init_hc(), log_hc() # REQUIRES: data_comma2space(), linux_get_init(), init_hc(), log_hc()
# #
# @(#) HISTORY: # @(#) HISTORY:
# @(#) 2013-05-17: initial version [Patrick Van der Veken] # @(#) 2013-05-17: initial version [Patrick Van der Veken]
# @(#) 2016-12-01: added systemd code [Patrick Van der Veken] # @(#) 2016-12-01: added systemd code [Patrick Van der Veken]
# @(#) 2017-05-08: fix fall-back for sysv->pgrep [Patrick Van der Veken] # @(#) 2017-05-08: fix fall-back for sysv->pgrep [Patrick Van der Veken]
# @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken] # @(#) 2018-05-21: STDERR fixes [Patrick Van der Veken]
# @(#) 2019-01-24: arguments fix [Patrick Van der Veken]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # DO NOT CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
#****************************************************************************** #******************************************************************************
@ -36,14 +37,14 @@ function check_linux_winbind_status
# ------------------------- CONFIGURATION starts here ------------------------- # ------------------------- CONFIGURATION starts here -------------------------
typeset _WINBIND_INIT_SCRIPT="/etc/init.d/winbind" typeset _WINBIND_INIT_SCRIPT="/etc/init.d/winbind"
typeset _WINBIND_SYSTEMD_SERVICE="winbind.service" typeset _WINBIND_SYSTEMD_SERVICE="winbind.service"
typeset _VERSION="2018-05-21" # YYYY-MM-DD typeset _VERSION="2019-01-24" # YYYY-MM-DD
typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match typeset _SUPPORTED_PLATFORMS="Linux" # uname -s match
# ------------------------- CONFIGURATION ends here --------------------------- # ------------------------- CONFIGURATION ends here ---------------------------
# set defaults # set defaults
(( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS} (( ARG_DEBUG > 0 && ARG_DEBUG_LEVEL > 0 )) && set ${DEBUG_OPTS}
init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}" init_hc "$0" "${_SUPPORTED_PLATFORMS}" "${_VERSION}"
typeset _ARGS=$(data_space2comma "$*") typeset _ARGS=$(data_comma2space "$*")
typeset _ARG="" typeset _ARG=""
typeset _MSG="" typeset _MSG=""
typeset _STC=0 typeset _STC=0