Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
uphrh-sb-devops
Commits
602484b4
Commit
602484b4
authored
5 years ago
by
S M Y
Browse files
Options
Download
Patches
Plain Diff
monit additions for stateful
parent
a0ae4353
sunbird-monitoring-release-2.2.0
sunbird-monitoring-release-2.2.0_aa4568b
sunbird-monitoring-release-2.1.0
sunbird-monitoring-release-2.1.0_RC1
monitoring-fixes
loadtest
fixed-monitoring
before-categorisation
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
ansible/inventory/env/group_vars/all.yml
+8
-0
ansible/inventory/env/group_vars/all.yml
ansible/monitoring.yml
+11
-0
ansible/monitoring.yml
ansible/roles/monit/tasks/main.yml
+0
-7
ansible/roles/monit/tasks/main.yml
ansible/roles/monit/templates/check_alertmanager
+1
-1
ansible/roles/monit/templates/check_alertmanager
ansible/roles/monit/templates/check_prometheus
+1
-1
ansible/roles/monit/templates/check_prometheus
with
21 additions
and
9 deletions
+21
-9
ansible/inventory/env/group_vars/all.yml
+
8
−
0
View file @
602484b4
...
...
@@ -589,3 +589,11 @@ sunbird_portal_offline_tenant: ""
sunbird_portal_offline_supported_languages
:
"
English,
Hindi,
Tamil,
Bengali"
sunbird_portal_offline_app_release_date
:
"
"
sunbird_portal_offline_app_version
:
"
0.0.1"
### Monitoring vars ###
prometheus_port_for_swarm
:
9090
alertmanager_port_for_swarm
:
9093
prometheus_port_for_stateful
:
19090
alertmanager_port_for_stateful
:
19093
This diff is collapsed.
Click to expand it.
ansible/monitoring.yml
+
11
−
0
View file @
602484b4
...
...
@@ -116,6 +116,11 @@
-
hosts
:
swarm-bootstrap-manager
gather_facts
:
false
become
:
yes
vars
:
-
alertmanager_host
:
"
{{
groups['swarm-agent-for-alertmanager'][0]
}}"
-
prometheus_host
:
"
{{
group['swarm-agent-for-prometheus'][0]
}}"
-
prometheus_port
:
"
{{
prometheus_port_for_swarm
}}"
-
alertmanager_port
:
"
{{
alertmanager_port_for_swarm
}}"
vars_files
:
-
[
'
{{inventory_dir}}/secrets.yml'
,
'
secrets/{{env}}.yml'
]
roles
:
...
...
@@ -151,10 +156,16 @@
hosts
:
swarm-dashboard
gather_facts
:
false
become
:
yes
vars
:
-
alertmanager_host
:
"
{{
groups['swarm-dashboard'][0]
}}"
-
prometheus_host
:
"
{{
groups['swarm-dashboard'][0]
}}"
-
prometheus_port
:
"
{{
prometheus_port_for_stateful
}}"
-
alertmanager_port
:
"
{{
alertmanager_port_for_stateful
}}"
vars_files
:
-
[
'
{{inventory_dir}}/secrets.yml'
,
'
secrets/{{env}}.yml'
]
roles
:
-
stack-monitor-stateful
-
{
role
:
'
monit'
,
monit_checks
:
[
'
alertmanager'
,
'
prometheus'
]}
tags
:
-
stack-monitor-stateful
...
...
This diff is collapsed.
Click to expand it.
ansible/roles/monit/tasks/main.yml
+
0
−
7
View file @
602484b4
---
-
debug
:
msg="{{ groups['swarm-agent-for-alertmanager'][0] }}"
-
debug
:
msg="{{ groups['swarm-agent-for-prometheus'][0] }}"
-
debug
:
msg="{{ alertmanager_host }}"
...
...
This diff is collapsed.
Click to expand it.
ansible/roles/monit/templates/check_alertmanager
+
1
−
1
View file @
602484b4
# Monit by default makes HTTP HEAD request. Having content in the check will force HTTP GET
# Alert by mail is sent by default. Exec will additionally send slack alert
check host alertmanager with address {{
groups['swarm-agent-for-
alertmanager
'][0]
}}
check host alertmanager with address {{ alertmanager
_host
}}
if failed
port {{ alertmanager_port }} protocol http
request /alertmanager/
...
...
This diff is collapsed.
Click to expand it.
ansible/roles/monit/templates/check_prometheus
+
1
−
1
View file @
602484b4
# Monit by default makes HTTP HEAD request. Having content in the check will force HTTP GET
# Alert by mail is sent by default. Exec will additionally send slack alert
check host prometheus with address {{
groups['swarm-agent-for-
prometheus
'][0]
}}
check host prometheus with address {{ prometheus
_host
}}
if failed
port {{ prometheus_port }} protocol http
request /prometheus/graph
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets