Added build files for zenoss plugin
This commit is contained in:
parent
bb60932337
commit
d21e7de16c
1
build/aix/hc_display_zenoss/hc_display_zenoss.reqs
Normal file
1
build/aix/hc_display_zenoss/hc_display_zenoss.reqs
Normal file
@ -0,0 +1 @@
|
|||||||
|
*prereq hc_aix.rte
|
27
build/aix/hc_display_zenoss/hc_display_zenoss.template
Normal file
27
build/aix/hc_display_zenoss/hc_display_zenoss.template
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
Package Name: hc_display_zenoss
|
||||||
|
Package VRMF: %BUILD_DATE%
|
||||||
|
Update: N
|
||||||
|
Fileset
|
||||||
|
Fileset Name: hc_display_zenoss.rte
|
||||||
|
Fileset VRMF: %BUILD_DATE%
|
||||||
|
Fileset Description: Health Checker - core CSV plugin
|
||||||
|
USRLIBLPPFiles
|
||||||
|
EOUSRLIBLPPFiles
|
||||||
|
ROOTLIBLPPFiles
|
||||||
|
Post-installation Script: /export/nim/build/hc_display_zenoss/scripts/hc_display_zenoss.postinstall
|
||||||
|
Unpost-installation Script: /export/nim/build/hc_display_zenoss/scripts/hc_display_zenoss.postuninstall
|
||||||
|
EOROOTLIBLPPFiles
|
||||||
|
Bosboot required: N
|
||||||
|
License agreement acceptance required: N
|
||||||
|
Include license files in this package: N
|
||||||
|
Requisites: /export/nim/build/hc_display_zenoss/hc_display_zenoss.reqs
|
||||||
|
USRFiles
|
||||||
|
EOUSRFiles
|
||||||
|
ROOT Part: Y
|
||||||
|
ROOTFiles
|
||||||
|
/opt/hc/lib
|
||||||
|
/opt/hc/lib/core
|
||||||
|
/opt/hc/lib/platform/aix/display_zenoss.sh
|
||||||
|
EOROOTFiles
|
||||||
|
Relocatable: N
|
||||||
|
EOFileset
|
@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env ksh
|
||||||
|
#******************************************************************************
|
||||||
|
# @(#) post-install script for hc_display_zenoss LPP package
|
||||||
|
#******************************************************************************
|
||||||
|
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is a free software; you can redistribute it and/or modify
|
||||||
|
# it under the same terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
|
||||||
|
#******************************************************************************
|
||||||
|
|
||||||
|
# ------------------------- CONFIGURATION starts here -------------------------
|
||||||
|
# location of ETC dir
|
||||||
|
HC_ETC_DIR="/etc/opt/hc"
|
||||||
|
# location of check_health.sh
|
||||||
|
HC_BIN="/opt/hc/bin/check_health.sh"
|
||||||
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
|
|
||||||
|
print "INFO: starting post-install script ..."
|
||||||
|
|
||||||
|
# refresh symbolic FPATH links
|
||||||
|
if [[ -x ${HC_BIN} ]]
|
||||||
|
then
|
||||||
|
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
|
||||||
|
else
|
||||||
|
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
|
||||||
|
fi
|
||||||
|
|
||||||
|
print "INFO: finished post-install script"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# END of script
|
||||||
|
#******************************************************************************
|
@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env ksh
|
||||||
|
#******************************************************************************
|
||||||
|
# @(#) post-uninstall script for hc_display_zenoss LPP package
|
||||||
|
#******************************************************************************
|
||||||
|
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is a free software; you can redistribute it and/or modify
|
||||||
|
# it under the same terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
|
||||||
|
#******************************************************************************
|
||||||
|
|
||||||
|
# ------------------------- CONFIGURATION starts here -------------------------
|
||||||
|
# location of the HC configuration files
|
||||||
|
HC_ETC_DIR="/etc/opt/hc"
|
||||||
|
# location of check_health.sh
|
||||||
|
HC_BIN="/opt/hc/bin/check_health.sh"
|
||||||
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
|
|
||||||
|
print "INFO: starting post-uninstall script ..."
|
||||||
|
|
||||||
|
# refresh symbolic FPATH links
|
||||||
|
if [[ -x ${HC_BIN} ]]
|
||||||
|
then
|
||||||
|
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
|
||||||
|
else
|
||||||
|
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
|
||||||
|
fi
|
||||||
|
|
||||||
|
print "INFO: finished post-uninstall script"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# END of script
|
||||||
|
#******************************************************************************
|
64
build/hpux/hc_display_zenoss/hc_display_zenoss.psf
Normal file
64
build/hpux/hc_display_zenoss/hc_display_zenoss.psf
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# Depot definition:
|
||||||
|
depot
|
||||||
|
layout_version 1.0
|
||||||
|
|
||||||
|
# Vendor definition:
|
||||||
|
vendor
|
||||||
|
tag KUDOS
|
||||||
|
title "KUDOS BVBA - http://www.kudos.be"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Bundle definitions:
|
||||||
|
bundle
|
||||||
|
tag HC-DISPLAY-ZENOSS
|
||||||
|
title "The Health Checker (HC) for UNIX (core ZENOSS display plugin)"
|
||||||
|
os_name HP-UX
|
||||||
|
revision %BUILD_DATE%
|
||||||
|
architecture HP-UX_B.11_32/64
|
||||||
|
machine_type ia64*
|
||||||
|
vendor_tag KUDOS
|
||||||
|
contents HC-DISPLAY-ZENOSS-MAIN,r=,a=,v=
|
||||||
|
end
|
||||||
|
|
||||||
|
# Product definitions:
|
||||||
|
product
|
||||||
|
tag HC-DISPLAY-ZENOSS-MAIN
|
||||||
|
revision %BUILD_DATE%
|
||||||
|
category tools
|
||||||
|
category_title Tools
|
||||||
|
title "The Health Checker (HC) for UNIX (OS plugins)"
|
||||||
|
description "The Health Checker is collection of scripts (plugins)
|
||||||
|
designed to perform regular - but not intensive - health checks on
|
||||||
|
UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as
|
||||||
|
well customer specific checks. Checks may include topics such file
|
||||||
|
system mounts, process checks, file consistency etc.
|
||||||
|
This is the core ZENOSS display plugin package"
|
||||||
|
architecture S700/S800_HP-UX_10/HP-UX_11/IA64_HP-UX_11
|
||||||
|
machine_type 9000/7*|9000/8*|ia64*
|
||||||
|
os_name HP-UX
|
||||||
|
os_release ?.1?.*
|
||||||
|
os_version [A-Z]
|
||||||
|
directory /opt/hc
|
||||||
|
is_locatable false
|
||||||
|
is_patch false
|
||||||
|
|
||||||
|
postinstall scripts/hc_display_zenoss.postinstall
|
||||||
|
postremove scripts/hc_display_zenoss.postremove
|
||||||
|
|
||||||
|
# Fileset definitions:
|
||||||
|
fileset
|
||||||
|
tag core_plugins
|
||||||
|
title UX Health Checker (core ZENOSS display plugins)
|
||||||
|
is_kernel false
|
||||||
|
is_locatable false
|
||||||
|
is_reboot false
|
||||||
|
is_sparse false
|
||||||
|
is_patch false
|
||||||
|
prerequisite HC-HPUX-MAIN
|
||||||
|
|
||||||
|
file_permissions -u 0222 -o root -g sys
|
||||||
|
|
||||||
|
directory ../../sources/lib/core=/opt/hc/lib/core
|
||||||
|
file -m 755 display_zenoss.sh
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env ksh
|
||||||
|
#******************************************************************************
|
||||||
|
# @(#) post-install script for HC-DISPLAY-ZENOSS SD package
|
||||||
|
#******************************************************************************
|
||||||
|
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is a free software; you can redistribute it and/or modify
|
||||||
|
# it under the same terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
|
||||||
|
#******************************************************************************
|
||||||
|
|
||||||
|
# ------------------------- CONFIGURATION starts here -------------------------
|
||||||
|
# location of ETC dir
|
||||||
|
HC_ETC_DIR="/etc/opt/hc"
|
||||||
|
# location of check_health.sh
|
||||||
|
HC_BIN="/opt/hc/bin/check_health.sh"
|
||||||
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
|
|
||||||
|
print "INFO: starting post-install script ..."
|
||||||
|
|
||||||
|
# refresh symbolic FPATH links
|
||||||
|
if [[ -x ${HC_BIN} ]]
|
||||||
|
then
|
||||||
|
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
|
||||||
|
else
|
||||||
|
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
|
||||||
|
fi
|
||||||
|
|
||||||
|
print "INFO: finished post-install script"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# END of script
|
||||||
|
#******************************************************************************
|
@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env ksh
|
||||||
|
#******************************************************************************
|
||||||
|
# @(#) post-remove script for HC-DISPLAY-ZENOSS SD package
|
||||||
|
#******************************************************************************
|
||||||
|
# @(#) Copyright (C) 2017 by KUDOS BVBA (info@kudos.be). All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is a free software; you can redistribute it and/or modify
|
||||||
|
# it under the same terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
|
||||||
|
#******************************************************************************
|
||||||
|
|
||||||
|
# ------------------------- CONFIGURATION starts here -------------------------
|
||||||
|
# location of the HC configuration files
|
||||||
|
HC_ETC_DIR="/etc/opt/hc"
|
||||||
|
# location of check_health.sh
|
||||||
|
HC_BIN="/opt/hc/bin/check_health.sh"
|
||||||
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
|
|
||||||
|
print "INFO: starting post-remove script ..."
|
||||||
|
|
||||||
|
# refresh symbolic FPATH links
|
||||||
|
if [[ -x ${HC_BIN} ]]
|
||||||
|
then
|
||||||
|
${HC_BIN} --fix-symlinks || print -u2 "WARN: updating symlinks failed"
|
||||||
|
else
|
||||||
|
print -u2 "ERROR: could not locate or excute the HC main script (${HC_BIN})"
|
||||||
|
fi
|
||||||
|
|
||||||
|
print "INFO: finished post-remove script"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
#******************************************************************************
|
||||||
|
# END of script
|
||||||
|
#******************************************************************************
|
69
build/linux/SPECS/hc-display-zenoss.spec
Normal file
69
build/linux/SPECS/hc-display-zenoss.spec
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
%define build_timestamp %(date +"%Y%m%d")
|
||||||
|
|
||||||
|
Name: hc-display-zenoss
|
||||||
|
Version: %{build_timestamp}
|
||||||
|
Release: 1
|
||||||
|
|
||||||
|
Summary: The KUDOS Health Checker (HC) for UNIX (ZENOSS display core plugin)
|
||||||
|
Group: Tools/Monitoring
|
||||||
|
|
||||||
|
License: GNU General Public License either version 2 of the License, or (at your option) any later version
|
||||||
|
URL: http://www.kudos.be
|
||||||
|
|
||||||
|
Requires: ksh,hc-linux
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRoot: %{_topdir}/%{name}-%{version}-root
|
||||||
|
|
||||||
|
%description
|
||||||
|
The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc.
|
||||||
|
This package contains core plugins (display).
|
||||||
|
|
||||||
|
%prep
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib
|
||||||
|
install -d -m 755 $RPM_BUILD_ROOT/opt/hc/lib/core
|
||||||
|
cp ../SOURCES/lib/core/display_zenoss.sh $RPM_BUILD_ROOT/opt/hc/lib/core/display_zenoss.sh
|
||||||
|
|
||||||
|
%post
|
||||||
|
# ------------------------- CONFIGURATION starts here -------------------------
|
||||||
|
# location of check_health.sh
|
||||||
|
HC_BIN="/opt/hc/bin/check_health.sh"
|
||||||
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
|
echo "INFO: starting post-install script ..."
|
||||||
|
# refresh symbolic FPATH links
|
||||||
|
if [[ -x ${HC_BIN} ]]
|
||||||
|
then
|
||||||
|
${HC_BIN} --fix-symlinks
|
||||||
|
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
||||||
|
fi
|
||||||
|
echo "INFO: finished post-install script"
|
||||||
|
|
||||||
|
%postun
|
||||||
|
# ------------------------- CONFIGURATION starts here -------------------------
|
||||||
|
# location of check_health.sh
|
||||||
|
HC_BIN="/opt/hc/bin/check_health.sh"
|
||||||
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
|
echo "INFO: starting post-uninstall script ..."
|
||||||
|
# refresh symbolic FPATH links
|
||||||
|
if [[ -x ${HC_BIN} ]]
|
||||||
|
then
|
||||||
|
${HC_BIN} --fix-symlinks
|
||||||
|
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
||||||
|
fi
|
||||||
|
echo "INFO: finished post-uninstall script"
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,755)
|
||||||
|
%dir /opt/hc/lib
|
||||||
|
%dir /opt/hc/lib/core
|
||||||
|
%attr(755, root, root) /opt/hc/lib/core/display_zenoss.sh
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Dec 19 2017 <patrick@kudos.be> - 0.0.1
|
||||||
|
- Initial build
|
Loading…
x
Reference in New Issue
Block a user