Commit bc31b905 authored by Rafael Monnerat's avatar Rafael Monnerat

monitor: Include server usage logs.

parent edfb66ca
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -18,9 +18,47 @@ parts =
extends = ${monitor-template:output}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
\ No newline at end of file
offline = true
<= cron
recipe = slapos.cookbook:cron.d
name = rsync-logs
frequency = * * * * *
command = $${rsync-logs:rendered}
recipe = slapos.recipe.template:jinja2
template = ${rsync-logs-script:output}
rendered = $${monitor-directory:bin}/
mode = 0744
context =
key buildout_directory buildout:directory
raw rsync_binary ${rsync:location}/bin/rsync
key server_log_directory monitor-directory:server-log
recipe = slapos.recipe.template:jinja2
template = ${template-plot-html:output}
rendered = $${monitor-directory:server-log}/plot.html
mode = 0644
context =
recipe = slapos.recipe.template:jinja2
template = ${template-dygraph-js:output}
rendered = $${monitor-directory:server-log}/dygraph-combined.js
mode = 0644
context =
server-log = $${:private-directory}/server-log
<meta charset="utf-8">
div {
float: left;
margin: 5px;
<div> <b> LOADAVG </b> <div class="chart"id="loadavg"> </div></div>
<div> <b> CPU PERCENT </b> <div class="chart"id="cpu_percent"> </div></div>
<div> <b> MEMORY USED </b> <div class="chart"id="memory_used"> </div></div>
<div> <b> MEMORY FREE </b> <div class="chart"id="memory_free"> </div></div>
<div> <b> NET IN BYTES </b> <div class="chart"id="net_in_bytes"> </div></div>
<div> <b> NET IN ERROR </b> <div class="chart"id="net_in_errors"> </div></div>
<div> <b> NET IN DROPPED </b> <div class="chart"id="net_in_dropped"> </div></div>
<div> <b> NET OUT BYTES </b> <div class="chart"id="net_out_bytes"> </div></div>
<div> <b> NET OUT ERRORS </b> <div class="chart"id="net_out_errors"> </div></div>
<div> <b> NET OUT DROPPED </b> <div class="chart"id="net_out_dropped"> </div></div>
<script type="text/javascript" src="dygraph-combined.js"></script>
new Dygraph(
document.getElementById("loadavg"), "system_loadavg.csv");
new Dygraph(
document.getElementById("cpu_percent"), "system_cpu_percent.csv");
new Dygraph(
document.getElementById("memory_used"), "system_memory_used.csv");
new Dygraph(
document.getElementById("memory_free"), "system_memory_free.csv");
new Dygraph(
document.getElementById("net_in_bytes"), "system_net_in_bytes.csv");
new Dygraph(
document.getElementById("net_in_errors"), "system_net_in_errors.csv");
new Dygraph(
document.getElementById("net_in_dropped"), "system_net_in_dropped.csv");
new Dygraph(
document.getElementById("net_out_bytes"), "system_net_out_bytes.csv");
new Dygraph(
document.getElementById("net_out_errors"), "system_net_out_errors.csv");
new Dygraph(
document.getElementById("net_out_dropped"), "system_net_out_dropped.csv");
RSYNC_BIN={{ rsync_binary }}
SLAPGRID_LOGS={{ buildout_directory }}/../var/data-logs/
SERVERLOGS={{ server_log_directory }}
......@@ -3,17 +3,40 @@
extends =
parts =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/instance.cfg
md5sum = 02442c6727c8fe8247dc91c4b085bcc6
md5sum = df01574007b7e9a05cf9a4eabe07e78c
mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/
md5sum = e48c41cf1cebcaf33353e950edc94717
output = ${buildout:directory}/
mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/
md5sum = 7f9f201f6695ae56b26b742e571478f5
output = ${buildout:directory}/
mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/dygraph-combined.js
md5sum = 9bbf0b64dc1ee1ed3b6f4e2c302e21aa
output = ${buildout:directory}/dygraph-combined.js
mode = 0644
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