Merge lp:~blake-rouse/maas/maas-prometheus into lp:~maas-committers/maas/trunk
Proposed by
Blake Rouse
Status: | Rejected |
---|---|
Rejected by: | MAAS Lander |
Proposed branch: | lp:~blake-rouse/maas/maas-prometheus |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
273 lines (+83/-14) 14 files modified
buildout.cfg (+1/-0) requirements.txt (+1/-0) src/maasserver/config.py (+16/-1) src/maasserver/djangosettings/development.py (+4/-1) src/maasserver/djangosettings/settings.py (+19/-0) src/maasserver/models/event.py (+2/-1) src/maasserver/models/node.py (+2/-1) src/maasserver/models/regioncontrollerprocess.py (+6/-3) src/maasserver/models/regioncontrollerprocessendpoint.py (+6/-3) src/maasserver/models/regionrackrpcconnection.py (+6/-3) src/maasserver/models/staticipaddress.py (+3/-1) src/maasserver/utils/prometheus.py (+14/-0) utilities/check-imports (+1/-0) versions.cfg (+2/-0) |
To merge this branch: | bzr merge lp:~blake-rouse/maas/maas-prometheus |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lee Trager (community) | Needs Information | ||
Mike Pontillo (community) | Needs Fixing | ||
Review via email: mp+322484@code.launchpad.net |
Commit message
Add the ability to enable basic prometheus metric collections.
Description of the change
This allow very basic prometheus metric collection. To enable this on an installed system you have to install django-prometheus, its not something we will require in packaging. It is included in the snap so enabling there is much easier.
Each working runs on the ports:
5260 - worker 1
5261 - worker 2
5262 - worker 3
5263 - worker 4
Only very basic metrics are collected at the moment, but we can expand on this easily to get more information on the load of MAAS and its internals.
To post a comment you must log in.
Unmerged revisions
- 5968. By Blake Rouse
-
Add the ability to enable prometheus metric collections.
This is really cool. I tested the branch (with Blake's help) by doing the following:
- sudo snap install prometheus localhost: 9090/ paste.ubuntu. com/24375943/ paste.ubuntu. com/24375947/ regiond. conf to add the following[2]: export: true export_ address: 192.168.0.2
- verified prometheus was running by hitting http://
- Installed the Prometheus Django plugin on the MAAS server
sudo apt install python3-pip
sudo pip3 install django-prometheus
- Changed the configuration of the snap to be like the following[1]:
http://
http://
- Changed /etc/maas/
prometheus_
prometheus_
The good news is, I begun seeing metrics on the Prometheus dashboard. The bad news is, we found a couple of issues:
- Due to what looks like a bug in the Prometheus Django plugin[3], a crash can occur which causes the dashboard not to appear.
- Observed an "OSError: [Errno 98] Address already in use" error while running database migrations. Probably need a way to prevent Prometheus from running except on the "real" region (i.e., not in a script, etc.).
---
[1]: Except that I was running the MAAS region on a different machine than prometheus, so used the following for target config, where 192.168.0.2 is the MAAS IP address:
- targets:
- 192.168.0.2:5260
- 192.168.0.2:5261
- 192.168.0.2:5262
- 192.168.0.2:5263
[2]: Blake and I agreed that these options should be renamed as follows:
prometheus: true listen_ address: 172.16.42.2
prometheus_
[3]: paste.ubuntu. com/24376097/
http://