Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
francois
slapos
Commits
bc31b905
Commit
bc31b905
authored
Aug 12, 2014
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: Include server usage logs.
parent
edfb66ca
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
135 additions
and
3 deletions
+135
-3
software/monitor/dygraph-combined.js
software/monitor/dygraph-combined.js
+2
-0
software/monitor/instance.cfg
software/monitor/instance.cfg
+39
-1
software/monitor/plot.html.in
software/monitor/plot.html.in
+62
-0
software/monitor/rsync-logs.sh.in
software/monitor/rsync-logs.sh.in
+7
-0
software/monitor/software.cfg
software/monitor/software.cfg
+25
-2
No files found.
software/monitor/dygraph-combined.js
0 → 100644
View file @
bc31b905
This source diff could not be displayed because it is too large. You can
view the blob
instead.
software/monitor/instance.cfg
View file @
bc31b905
...
...
@@ -18,9 +18,47 @@ parts =
cgi-httpd-graceful-wrapper
monitor-promise
monitor-instance-log-access
cron-rsync-logs
plot-html
dygraph-js
extends = ${monitor-template:output}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[cron-rsync-logs]
<= cron
recipe = slapos.cookbook:cron.d
name = rsync-logs
frequency = * * * * *
command = $${rsync-logs:rendered}
[rsync-logs]
recipe = slapos.recipe.template:jinja2
template = ${rsync-logs-script:output}
rendered = $${monitor-directory:bin}/rsync-logs.sh
mode = 0744
context =
key buildout_directory buildout:directory
raw rsync_binary ${rsync:location}/bin/rsync
key server_log_directory monitor-directory:server-log
[plot-html]
recipe = slapos.recipe.template:jinja2
template = ${template-plot-html:output}
rendered = $${monitor-directory:server-log}/plot.html
mode = 0644
context =
[dygraph-js]
recipe = slapos.recipe.template:jinja2
template = ${template-dygraph-js:output}
rendered = $${monitor-directory:server-log}/dygraph-combined.js
mode = 0644
context =
[monitor-directory]
server-log = $${:private-directory}/server-log
software/monitor/plot.html.in
0 → 100644
View file @
bc31b905
<html>
<head>
<meta
charset=
"utf-8"
>
<style>
div
{
float
:
left
;
margin
:
5px
;
}
</style>
</head>
<body>
<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>
<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
"
);
</script>
</body>
</html>
software/monitor/rsync-logs.sh.in
0 → 100644
View file @
bc31b905
#!${dash-output:dash}
RSYNC_BIN={{ rsync_binary }}
SLAPGRID_LOGS={{ buildout_directory }}/../var/data-logs/
SERVERLOGS={{ server_log_directory }}
$RSYNC_BIN -a $SLAPGRID_LOGS $SERVERLOGS
software/monitor/software.cfg
View file @
bc31b905
...
...
@@ -3,17 +3,40 @@
extends =
../../stack/monitor/buildout.cfg
../../stack/slapos.cfg
../../component/rsync/buildout.cfg
parts =
slapos-cookbook
template
eggs
rsync
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/instance.cfg
md5sum = 02442c6727c8fe8247dc91c4b085bcc6
md5sum = df01574007b7e9a05cf9a4eabe07e78c
mode = 0644
[rsync-logs-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/rsync-logs.sh.in
md5sum = e48c41cf1cebcaf33353e950edc94717
output = ${buildout:directory}/template-rsync-logs.sh.in
mode = 0644
[template-plot-html]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/plot.html.in
md5sum = 7f9f201f6695ae56b26b742e571478f5
output = ${buildout:directory}/template-plot-html.in
mode = 0644
[template-dygraph-js]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/dygraph-combined.js
md5sum = 9bbf0b64dc1ee1ed3b6f4e2c302e21aa
output = ${buildout:directory}/dygraph-combined.js
mode = 0644
[eggs]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment