Imported Upstream version 1.4.0p9
This commit is contained in:
parent
4208ef3fec
commit
c4a45445af
BIN
active_checks.tar.gz
Normal file
BIN
active_checks.tar.gz
Normal file
Binary file not shown.
BIN
agents.tar.gz
BIN
agents.tar.gz
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
# -*- encoding: utf-8; py-indent-offset: 4 -*-
|
||||
# +------------------------------------------------------------------+
|
||||
# | ____ _ _ __ __ _ __ |
|
||||
@ -65,8 +65,9 @@ target_values = {
|
||||
# /usr/sbin/nagios3 -d /etc/nagios3/nagios.cfg
|
||||
|
||||
class Sorry(Exception):
|
||||
def __init__(self, text):
|
||||
self.reason = text
|
||||
def __init__(self, reason):
|
||||
self.reason = reason
|
||||
super(Sorry, self).__init__(reason)
|
||||
|
||||
def find_pid_and_configfile():
|
||||
procs = os.popen("ps ax -o pid,ppid,user,command").readlines()
|
||||
|
BIN
base.tar.gz
Normal file
BIN
base.tar.gz
Normal file
Binary file not shown.
BIN
bin.tar.gz
Normal file
BIN
bin.tar.gz
Normal file
Binary file not shown.
BIN
checkman.tar.gz
BIN
checkman.tar.gz
Binary file not shown.
BIN
checks.tar.gz
BIN
checks.tar.gz
Binary file not shown.
BIN
conf.tar.gz
BIN
conf.tar.gz
Binary file not shown.
36
create-changelog.py
Executable file
36
create-changelog.py
Executable file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import os
|
||||
import cmk.werks
|
||||
|
||||
|
||||
def create_changelog(dest_file, precompiled_werk_files):
|
||||
werks = load_werks(precompiled_werk_files)
|
||||
|
||||
with open(dest_file, "w") as f:
|
||||
cmk.werks.write_as_text(werks, f)
|
||||
|
||||
# Append previous werk changes
|
||||
if os.path.exists(dest_file + ".in"):
|
||||
f.write("\n\n")
|
||||
f.write(file(dest_file + ".in").read())
|
||||
|
||||
|
||||
def load_werks(precompiled_werk_files):
|
||||
werks = {}
|
||||
for path in precompiled_werk_files:
|
||||
werks.update(cmk.werks.load_precompiled_werks_file(path))
|
||||
return werks
|
||||
|
||||
|
||||
#
|
||||
# MAIN
|
||||
#
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
sys.stderr.write("ERROR: Call like this: create-changelog CHANGELOG WERK_DIR...\n")
|
||||
sys.exit(1)
|
||||
|
||||
dest_file, precompiled_werk_files = sys.argv[1], sys.argv[2:]
|
||||
create_changelog(dest_file, precompiled_werk_files)
|
BIN
doc.tar.gz
BIN
doc.tar.gz
Binary file not shown.
BIN
inventory.tar.gz
BIN
inventory.tar.gz
Binary file not shown.
BIN
lib.tar.gz
Normal file
BIN
lib.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
mkeventd.tar.gz
BIN
mkeventd.tar.gz
Binary file not shown.
BIN
modules.tar.gz
BIN
modules.tar.gz
Binary file not shown.
Binary file not shown.
608
package_info
608
package_info
File diff suppressed because it is too large
Load Diff
Binary file not shown.
25
precompile-werks.py
Executable file
25
precompile-werks.py
Executable file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import sys
|
||||
import cmk.werks
|
||||
|
||||
werk_dir, dest_file = sys.argv[1:3]
|
||||
|
||||
if len(sys.argv) > 3:
|
||||
edition_short = sys.argv[3]
|
||||
else:
|
||||
edition_short = None
|
||||
|
||||
|
||||
werks = cmk.werks.load_raw_files(werk_dir)
|
||||
|
||||
if edition_short:
|
||||
edition_werks = {}
|
||||
for werk in werks.values():
|
||||
if werk["edition"] == edition_short:
|
||||
edition_werks[werk["id"]] = werk
|
||||
|
||||
werks = edition_werks
|
||||
|
||||
cmk.werks.write_precompiled_werks(dest_file, werks)
|
170
setup.sh
170
setup.sh
@ -24,7 +24,7 @@
|
||||
# Boston, MA 02110-1301 USA.
|
||||
|
||||
|
||||
VERSION=1.2.8p26
|
||||
VERSION=1.4.0p9
|
||||
NAME=check_mk
|
||||
LANG=
|
||||
LC_ALL=
|
||||
@ -164,17 +164,9 @@ ask_title ()
|
||||
echo
|
||||
}
|
||||
|
||||
if [ -z "$YES" ] ; then cat <<EOF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if [ -z "$YES" ] ; then
|
||||
cat <<EOF
|
||||
[H[2J
|
||||
[1;44;37m ____ _ _ __ __ _ __ [0m
|
||||
[1;44;37m / ___| |__ ___ ___| | __ | \/ | |/ / [0m
|
||||
[1;44;37m | | | '_ \ / _ \/ __| |/ / | |\/| | ' / [0m
|
||||
@ -182,20 +174,33 @@ if [ -z "$YES" ] ; then cat <<EOF
|
||||
[1;44;37m \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ [0m
|
||||
[1;44;37m |_____| [0m
|
||||
[1;44;37m [0m
|
||||
[1;45;37m Check_MK setup $(printf "%32s" Version:' '$VERSION) [0m
|
||||
|
||||
|
||||
Welcome to Check_MK. This setup will install Check_MK into user defined
|
||||
directories. If you run this script as root, installation paths below
|
||||
/usr will be suggested. If you run this script as non-root user paths
|
||||
in your home directory will be suggested. You may override the default
|
||||
values or just hit enter to accept them.
|
||||
|
||||
Your answers will be saved to $SETUPCONF and will be
|
||||
reused when you run the setup of this or a later version again. Please
|
||||
delete that file if you want to delete your previous answers.
|
||||
[1;45;37m Check_MK manual setup $(printf "%32s" Version:' '$VERSION) [0m
|
||||
[1;41;33m [0m
|
||||
[1;41;37m The manual setup of Check_MK via ./setup.sh is not possible [0m
|
||||
[1;41;37m anymore. Check_MK is only supported to be used with the [0m
|
||||
[1;41;37m Check_MK Raw or Enterprise Edition packages. [0m
|
||||
[1;41;37m [0m
|
||||
[1;41;37m These have many advantages: [0m
|
||||
[1;41;37m [0m
|
||||
[1;41;37m - Very easy installation via a single RPM/DEB package [0m
|
||||
[1;41;37m - Contains fully integrated complete monitoring environment [0m
|
||||
[1;41;37m - Does not need installation of Nagios, PNP4Nagios or plugins [0m
|
||||
[1;41;37m - Supports multiple versions of Check_MK at the same time [0m
|
||||
[1;41;37m - Supports multiple monitoring instances on one server [0m
|
||||
[1;41;37m - Actively maintainained by the Check_MK project [0m
|
||||
[1;41;37m [0m
|
||||
[1;44;37m [0m
|
||||
[1;44;37m You can download the Check_MK Raw Edition for free here: [0m
|
||||
[1;44;33m [0m
|
||||
[1;44;36m http://mathias-kettner.com/download [0m
|
||||
[1;44;37m [0m
|
||||
[1;44;37m Installation instructions are here: [0m
|
||||
[1;44;37m [0m
|
||||
[1;44;36m http://mathias-kettner.com/cms_introduction_packages.html [0m
|
||||
[1;44;37m [0m
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$DESTDIR" ]
|
||||
@ -256,6 +261,16 @@ ask_dir vardir /var/lib/$NAME $HOMEBASEDIR/var $OMD_ROOT/var/check_mk "working d
|
||||
other files into this directory. The setup will create several subdirectories
|
||||
and makes them writable by the Nagios process"
|
||||
|
||||
PYTHON_PATH=$(python -c "import sys; print([ p for p in sys.path if p.startswith(\"/usr/lib/\") and p.count(\"/\") == 3 ][0])" 2>/dev/null)
|
||||
if [ -z "$PYTHON_PATH" ]; then
|
||||
PYTHON_PATH=/usr/lib/python2.7
|
||||
fi
|
||||
|
||||
ask_dir python_lib_dir $PYTHON_PATH $HOMEBASEDIR/python $OMD_ROOT/lib/python "Check_MK python modules" \
|
||||
"Check_MKs different components share common code in Python modules. These
|
||||
have to be installed in a directory where the used Python interpreter is
|
||||
searching for modules."
|
||||
|
||||
ask_title "Configuration of Linux/UNIX Agents"
|
||||
|
||||
|
||||
@ -463,84 +478,7 @@ modulesdir=$sharedir/modules
|
||||
web_dir=$sharedir/web
|
||||
localedir=$sharedir/locale
|
||||
agentsdir=$sharedir/agents
|
||||
|
||||
create_defaults ()
|
||||
{
|
||||
|
||||
cat <<EOF
|
||||
# encoding: utf-8
|
||||
# This file has been created during setup of check_mk at $(date).
|
||||
# Do not edit this file. Also do not try to override these settings
|
||||
# in main.mk since some of them are hardcoded into several files
|
||||
# during setup.
|
||||
#
|
||||
# If you need to change these settings, you have to re-run setup.sh
|
||||
# and enter new values when asked, or edit ~/.check_mk_setup.conf and
|
||||
# run ./setup.sh --yes.
|
||||
|
||||
check_mk_version = '$VERSION'
|
||||
default_config_dir = '$confdir'
|
||||
check_mk_configdir = '$confdir/conf.d'
|
||||
share_dir = '$sharedir'
|
||||
checks_dir = '$checksdir'
|
||||
notifications_dir = '$notificationsdir'
|
||||
inventory_dir = '$inventorydir'
|
||||
check_manpages_dir = '$checkmandir'
|
||||
modules_dir = '$modulesdir'
|
||||
locale_dir = '$localedir'
|
||||
agents_dir = '$agentsdir'
|
||||
lib_dir = '$libdir'
|
||||
var_dir = '$vardir'
|
||||
log_dir = '$vardir/log'
|
||||
snmpwalks_dir = '$vardir/snmpwalks'
|
||||
autochecksdir = '$vardir/autochecks'
|
||||
precompiled_hostchecks_dir = '$vardir/precompiled'
|
||||
counters_directory = '$vardir/counters'
|
||||
tcp_cache_dir = '$vardir/cache'
|
||||
tmp_dir = '$vardir/tmp'
|
||||
logwatch_dir = '$vardir/logwatch'
|
||||
nagios_objects_file = '$nagconfdir/check_mk_objects.cfg'
|
||||
rrd_path = '$rrd_path'
|
||||
rrddcached_socket = '$rrdcached_socket'
|
||||
nagios_command_pipe_path = '$nagpipe'
|
||||
check_result_path = '$check_result_path'
|
||||
nagios_status_file = '$nagios_status_file'
|
||||
nagios_conf_dir = '$nagconfdir'
|
||||
nagios_user = '$nagiosuser'
|
||||
logwatch_notes_url = '${url_prefix}check_mk/logwatch.py?host=%s&file=%s'
|
||||
www_group = '$wwwgroup'
|
||||
nagios_config_file = '$nagios_config_file'
|
||||
nagios_startscript = '$nagios_startscript'
|
||||
nagios_binary = '$nagios_binary'
|
||||
apache_config_dir = '$apache_config_dir'
|
||||
htpasswd_file = '$htpasswd_file'
|
||||
nagios_auth_name = '$nagios_auth_name'
|
||||
web_dir = '$web_dir'
|
||||
livestatus_unix_socket = '$livesock'
|
||||
livebackendsdir = '$livebackendsdir'
|
||||
url_prefix = '$url_prefix'
|
||||
pnp_url = '${url_prefix}pnp4nagios/'
|
||||
pnp_templates_dir = '$pnptemplates'
|
||||
doc_dir = '$docdir'
|
||||
EOF
|
||||
|
||||
if [ -n "$OMD_ROOT" ] ; then
|
||||
cat <<EOF
|
||||
|
||||
# Special for OMD
|
||||
check_mk_automation = None
|
||||
omd_site = '$OMD_SITE'
|
||||
omd_root = '$OMD_ROOT'
|
||||
tcp_cache_dir = '$OMD_ROOT/tmp/check_mk/cache'
|
||||
counters_directory = '$OMD_ROOT/tmp/check_mk/counters'
|
||||
EOF
|
||||
else
|
||||
cat <<EOF
|
||||
check_mk_automation = 'sudo -u $(id -un) $bindir/check_mk --automation'
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
activechecksdir=${check_icmp_path%/*}
|
||||
|
||||
if [ -z "$YES" ]
|
||||
then
|
||||
@ -595,11 +533,11 @@ EOF
|
||||
|
||||
compile_mkeventd ()
|
||||
{
|
||||
local D=$SRCDIR/mkeventd.src
|
||||
local D=$SRCDIR/bin
|
||||
rm -rf $D
|
||||
mkdir -p $D
|
||||
tar xvzf $SRCDIR/mkeventd.tar.gz -C $D
|
||||
pushd $D/src &&
|
||||
tar xzf $SRCDIR/bin.tar.gz -C $D
|
||||
pushd $D &&
|
||||
make &&
|
||||
popd
|
||||
}
|
||||
@ -803,20 +741,23 @@ do
|
||||
fi &&
|
||||
mkdir -p $DESTDIR$sharedir &&
|
||||
tar xzf $SRCDIR/share.tar.gz -C $DESTDIR$sharedir &&
|
||||
mkdir -p $DESTDIR$python_lib_dir &&
|
||||
tar xzf $SRCDIR/lib.tar.gz -C $DESTDIR$python_lib_dir &&
|
||||
tar xzf $SRCDIR/base.tar.gz -C $DESTDIR$python_lib_dir &&
|
||||
mkdir -p $DESTDIR$sharedir/werks &&
|
||||
tar xzf $SRCDIR/werks.tar.gz -C $DESTDIR$sharedir/werks &&
|
||||
mkdir -p $DESTDIR$modulesdir &&
|
||||
create_defaults > $DESTDIR$modulesdir/defaults &&
|
||||
mkdir -p $DESTDIR$localedir &&
|
||||
mkdir -p $DESTDIR$checksdir &&
|
||||
tar xzf $SRCDIR/checks.tar.gz -C $DESTDIR$checksdir &&
|
||||
mkdir -p $DESTDIR$activechecksdir &&
|
||||
tar xzf $SRCDIR/active_checks.tar.gz -C $DESTDIR$activechecksdir &&
|
||||
mkdir -p $DESTDIR$notificationsdir &&
|
||||
tar xzf $SRCDIR/notifications.tar.gz -C $DESTDIR$notificationsdir &&
|
||||
mkdir -p $DESTDIR$inventorydir &&
|
||||
tar xzf $SRCDIR/inventory.tar.gz -C $DESTDIR$inventorydir &&
|
||||
mkdir -p $DESTDIR$web_dir &&
|
||||
tar xzf $SRCDIR/web.tar.gz -C $DESTDIR$web_dir &&
|
||||
cp $DESTDIR$modulesdir/defaults $DESTDIR$web_dir/htdocs/defaults.py &&
|
||||
mkdir -p $DESTDIR$pnptemplates &&
|
||||
tar xzf $SRCDIR/pnp-templates.tar.gz -C $DESTDIR$pnptemplates &&
|
||||
mkdir -p $DESTDIR$modulesdir &&
|
||||
@ -863,7 +804,10 @@ do
|
||||
chgrp $wwwgroup $DESTDIR$confdir/conf.d/distributed_wato.mk &&
|
||||
chmod 664 $DESTDIR$confdir/conf.d/distributed_wato.mk
|
||||
fi &&
|
||||
tar xzf $SRCDIR/conf.tar.gz -C $DESTDIR$confdir &&
|
||||
echo -e "# Main configuration file of Check_MK\n#We highly recommend to use WATO to configure Check_MK these days." \
|
||||
> $DESTDIR$confdir/main.mk-$VERSION &&
|
||||
echo -e "# Main configuration file of the Check_MK GUI\n#We highly recommend to use WATO to configure Check_MK these days." \
|
||||
> $DESTDIR$confdir/multisite.mk-$VERSION &&
|
||||
if [ -e $DESTDIR$confdir/check_mk.cfg -a ! -e $DESTDIR$confdir/main.mk ] ; then
|
||||
mv -v $DESTDIR$confdir/check_mk.cfg $DESTDIR$confdir/main.mk
|
||||
echo "Renamed check_mk.cfg into main.mk."
|
||||
@ -1058,13 +1002,9 @@ EOF
|
||||
compile_mkeventd 2>&1 | propeller > $SRCDIR/mkeventd.log
|
||||
if [ "${PIPESTATUS[0]}" = 0 ]
|
||||
then
|
||||
pushd $SRCDIR/mkeventd.src > /dev/null &&
|
||||
install -m 755 src/mkevent $DESTDIR$bindir &&
|
||||
install -m 4754 src/mkeventd_open514 -g $wwwgroup $DESTDIR$bindir &&
|
||||
install -m 644 checks/* $DESTDIR$checksdir &&
|
||||
install -m 755 bin/* $DESTDIR$bindir &&
|
||||
install -m 755 lib/* $DESTDIR${check_icmp_path%/*} &&
|
||||
cp -r web/* $DESTDIR$web_dir &&
|
||||
pushd $SRCDIR > /dev/null &&
|
||||
install -m 755 bin/mkevent bin/mkeventd $DESTDIR$bindir &&
|
||||
install -m 4754 bin/mkeventd_open514 -g $wwwgroup $DESTDIR$bindir &&
|
||||
mkdir -p $DESTDIR$confdir/mkeventd.d/wato &&
|
||||
chown $wwwuser.$wwwgroup $DESTDIR$confdir/mkeventd.d/wato &&
|
||||
if [ ! -e "$DESTDIR$confdir/multisite.d/mkeventd.mk" ] ; then
|
||||
|
BIN
share.tar.gz
BIN
share.tar.gz
Binary file not shown.
40
standalone.make
Normal file
40
standalone.make
Normal file
@ -0,0 +1,40 @@
|
||||
# +------------------------------------------------------------------+
|
||||
# | ____ _ _ __ __ _ __ |
|
||||
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
|
||||
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
|
||||
# | | |___| | | | __/ (__| < | | | | . \ |
|
||||
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
|
||||
# | |
|
||||
# | Copyright Mathias Kettner 2014 mk@mathias-kettner.de |
|
||||
# +------------------------------------------------------------------+
|
||||
#
|
||||
# This file is part of Check_MK.
|
||||
# The official homepage is at http://mathias-kettner.de/check_mk.
|
||||
#
|
||||
# check_mk is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation in version 2. check_mk is distributed
|
||||
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
|
||||
# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE. See the GNU General Public License for more de-
|
||||
# tails. You should have received a copy of the GNU General Public
|
||||
# License along with GNU Make; see the file COPYING. If not, write
|
||||
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
# Boston, MA 02110-1301 USA.
|
||||
|
||||
# TODO(sp) We should really use autotools here...
|
||||
ifneq ($(shell which g++-6 2>/dev/null),)
|
||||
CXX := g++-6 -std=c++14
|
||||
else
|
||||
CXX := g++-5 -std=c++14
|
||||
endif
|
||||
|
||||
CXXFLAGS := -g -O3 -Wall -Wextra
|
||||
LDFLAGS := -static-libstdc++
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: $(EXECUTABLES)
|
||||
|
||||
clean:
|
||||
$(RM) $(EXECUTABLES)
|
BIN
web.tar.gz
BIN
web.tar.gz
Binary file not shown.
BIN
werks.tar.gz
BIN
werks.tar.gz
Binary file not shown.
Loading…
Reference in New Issue
Block a user