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…
@@ -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"