@ -1,3 +1,8 @@
|
||||
## Version 1.8.0
|
||||
|
||||
- Prometheus exporter added. To enable metrics for the database you will have to update the database backend. see the [docs](https://nofusscomputing.com/projects/centurion_erp/administration/monitoring/#django-exporter-setup) for further information.
|
||||
|
||||
|
||||
## Version 1.5.0
|
||||
|
||||
- When v1.4.0 was release the migrations were not merged. As part of the work conducted on this release the v1.4 migrations have been squashed. This should not have any effect on any system that when they updated to v1.4, they ran the migrations and they **completed successfully**. Upgrading from <1.4.0 to this release should also have no difficulties as the migrations required still exist. There are less of them, however with more work per migration.
|
||||
|
@ -17,6 +17,8 @@ This documentation is targeted towards those whom administer the applications de
|
||||
|
||||
- [Installation](./installation.md)
|
||||
|
||||
- [Monitoring](./monitoring.md)
|
||||
|
||||
|
||||
## Ansible Automation Platform / AWX
|
||||
|
||||
|
51
docs/projects/centurion_erp/administration/monitoring.md
Normal file
51
docs/projects/centurion_erp/administration/monitoring.md
Normal file
@ -0,0 +1,51 @@
|
||||
---
|
||||
title: Monitoring
|
||||
description: Monitoring documentation for Centurion ERP by No Fuss Computing
|
||||
date: 2025-01-13
|
||||
template: project.html
|
||||
about: https://github.com/nofusscomputing/centurion_erp
|
||||
---
|
||||
|
||||
Monitoring a deployed application is paramount so as to ensure that it is functioning as intended. Without monitoring attempts to fault find an issue become very difficult. Especially when the application has a lot of moving parts. Centurion ERP is no exception.
|
||||
|
||||
|
||||
## Monitoring
|
||||
|
||||
To assist in monitoring Centurion ERP, the following features exist:
|
||||
|
||||
- Prometheus exporters
|
||||
|
||||
- logging _[see #436](https://github.com/nofusscomputing/centurion_erp/issues/436) for more details_
|
||||
|
||||
|
||||
## Prometheus Exporters
|
||||
|
||||
Currently we have exporters setup for the following components:
|
||||
|
||||
- Django
|
||||
|
||||
- Celery Worker, (Django)
|
||||
|
||||
- Celery Worker, (Celery)
|
||||
|
||||
- NGinX
|
||||
|
||||
|
||||
### Django Exporter Setup
|
||||
|
||||
The Django exporter provides metrics on the Django application and a small number of database details. To setup the Django exporter, the following settings are required:
|
||||
|
||||
``` py
|
||||
# Metrics default values
|
||||
METRICS_ENABLED = False # Enable Metrics
|
||||
METRICS_EXPORT_PORT = 8080 # Port to serve metrics on
|
||||
METRICS_MULTIPROC_DIR = '/tmp/prometheus' # path the metrics from multiple-process' save to
|
||||
|
||||
```
|
||||
|
||||
Enabling metrics is as simple as adding `METRICS_ENABLED = True` to your Centurion Config File and having prometheus scrape the endpoint. This setting activates the metrics endpoint for both Centurion API and the Centurion Worker. As such, the setting will need to be set in both containers.
|
||||
|
||||
!!! danger
|
||||
The prometheus endpoint is not secured. As such you are advised against exposing the port publically.
|
||||
|
||||
Monitoring of database transactions is possible, however does require that you undate your database backend. for instance, if your using postgres db, the normal backend would be `django.db.backends.postgresql_psycopg2`. This backend does not monitor the database, so it must be modified. this is done by using the prometheus backend `django_prometheus.db.backends.`. So the postgres backend will end up being `django_prometheus.db.backends.postgresql_psycopg2`. The prometheus backend "prefix" is the same for **ALL** backends.
|
@ -67,6 +67,8 @@ nav:
|
||||
|
||||
- projects/centurion_erp/administration/installation.md
|
||||
|
||||
- projects/centurion_erp/administration/monitoring.md
|
||||
|
||||
- Development:
|
||||
|
||||
- projects/centurion_erp/development/index.md
|
||||
|
Reference in New Issue
Block a user