Module: check_mk
Branch: master
Commit: 3d6bcace2e568a0eee9c6dd642b6f8104f3cd566
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3d6bcace2e568a…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Wed Jan 18 23:38:00 2012 +0100
Update of cmk benchmark - read delay precompile setting now, enable httpd on rhel, turn
off iptables on rhel *and* set 0.01min check interval for extra oomph.
---
doc/opt/benchmark/bench.cfg | 5 +++--
doc/opt/benchmark/cmkbench.sh | 33 ++++++++++++++++++++++++++++-----
2 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/doc/opt/benchmark/bench.cfg b/doc/opt/benchmark/bench.cfg
index 89ee8f4..ba53018 100644
--- a/doc/opt/benchmark/bench.cfg
+++ b/doc/opt/benchmark/bench.cfg
@@ -1,10 +1,11 @@
# Config datei fuer Check_MK benchmark
# pingonly deaktiviert "services"
-_pingonly="no"
+_pingonly="yes"
_livecheck="yes"
_livecheck_helpers=30
_central="zentrale"
_sites=6
-_hosts=4000
+_hosts=800
_pnp="off"
+_delay_precompile=False
diff --git a/doc/opt/benchmark/cmkbench.sh b/doc/opt/benchmark/cmkbench.sh
index 410bc3b..a1e5336 100755
--- a/doc/opt/benchmark/cmkbench.sh
+++ b/doc/opt/benchmark/cmkbench.sh
@@ -15,6 +15,7 @@ fi
#_sites=5
#_hosts=1000
#_pnp=on
+#_delay_precompile=False
central=${_central}
@@ -22,6 +23,18 @@ pnp=${_pnp}
pingonly=${_pingonly}
+setup_apache()
+{
+if [ -r /etc/redhat-release ]; then
+ # most OS don't just blindly enable and start a service.
+ chkconfig httpd on
+ service httpd start
+ # stop the firewall - i don't know how to carefully punch a hole.
+ chkconfig iptables off
+ service iptables stop
+fi
+}
+
gen_sites()
{
i=1
@@ -49,6 +62,7 @@ for site in ${sites} ; do
omd config $site set LIVESTATUS_TCP on
omd config $site set APACHE_TCP_PORT $(( 5000 + $i ))
omd config $site set LIVESTATUS_TCP_PORT $(( 6557 + $i ))
+ # Bug - dont yet listen to livecheck y/n
echo "broker_module=/omd/sites/${site}/lib/mk-livestatus/livestatus.o
livecheck=/omd/versions/default/lib/mk-livestatus/livecheck
num_livecheck_helpers=${_livecheck_helpers} num_client_threads=20
pnp_path=/omd/sites/${site}/var/pnp4nagios/perfdata /omd/sites/${site}/tmp/run/live
event_broker_options=-1" > /omd/sites/$site/etc/mk-livestatus/nagios.cfg
@@ -82,6 +96,7 @@ fi
prepare()
{
get_cache
+ setup_apache
config_omd_sites
config_omd_central
chmod u+s /opt/omd/versions/default/lib/mk-livestatus/livecheck
@@ -126,7 +141,7 @@ add_hosts()
for site in $sites ; do
-echo "delay_precompile = True" >
/omd/sites/$site/etc/check_mk/conf.d/options.mk
+echo "delay_precompile = ${_delay_precompile}" >
/omd/sites/$site/etc/check_mk/conf.d/options.mk
cat <<EOF > /omd/sites/$site/etc/check_mk/conf.d/hosts.mk
@@ -149,6 +164,15 @@ while _i < _hosts:
"dummyhost%d" % _i : "127.0.0.1"
})
EOF
+
+cat <<ZXY > /omd/sites/$site/etc/check_mk/conf.d/service.mk
+extra_service_conf["normal_check_interval"] = [
+ ( "0.01", ALL_HOSTS, [ "Ping" ] ),
+]
+legacy_checks += [
+ (( "check-mk-ping", "Ping", True), ALL_HOSTS),
+]
+ZXY
if [ $pingonly = "no" ]; then
@@ -156,7 +180,7 @@ cat <<ABC >
/omd/sites/$site/etc/check_mk/conf.d/datasources.mk
datasource_programs += [( "cat /dev/shm/cmk.cache", ALL_HOSTS )]
ABC
-cat <<ZZZ > /omd/sites/$site/etc/check_mk/conf.d/service.mk
+cat <<ZZZ >> /omd/sites/$site/etc/check_mk/conf.d/service.mk
checks += [
(ALL_HOSTS, "cpu.loads", None, cpuload_default_levels),
(ALL_HOSTS, "cpu.threads", None, threads_default_levels),
@@ -174,9 +198,6 @@ checks += [
(ALL_HOSTS, "tcp_conn_stats", None, tcp_conn_stats_default_levels),
(ALL_HOSTS, "uptime", None, None),
]
-extra_service_conf["check_interval"] = [
- ( "0.1", ALL_HOSTS, [ "Ping"]),
-]
ZZZ
fi
@@ -186,6 +207,8 @@ done
}
+
+
prepare
setup_central
start_omds