Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review 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
RadioObservatory
LOFAR
Commits
5347ac6e
Commit
5347ac6e
authored
7 months ago
by
Jan David Mol
Browse files
Options
Downloads
Plain Diff
Merge branch '
TMSS-3106
-metrics-from-multiple-instances' into 'master'
Serve prometheus metrics on dedicated port per worker Closes
TMSS-3106
See merge request
!1456
parents
18d21b99
38fb61b2
No related branches found
No related tags found
1 merge request
!1456
Serve prometheus metrics on dedicated port per worker
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SAS/TMSS/backend/src/tmss/settings.py
+4
-0
4 additions, 0 deletions
SAS/TMSS/backend/src/tmss/settings.py
SAS/TMSS/deploy/tmss/docker-compose.yml
+2
-0
2 additions, 0 deletions
SAS/TMSS/deploy/tmss/docker-compose.yml
with
6 additions
and
0 deletions
SAS/TMSS/backend/src/tmss/settings.py
+
4
−
0
View file @
5347ac6e
...
...
@@ -80,6 +80,10 @@ DEBUG = strtobool(os.getenv('DEBUG', 'True'))
ALLOWED_HOSTS
=
os
.
getenv
(
'
ALLOWED_HOSTS
'
).
split
(
'
,
'
)
if
os
.
getenv
(
'
ALLOWED_HOSTS
'
)
else
[]
# Django-prometheus endpoints, of which one per worker will be spawned
PROMETHEUS_METRICS_EXPORT_PORT_RANGE
=
range
(
9001
,
9061
)
PROMETHEUS_METRICS_EXPORT_ADDRESS
=
''
# all addresses
# Application definition
INSTALLED_APPS
=
[
...
...
This diff is collapsed.
Click to expand it.
SAS/TMSS/deploy/tmss/docker-compose.yml
+
2
−
0
View file @
5347ac6e
...
...
@@ -36,9 +36,11 @@ services:
-
USER=lofarsys
-
HOME=/localhome/lofarsys
# from https://docs.gunicorn.org/en/stable/run.html, number of worker processes should generally be between 2-4 workers per core in the server
# NB: do not enable --preload, as it will cause a clash in port allocation for the prometheus metrics
command
:
/bin/bash -c 'source /opt/lofar/lofarinit.sh; gunicorn lofar.sas.tmss.tmss.wsgi --worker-class=gevent --workers=60 --timeout 120 --bind=0.0.0.0:8001'
ports
:
-
8001:8001
-
9001-9061:9001-9061
# django-prometheus endpoint per worker
depends_on
:
db_migrate
:
condition
:
service_completed_successfully
...
...
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