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
Roque
slapos
Commits
d630e6b4
Commit
d630e6b4
authored
Dec 31, 2013
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack-monitor: now displays in only one interface
parent
93fcdebf
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
13 deletions
+44
-13
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+12
-4
stack/monitor/index.html.jinja2
stack/monitor/index.html.jinja2
+12
-0
stack/monitor/make-rss.sh.in
stack/monitor/make-rss.sh.in
+1
-1
stack/monitor/monitor.cfg.in
stack/monitor/monitor.cfg.in
+19
-8
stack/monitor/settings.cgi.in
stack/monitor/settings.cgi.in
+0
-0
stack/monitor/status.cgi.in
stack/monitor/status.cgi.in
+0
-0
No files found.
stack/monitor/buildout.cfg
View file @
d630e6b4
...
@@ -53,20 +53,28 @@ download-only = true
...
@@ -53,20 +53,28 @@ download-only = true
filename = monitor.py.in
filename = monitor.py.in
mode = 0644
mode = 0644
[
monitor-cgi
]
[
index
]
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
url = ${:_profile_base_location_}/${:filename}
download-only = true
download-only = true
#md5sum =
#md5sum =
filename =
monitor.cgi.in
filename =
index.html.jinja2
mode = 0644
mode = 0644
[
control
-cgi]
[
status
-cgi]
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
url = ${:_profile_base_location_}/${:filename}
download-only = true
download-only = true
#md5sum =
#md5sum =
filename = control.cgi.in
filename = status.cgi.in
mode = 0644
[settings-cgi]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
#md5sum =
filename = settings.cgi.in
mode = 0644
mode = 0644
[rss-bin]
[rss-bin]
...
...
stack/monitor/index.html.jinja2
0 → 100644
View file @
d630e6b4
<html>
<head>
<title>
Monitoring Interface
</title>
</head>
<body
style=
"padding:15px"
>
<ul>
<li><a
href=
"/{{ rss_filename }}"
target=
"cgi-frame"
>
RSS feed
</a></li>
<li><a
href=
"/{{ status_filename }}"
target=
"cgi-frame"
>
status
</a></li>
<li><a
href=
"/{{ settings_filename }}"
target=
"cgi-frame"
>
settings
</a></li>
</ul>
<iframe
name=
"cgi-frame"
style=
"width:80%;height:70%;margin-left:15%;position:absolute;top:10px;border-style:none;border-left-style:solid"
></iframe>
<body>
stack/monitor/make-rss.sh.in
View file @
d630e6b4
...
@@ -6,4 +6,4 @@ PYTHON=${buildout:directory}/bin/${extra-eggs:interpreter}
...
@@ -6,4 +6,4 @@ PYTHON=${buildout:directory}/bin/${extra-eggs:interpreter}
STATUS2RSS=${rss-bin:location}/${rss-bin:filename}
STATUS2RSS=${rss-bin:location}/${rss-bin:filename}
NAME=`basename $STATUS`
NAME=`basename $STATUS`
cat $STATUS/* | $PYTHON $STATUS2RSS "Monitoring RSS feed" "https://[$${slap-parameters:ipv6-random}]:$${cgi-httpd-configuration-file:listening-port}/$${deploy-monitor-cgi:filename}" > $RSS_FILE
cat $STATUS/* | $PYTHON $STATUS2RSS "Monitoring RSS feed" "https://[$${slap-parameters:ipv6-random}]:$${cgi-httpd-configuration-file:listening-port}/$${deploy-status-cgi:filename}" > $RSS_FILE
\ No newline at end of file
stack/monitor/monitor.cfg.in
View file @
d630e6b4
...
@@ -11,7 +11,8 @@ monitor-dir = $${directory:var}/monitor
...
@@ -11,7 +11,8 @@ monitor-dir = $${directory:var}/monitor
result-dir = $${:monitor-dir}/bool
result-dir = $${:monitor-dir}/bool
json-filename = monitor.json
json-filename = monitor.json
json-path = $${:monitor-dir}/$${:json-filename}
json-path = $${:monitor-dir}/$${:json-filename}
rss-path = $${directory:www}/index.html
rss-path = $${directory:www}/$${:rss-filename}
rss-filename = rssfeed.html
executable = $${directory:bin}/monitor.py
executable = $${directory:bin}/monitor.py
[directory]
[directory]
...
@@ -64,11 +65,22 @@ name = build-rss
...
@@ -64,11 +65,22 @@ name = build-rss
frequency = * * * * *
frequency = * * * * *
command = $${make-rss:output}
command = $${make-rss:output}
[deploy-
monitor-cgi
]
[deploy-
index
]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
template = ${
monitor-cgi:location}/${monitor-cgi
:filename}
template = ${
index:location}/${index
:filename}
rendered = $${directory:www}/$${:filename}
rendered = $${directory:www}/$${:filename}
filename = monitor.cgi
filename = index.html
mode = 0744
context =
key rss_filename monitor-parameters:rss-filename
key settings_filename deploy-settings-cgi:filename
key status_filename deploy-status-cgi:filename
[deploy-status-cgi]
recipe = slapos.recipe.template:jinja2
template = ${status-cgi:location}/${status-cgi:filename}
rendered = $${directory:www}/$${:filename}
filename = status.cgi
mode = 0744
mode = 0744
context =
context =
key json_file monitor-parameters:json-path
key json_file monitor-parameters:json-path
...
@@ -76,11 +88,11 @@ context =
...
@@ -76,11 +88,11 @@ context =
raw python_executable ${buildout:executable}
raw python_executable ${buildout:executable}
key this_filename :filename
key this_filename :filename
[deploy-
control
-cgi]
[deploy-
settings
-cgi]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
template = ${
control-cgi:location}/${control
-cgi:filename}
template = ${
settings-cgi:location}/${settings
-cgi:filename}
rendered = $${directory:www}/$${:filename}
rendered = $${directory:www}/$${:filename}
filename =
control
.cgi
filename =
settings
.cgi
mode = 0744
mode = 0744
context =
context =
raw config_cfg $${buildout:directory}/knowledge0.cfg
raw config_cfg $${buildout:directory}/knowledge0.cfg
...
@@ -215,5 +227,4 @@ wrapper-path = $${directory:bin}/cgi-httpd
...
@@ -215,5 +227,4 @@ wrapper-path = $${directory:bin}/cgi-httpd
[publish-connection-informations]
[publish-connection-informations]
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
monitor_url = https://[$${cgi-httpd-configuration-file:listening-ip}]:$${cgi-httpd-configuration-file:listening-port}/index.html
monitor_url = https://[$${cgi-httpd-configuration-file:listening-ip}]:$${cgi-httpd-configuration-file:listening-port}/index.html
control_url = https://[$${cgi-httpd-configuration-file:listening-ip}]:$${cgi-httpd-configuration-file:listening-port}/control.cgi
IMPORTANT_monitor_info = change the monitor_password as soon as possible ! Default is : $${public:monitor-password}
IMPORTANT_monitor_info = change the monitor_password as soon as possible ! Default is : $${public:monitor-password}
stack/monitor/
control
.cgi.in
→
stack/monitor/
settings
.cgi.in
View file @
d630e6b4
File moved
stack/monitor/
monitor
.cgi.in
→
stack/monitor/
status
.cgi.in
View file @
d630e6b4
File moved
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