Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uptime
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
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
Ansible
Roles
uptime
Commits
70953e89
Commit
70953e89
authored
8 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Allow usage as a monitor only
parent
3217f98a
Branches
main
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
defaults/main.yml
+2
-1
2 additions, 1 deletion
defaults/main.yml
meta/main.yml
+1
-1
1 addition, 1 deletion
meta/main.yml
tasks/main.yml
+18
-30
18 additions, 30 deletions
tasks/main.yml
templates/production.yaml
+8
-8
8 additions, 8 deletions
templates/production.yaml
with
29 additions
and
40 deletions
defaults/main.yml
+
2
−
1
View file @
70953e89
uptime_url
:
'
http://localhost:8082'
uptime_mode
:
'
main'
uptime_domain
:
'
localhost:8082'
uptime_username
:
'
uptime'
uptime_password
:
'
j^A8@IU#eoxo#P6i'
...
...
This diff is collapsed.
Click to expand it.
meta/main.yml
+
1
−
1
View file @
70953e89
...
...
@@ -2,5 +2,5 @@
dependencies
:
-
{
role
:
common
}
-
{
role
:
mongodb
}
-
{
role
:
mongodb
,
when
:
uptime_mode == 'main'
}
-
{
role
:
nodejs
}
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
18
−
30
View file @
70953e89
# Original code:
# https://github.com/fzaninotto/uptime
---
# file: roles/uptime/tasks/main.yml
...
...
@@ -12,40 +9,41 @@
-
name
:
"
Ensure
uptime
user"
mongodb_user
:
database
=
uptime
login_database
=
admin
login_user
=
root
login_password
=
root
name
=
root
password
=
root
database
:
'
uptime
'
login_database
:
'
admin
'
login_user
:
'
root
'
login_password
:
'
root
'
name
:
'
root
'
password
:
'
root
'
ignore_errors
:
yes
when
:
uptime_mode == 'main'
-
name
:
"
Ensure
directory"
file
:
path
=
'/var/www'
state
=
directory
mode
=
0755
path
:
'
/var/www'
state
:
'
directory
'
mode
:
'
0755
'
-
name
:
"
Checkout
latest
version
of
Uptime"
git
:
repo
=
'https://gitlab.paragon-es.de/tools/uptime.git'
dest
=
'/var/www/uptime'
repo
:
'
https://gitlab.paragon-es.de/tools/uptime.git'
dest
:
'
/var/www/uptime'
notify
:
-
"
Restart
Uptime"
-
name
:
"
Install
node
components"
npm
:
path
=
'/var/www/uptime'
path
:
'
/var/www/uptime'
notify
:
-
"
Restart
Uptime"
-
name
:
"
Configure
uptime"
template
:
src
=
'production.yaml'
dest
=
'/var/www/uptime/config/production.yaml'
owner
=
root
group
=
root
mode
=
644
src
:
'
production.yaml'
dest
:
'
/var/www/uptime/config/production.yaml'
owner
:
root
group
:
root
mode
:
644
notify
:
-
"
Restart
Uptime"
...
...
@@ -62,14 +60,4 @@
notify
:
-
"
Restart
Uptime"
# Config Uptime
# edit config/default.yml
# Start uptime
# node app
# Production Environment
# NODE_ENV=production node app
# http://localhost:8082/
when
:
'
"uptime"
not
in
excluded_roles'
This diff is collapsed.
Click to expand it.
templates/production.yaml
+
8
−
8
View file @
70953e89
url
:
'
{{
uptime_
url
}}'
url
:
'
https://
{{
uptime_
domain
}}'
mongodb
:
server
:
localhost
...
...
@@ -7,16 +7,16 @@ mongodb:
password
:
root
monitor
:
name
:
origin
apiUrl
:
'
{{
uptime_
url
}}/api'
name
:
{{
inventory_hostname
}}
apiUrl
:
'
https://
{{
uptime_
domain
}}/api'
pollingInterval
:
10000
timeout
:
5000
userAgent
:
Node
Uptime
/3.0
(https://git
hub.com/fzaninotto
/uptime)
userAgent
:
Uptime (https://git
lab.paragon-es.de/tools
/uptime)
ssl
:
enabled
:
true
certificate
:
'
/etc/letsencrypt/live/{{
default
_domain
}}/fullchain.pem'
key
:
'
/etc/letsencrypt/live/{{
default
_domain
}}/privkey.pem'
certificate
:
'
/etc/letsencrypt/live/{{
uptime
_domain
}}/fullchain.pem'
key
:
'
/etc/letsencrypt/live/{{
uptime
_domain
}}/privkey.pem'
selfSigned
:
false
plugins
:
...
...
@@ -40,7 +40,7 @@ pushover:
hipchat
:
roomId
:
{{
uptime_hipchat_roomid
}}
token
:
{{
uptime_hipchat_token
}}
uptimeDashboardURL
:
{{
uptime_
url
}}
uptimeDashboardURL
:
'
https://
{{
uptime_
domain
}}
'
event
:
up
:
true
down
:
true
...
...
@@ -51,7 +51,7 @@ mattermost:
hook
:
{{
uptime_mattermost_hook
}}
username
:
Uptime
gitlab
:
True
uptimeDashboardURL
:
{{
uptime_
url
}}
uptimeDashboardURL
:
'
https://
{{
uptime_
domain
}}
'
event
:
up
:
true
down
:
true
...
...
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