Commit 180a9c79 authored by Rafael Monnerat's avatar Rafael Monnerat

monitor: Improve and fix monitor software release

  Drop fluentd as the instalation is not working well
  Stop rsync logs and use symlink
  Clean up installation
  Make network bench use parameters instead of a static test list.
parent b4fa5d31
...@@ -18,9 +18,10 @@ parts = ...@@ -18,9 +18,10 @@ parts =
cgi-httpd-graceful-wrapper cgi-httpd-graceful-wrapper
monitor-promise monitor-promise
monitor-instance-log-access monitor-instance-log-access
cron-rsync-logs
cron-smart-monitor-logs cron-smart-monitor-logs
cron-network-bench cron-network-bench
symlink-re6st-logs
symlink-collected-logs
extends = ${monitor-template:output} extends = ${monitor-template:output}
...@@ -29,13 +30,6 @@ eggs-directory = ${buildout:eggs-directory} ...@@ -29,13 +30,6 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
[cron-rsync-logs]
<= cron
recipe = slapos.cookbook:cron.d
name = rsync-logs
frequency = * * * * *
command = $${rsync-logs:rendered}
[cron-smart-monitor-logs] [cron-smart-monitor-logs]
<= cron <= cron
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
...@@ -47,20 +41,19 @@ command = $${smartmon-logs:rendered} ...@@ -47,20 +41,19 @@ command = $${smartmon-logs:rendered}
<= cron <= cron
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
name = network-bench-test name = network-bench-test
frequency = */3 * * * * frequency = */10 * * * *
command = ${buildout:bin-directory}/networkbench $${network-bench-configuration:rendered} $${monitor-directory:monitor-log} command = ${buildout:bin-directory}/networkbench $${network-bench-configuration:rendered} $${monitor-directory:monitor-log}
[rsync-logs]
recipe = slapos.recipe.template:jinja2 [symlink-re6st-logs]
template = ${rsync-logs-script:output} recipe = cns.recipe.symlink
rendered = $${monitor-directory:bin}/rsync-logs.sh symlink = /var/log/re6stnet = $${monitor-directory:system-log}/re6stnet
mode = 0744 autocreate = true
context =
key buildout_directory buildout:directory [symlink-collected-logs]
raw rsync_binary ${rsync:location}/bin/rsync recipe = cns.recipe.symlink
key server_log_directory monitor-directory:server-log symlink = /srv/slapgrid/var/data-log = $${monitor-directory:server-log}/data-log
raw re6st_log_directory /var/log/re6stnet autocreate = true
key system_log_directory monitor-directory:system-log
[smartmon-logs] [smartmon-logs]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -79,6 +72,7 @@ template = ${network-bench-cfg:output} ...@@ -79,6 +72,7 @@ template = ${network-bench-cfg:output}
rendered = $${monitor-directory:etc}/network_bench.cfg rendered = $${monitor-directory:etc}/network_bench.cfg
mode = 0744 mode = 0744
context = context =
key slapparameter_dict slap-parameters:configuration
[pwgen] [pwgen]
...@@ -103,17 +97,21 @@ private-hash = $${pwgen:passwd}$${pwgen32:passwd} ...@@ -103,17 +97,21 @@ private-hash = $${pwgen:passwd}$${pwgen32:passwd}
frontend-domain = frontend-domain =
[monitor-frontend] [monitor-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional recipe = slapos.cookbook:requestoptional
name = Monitor Frontend name = Monitor Frontend
# XXX We have hardcoded SR URL here. # XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true slave = true
config = url domain
config-url = $${monitor-parameters:url} config-url = $${monitor-parameters:url}
config-domain = $${slap-parameter:frontend-domain} config-domain = $${slap-parameter:frontend-domain}
return = site_url domain return = site_url domain
server-url = $${slap-connection:server-url}
key-file = $${slap-connection:key-file}
cert-file = $${slap-connection:cert-file}
computer-id = $${slap-connection:computer-id}
partition-id = $${slap-connection:partition-id}
[publish-connection-informations] [publish-connection-informations]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
monitor_url = $${monitor-parameters:url} monitor_url = $${monitor-parameters:url}
......
[buildout]
parts =
switch_softwaretype
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
[switch_softwaretype]
recipe = slapos.cookbook:softwaretype
default = $${instance-base-runner:rendered}
[instance-base-runner]
recipe = slapos.recipe.template:jinja2
template = ${template-monitor:output}
rendered = $${buildout:directory}/template-monitor.cfg
extensions = jinja2.ext.do
context = key buildout buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key slapparameter_dict slap-configuration:configuration
mode = 0644
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
\ No newline at end of file
[network_bench]
url =
http://www.tiolive.com/robots.txt
http://www.erp5.com/robots.txt
http://www.erp5.cn/robots.txt
http://www.nexedi.cn/robots.txt
http://www.osoe-project.cn/robots.txt
http://www.nexedi.cn/robots.txt
http://www.osoe-project.org/robots.txt
http://www.osoe-project.cn/robots.txt
http://www.google.com/robots.txt
http://ipv6.google.com/robots.txt
https://[2001:67c:1254:e:a7::2e20]:9685/monitor-public/rssfeed.html
https://[2001:67c:1254:69::115c]:9685/monitor-public/rssfeed.html
https://[2001:67c:1254:8a::2621]:9685/monitor-public/rssfeed.html
https://[2001:67c:1254:e:c7::89ae]:9685/monitor-public/rssfeed.html
https://[2001:67c:1254:e:93::2e31]:9685/monitor-public/rssfeed.html
https://[2001:67c:1254:1f::2723]:9685/monitor-public/rssfeed.html
https://[2001:41d0:1:a78b::3c2a]:9685/monitor-public/rssfeed.html
http://[2001:67c:1254:4::1]/index.html
dns =
erp5.com
www.erp5.com
erp5.cn
www.erp5.cn
nexedi.cn
www.nexedi.com
www.nexedi.cn
www.osoe-project.org
www.osoe-project.cn
free.fr
google.com
ping =
erp5.com
erp5.cn
google.com
free.fr
frontend1.nexedi.com
frontend2.nexedi.com
frontend3.nexedi.cn
42.192.4.15
195.208.185.22
[network_bench]
url =
{{ slapparameter_dict.get('test_http_url_list', '').split('\n') | join('\n ') }}
dns =
{{ slapparameter_dict.get('test_name_list', '').split('\n') | join('\n ') }}
ping =
{{ slapparameter_dict.get('ping_ip_list', '').split('\n') | join('\n ') }}
ping6 =
{{ slapparameter_dict.get('ping6_ip_list', '').split('\n') | join('\n ') }}
\ No newline at end of file
#!${dash-output:dash}
RSYNC_BIN={{ rsync_binary }}
SLAPGRID_LOGS={{ buildout_directory }}/../var/data-log/
RE6STLOGS={{ re6st_log_directory }}
SYSTEMLOGS={{ system_log_directory }}
SERVERLOGS={{ server_log_directory }}
$RSYNC_BIN -a --delete $SLAPGRID_LOGS $SERVERLOGS
if [ -d $RE6STLOGS ]; then
$RSYNC_BIN -a --delete $RE6STLOGS $SYSTEMLOGS
fi
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
extends = extends =
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
../../component/rsync/buildout.cfg
../../component/smartmontools/buildout.cfg ../../component/smartmontools/buildout.cfg
../../component/lmsensors/buildout.cfg ../../component/lmsensors/buildout.cfg
../../component/fluentd/buildout.cfg ../../component/fluentd/buildout.cfg
...@@ -12,17 +11,25 @@ parts = ...@@ -12,17 +11,25 @@ parts =
slapos-cookbook slapos-cookbook
slapos-toolbox slapos-toolbox
template template
network-bench-cfg
template-monitor
eggs eggs
rsync
smartmontools smartmontools
lmsensors lmsensors
fluentd
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/template.cfg
md5sum = 184a27424b48514cfe9374e881e1cc0c md5sum = daf1125d0d67b6b140a4b6de8c8e35f3
mode = 0644
[template-monitor]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-monitor.cfg.jinja2
output = ${buildout:directory}/template-monitor.cfg
md5sum = b5ef3caea873f5ca202792220263aef2
mode = 0644 mode = 0644
# stupify index for now # stupify index for now
...@@ -34,13 +41,6 @@ md5sum = 876f18b159fbd9325332d0f42e9172ac ...@@ -34,13 +41,6 @@ md5sum = 876f18b159fbd9325332d0f42e9172ac
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
md5sum = 1f30b17f5ea11fd033984d17c38bcfd3 md5sum = 1f30b17f5ea11fd033984d17c38bcfd3
[rsync-logs-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/rsync-logs.sh.in
md5sum = 8828868268a6f9761eccbcec1660cc9a
output = ${buildout:directory}/template-rsync-logs.sh.in
mode = 0644
[smartmon-logs-script] [smartmon-logs-script]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/smartmon.py.in url = ${:_profile_base_location_}/smartmon.py.in
...@@ -50,8 +50,8 @@ mode = 0644 ...@@ -50,8 +50,8 @@ mode = 0644
[network-bench-cfg] [network-bench-cfg]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/network_bench.cfg url = ${:_profile_base_location_}/network_bench.cfg.in
md5sum = 44f8db5fca5e16ae87f570623a3ad0b4 md5sum = a3510050a1b237dc11ab46a9d2b78f56
output = ${buildout:directory}/template-network-bench-cfg.in output = ${buildout:directory}/template-network-bench-cfg.in
mode = 0644 mode = 0644
...@@ -80,6 +80,7 @@ cns.recipe.symlink = 0.2.3 ...@@ -80,6 +80,7 @@ cns.recipe.symlink = 0.2.3
plone.recipe.command = 1.1 plone.recipe.command = 1.1
slapos.recipe.template = 2.7 slapos.recipe.template = 2.7
z3c.recipe.scripts = 1.0.1 z3c.recipe.scripts = 1.0.1
rubygemsrecipe = 0.2.1
apache-libcloud = 0.16.0 apache-libcloud = 0.16.0
ecdsa = 0.11 ecdsa = 0.11
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment