Module: check_mk
Branch: master
Commit: 4b46173eb7f23b4d6d94f8e325e9fb2e90500adc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4b46173eb7f23b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Dec 23 18:25:49 2010 +0100
Fixed up ChangeLog
---
ChangeLog | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 838aecf..af97e19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,7 +5,7 @@
Please use display_options instead.
* Finally removed deprecated filesystem_levels. Please use check_parameters instead.
* Livestatus: The StatsGroupBy: header is still working but now deprecated.
- Please simply use Columns: instead. If your query contains at least one Stats:
+ Please simply use Columns: instead. If your query contains at least one Stats:-
header than Columns: has the meaning of the old StatsGroupBy: header
Core, Setup, etc.:
Module: check_mk
Branch: master
Commit: ccca32fce1e9356f9e8118615c713859211e059c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ccca32fce1e935…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Dec 23 18:14:32 2010 +0100
setup.sh: several cleanups
---
scripts/setup.sh | 42 +++++++++++++++++++++---------------------
1 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/scripts/setup.sh b/scripts/setup.sh
index 840867b..cd54855 100755
--- a/scripts/setup.sh
+++ b/scripts/setup.sh
@@ -164,17 +164,25 @@ ask_title ()
if [ -z "$YES" ] ; then cat <<EOF
-[1;44;37m _ _ _ [0m
-[1;44;37m ___| |__ ___ ___| | __ _ __ ___ | | __ [0m
-[1;44;37m / __| '_ \ / _ \/ __| |/ / | '_ \` _ \| |/ / [0m
-[1;44;37m | (__| | | | __/ (__| < | | | | | | < [0m
-[1;44;37m \___|_| |_|\___|\___|_|\_\___|_| |_| |_|_|\_\ [0m
-[1;44;37m |_____| [0m
+
+
+
+
+
+
+
+
+[1;44;37m ____ _ _ __ __ _ __ [0m
+[1;44;37m / ___| |__ ___ ___| | __ | \/ | |/ / [0m
+[1;44;37m | | | '_ \ / _ \/ __| |/ / | |\/| | ' / [0m
+[1;44;37m | |___| | | | __/ (__| < | | | | . \ [0m
+[1;44;37m \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ [0m
+[1;44;37m |_____| [0m
[1;44;37m [0m
-[1;45;37m check_mk setup $(printf "%32s" Version:' '$VERSION) [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
+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
@@ -234,17 +242,13 @@ ask_dir modulesdir /usr/share/$NAME/modules $HOMEBASEDIR/modules "check_mk modul
also create a file 'defaults' in that directory that reflects all settings
you are doing right now"
-ask_dir web_dir /usr/share/$NAME/web $HOMEBASEDIR/web "check_mk's web pages" \
- "Directory where Check_mk's web pages should be installed. Currently these
-web pages allow you to search in all of Nagios services and send several
-different commands to all found services. That directory should [4;1mnot[0m be
+ask_dir web_dir /usr/share/$NAME/web $HOMEBASEDIR/web "Check_MK Multisite GUI" \
+ "Directory where Check_mk's Multisite GUI should be installed. Multisite is
+an optional replacement for the Nagios GUI, but is also needed for the
+logwatch extension. That directory should [4;1mnot[0m be
in your WWW document root. A separate apache configuration file will be
installed that maps the directory into your URL schema"
-ask_dir mibsdir /usr/share/snmp/mibs $HOMEBASEDIR/mibs "SNMP mibs" \
- "Directory for SNMP MIB files (for copyright reasons we currently do
-not ship any MIB files, though...)"
-
ask_dir docdir /usr/share/doc/$NAME $HOMEBASEDIR/doc "documentation" \
"Some documentation about check_mk will be installed here. Please note,
however, that most of check_mk's documentation is available only online at
@@ -614,10 +618,6 @@ do
tar xzf $SRCDIR/doc.tar.gz -C $DESTDIR$docdir &&
mkdir -p $DESTDIR$checkmandir &&
tar xzf $SRCDIR/checkman.tar.gz -C $DESTDIR$checkmandir &&
- if [ -e $SRCDIR/mibs.tar.gz ] ; then
- mkdir -p $DESTDIR$mibsdir &&
- tar xzf $SRCDIR/mibs.tar.gz -C $DESTDIR$mibsdir
- fi &&
mkdir -p $DESTDIR$agentsdir &&
tar xzf $SRCDIR/agents.tar.gz -C $DESTDIR$agentsdir &&
for agent in $DESTDIR/$agentsdir/check_mk_*agent.* $DESTDIR/$agentsdir/mk_logwatch ; do
@@ -664,7 +664,7 @@ do
rm -f $DESTDIR$bindir/check_mk &&
echo -e "#!/bin/sh\nexec python $modulesdir/check_mk.py "'"$@"' > $DESTDIR$bindir/check_mk &&
chmod 755 $DESTDIR$bindir/check_mk &&
- ln -s $DESTDIR$bindir/check_mk cmk &&
+ ln -s check_mk $DESTDIR$bindir/cmk &&
echo -e "#!/bin/sh\nexec python $modulesdir/check_mk.py -P "'"$@"' > $DESTDIR$bindir/mkp &&
chmod 755 $DESTDIR$bindir/mkp &&
sed -i "s#@BINDIR@#$bindir#g" $DESTDIR$docdir/check_mk_templates.cfg &&
Module: check_mk
Branch: master
Commit: 624876025abc06e26582a796f1b0d74d80a91092
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=624876025abc06…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Dec 23 18:00:40 2010 +0100
install_nagios.sh: new option -m
---
.bugs/85 | 45 +++++++++++++++++++++++++++++++++++++++++++++
scripts/install_nagios.sh | 16 +++++++++++-----
2 files changed, 56 insertions(+), 5 deletions(-)
diff --git a/.bugs/85 b/.bugs/85
new file mode 100644
index 0000000..fe689d4
--- /dev/null
+++ b/.bugs/85
@@ -0,0 +1,45 @@
+Title: Modulare Agenten
+Component: core
+Benefit: 6
+State: open
+Cost: 5
+Date: 2010-12-23 08:40:16
+Class: feature
+
+Die Checks sollen den Code für die Agenten selbst mitbringen.
+Die Agenten werden dann auf Wunsch dynamisch zusammengebaut.
+
+Eine Idee ist z.B., dass jeder Check sich selbst einklassifiziert
+in essential/extended/full. In essential sind nur die
+absolut wichtigen Checks enthalten. So kann man dann einen
+Agenten einer bestimmten Ausbaustufe bauen.
+
+Umsetzung:
+
+Erstmal die bestehenden Agenten auseinanderpflücken und in
+die Checks einbauen. Das gleiche dann auch für den Windows-Agenten
+machen. Gemeinsamer kann auch hier evtl. nach win.include geschoben
+werden, aber nicht der generelle Rumpfteil.
+
+Dann muss man in Check_MK einen Befehl einbauen, um die Agenten
+zu erzeugen: cmk -A. Hier gibt es viele denkbare Aufrufvarianten:
+
+* Angabe des Betriebssystems (windows, linux, aix, hpux, freebsd, solaris).
+* Angabe der Wichtigkeit (essential, extended, full).
+* beides kombiniert
+
+Die fertigen Agenten gehen dann nach var/check_mk/agents. Im Falle von
+Unix sind es die Shellskripten. Im Falle von Windows ist es der Quellcode,
+der natürlich erst noch übersetzt werden muss.
+
+Im Buildsystem muss ich jetzt darauf achten, dass bei einem 'make'
+auch immer alle Agenten gebaut werden.
+
+Der nächste Schritt wäre dann die Möglichkeit, per main.mk spezifische
+Agenten zu bauen, in dem man irgendwie angibt, welche Checks (genauer:
+Sektionen) rein sollen. Beispiel:
+
+# Agent 'hirn' ist wie essential, aber ohne fs, aber mit ntp
+agents["hirn"] = [ '@essential', '!fs', 'ntp' ]
+agents["hirn2"] = [ '@hirn', '!df', 'depp' ]
+
diff --git a/scripts/install_nagios.sh b/scripts/install_nagios.sh
index bdebe80..a55dcd3 100644
--- a/scripts/install_nagios.sh
+++ b/scripts/install_nagios.sh
@@ -54,12 +54,12 @@ exec > >(tee $LOGFILE) 2>&1
set -e
-NAGIOS_VERSION=3.2.2
+NAGIOS_VERSION=3.2.3
PLUGINS_VERSION=1.4.15
-RRDTOOL_VERSION=1.4.3
+RRDTOOL_VERSION=1.4.4
CHECK_MK_VERSION=1.1.9i3
PNP_VERSION=0.6.6
-NAGVIS_VERSION=1.5.1
+NAGVIS_VERSION=1.5.6
SOURCEFORGE_MIRROR=dfn
NAGIOS_URL="http://downloads.sourceforge.net/project/nagios/nagios-3.x/nagios-$NAGIOS_V…"
@@ -148,11 +148,16 @@ esac
# Process command line options
if [ $# -gt 0 ]; then
- while getopts "s:y" options $OPTS; do
+ while getopts "s:ym" options $OPTS; do
case $options in
y)
YES=1
;;
+ m)
+ WITHOUT_MK=1
+ NOTICE="
+Setting up without Check_MK!"
+ ;;
s)
SITE=$OPTARG
;;
@@ -190,6 +195,7 @@ Check_MK on a freshly installed Linux system. It will:
The output of this script is logged into $LOGFILE.
No user interaction is neccesary.
+$NOTICE
EOF
if [ -z "$YES" ]; then
@@ -985,7 +991,7 @@ killall nagios || true
/etc/init.d/nagios start
activate_initd nagios || true
-if [ "$CHECK_MK_VERSION" ]
+if [ "$CHECK_MK_VERSION" -a -z "$WITHOUT_MK" ]
then
# -----------------------------------------------------------------------------
heading "Check_MK"
Module: check_mk
Branch: master
Commit: 2c7f7cd78cb14aa8ef3d3ca6f9ed5e051dd3e490
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2c7f7cd78cb14a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 22 15:52:16 2010 +0100
Livestatus: do not use is_contact_member_of_contactgroup anymore
---
.bugs/6 | 10 +++++++---
ChangeLog | 2 ++
livestatus/src/ContactgroupsMemberColumn.cc | 9 +++++++--
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/.bugs/6 b/.bugs/6
index 08f6291..e6619fb 100644
--- a/.bugs/6
+++ b/.bugs/6
@@ -1,12 +1,16 @@
Title: is_contact_member_of_contactgroup selbst programmieren
Component: livestatus
+State: done
+Class: todo
+Date: 2010-12-21 10:55:19
Benefit: 5
-State: open
Cost: 2
-Date: 2010-12-21 10:55:19
-Class: todo
+Fun: 0
Diese Funktion ist im CVS schon weg und sehr leicht
selbst zu programmieren. Sollte man bald mal machen,
damit ein stabiles Livestatus schon bereit ist, wenn
das neue Nagios kommt.
+
+2010-12-22 15:51:55: changed state open -> done
+Ist umgesetzt. Sollte jetzt funktionieren.
diff --git a/ChangeLog b/ChangeLog
index f47fa0b..5715a30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,6 +42,8 @@
column to work you need to specify the base directory of the PNP graphs
with the module option pnp_path=, e.g. pnp_path=/omd/sites/wato/var/pnp4nagios/perfdata
* Allow more than one column for StatsGroupBy:
+ * Do not use function is_contact_member_of_contactgroup anymore (get compatible
+ with Nagios CVS)
1.1.9i2:
Checks & Agents:
diff --git a/livestatus/src/ContactgroupsMemberColumn.cc b/livestatus/src/ContactgroupsMemberColumn.cc
index d26b8ee..3811671 100644
--- a/livestatus/src/ContactgroupsMemberColumn.cc
+++ b/livestatus/src/ContactgroupsMemberColumn.cc
@@ -28,6 +28,11 @@
bool ContactgroupsMemberColumn::isNagiosMember(void *cg, void *ctc)
{
- return is_contact_member_of_contactgroup((contactgroup *)cg, (contact *)ctc);
+ contactsmember *mem;
+ for (mem = ((contactgroup *)cg)->members; mem != NULL; mem = mem->next)
+ {
+ if (mem->contact_ptr == ctc)
+ return true;
+ }
+ return false;
}
-