Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
network
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible-shared
network
Commits
a7dcb35b
Commit
a7dcb35b
authored
7 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Add weathermap html page with auto refresh
parent
c957eda7
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
mrtg/files/weathermap.html
+11
-0
11 additions, 0 deletions
mrtg/files/weathermap.html
mrtg/tasks/main.yml
+1
-1
1 addition, 1 deletion
mrtg/tasks/main.yml
mrtg/tasks/weathermap.yml
+9
-0
9 additions, 0 deletions
mrtg/tasks/weathermap.yml
with
21 additions
and
1 deletion
mrtg/files/weathermap.html
0 → 100644
+
11
−
0
View file @
a7dcb35b
<!doctype html>
<html>
<head>
<title>
Weathermap
</title>
<meta
http-equiv=
"refresh"
content=
"300"
/>
<meta
charset=
"utf-8"
/>
</head>
<body>
<img
src=
"weathermap.png"
>
</body>
</html>
This diff is collapsed.
Click to expand it.
mrtg/tasks/main.yml
+
1
−
1
View file @
a7dcb35b
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
tags
:
mrtg
tags
:
mrtg
-
name
:
create an index HTML page
-
name
:
create an index HTML page
command
:
"
indexmaker
--output
/var/www/mrtg/index.html
--title='Traffic
of
{{domain}}'
--columns=3
--pagetop='{%
for
switch
in
mrtg_switches
%}<a
href=
\"
index-{{switch['router']}}.html
\"
><b>{{switch['router']}}</b>.{{domain}}</a>
{%
endfor
%}
{%
if
use_weathermap
%}<a
href=
\"
weathermap.
png
\"
>Weathermap</a>{%endif
%}'
/etc/mrtg.cfg"
command
:
"
indexmaker
--output
/var/www/mrtg/index.html
--title='Traffic
of
{{domain}}'
--columns=3
--pagetop='{%
for
switch
in
mrtg_switches
%}<a
href=
\"
index-{{switch['router']}}.html
\"
><b>{{switch['router']}}</b>.{{domain}}</a>
{%
endfor
%}
{%
if
use_weathermap
%}<a
href=
\"
weathermap.
html
\"
>Weathermap</a>{%endif
%}'
/etc/mrtg.cfg"
become
:
yes
become
:
yes
become_user
:
mrtg
become_user
:
mrtg
tags
:
mrtg
tags
:
mrtg
...
...
This diff is collapsed.
Click to expand it.
mrtg/tasks/weathermap.yml
+
9
−
0
View file @
a7dcb35b
...
@@ -61,6 +61,15 @@
...
@@ -61,6 +61,15 @@
script
:
"
makeweather.py
{{weathermap_placement_strategy}}
--colorscale
/root/colorscale.pal"
script
:
"
makeweather.py
{{weathermap_placement_strategy}}
--colorscale
/root/colorscale.pal"
tags
:
weathermap
tags
:
weathermap
-
name
:
upload the weathermap html file
copy
:
src
:
weathermap.html
dest
:
/var/www/mrtg/
owner
:
mrtg
group
:
www-data
mode
:
0644
tags
:
weathermap
-
name
:
create the weathermap regularly
-
name
:
create the weathermap regularly
cron
:
cron
:
name
:
"
create
weathermap"
name
:
"
create
weathermap"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment