You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/deployment-self-hosting/scaling-and-performance/monitoring.md
+23-22Lines changed: 23 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,12 @@ title: Monitoring
3
3
description: Setting up monitoring integrations like AppDynamics and StatsD.
4
4
---
5
5
6
-
Monitoring your Flagsmith instance is crucial for keeping things running smoothly, spotting issues early, and making sure your platform is performing as expected. Whether you're running a small self-hosted setup or a large-scale deployment, having the right monitoring tools in place will help you keep tabs on system health, performance, and usage.
6
+
Monitoring your Flagsmith instance is crucial for keeping things running smoothly, spotting issues early, and making
7
+
sure your platform is performing as expected. Whether you're running a small self-hosted setup or a large-scale
8
+
deployment, having the right monitoring tools in place will help you keep tabs on system health, performance, and usage.
7
9
8
-
This page covers how to integrate Flagsmith with popular monitoring solutions like AppDynamics and StatsD. We'll walk you through the setup steps and share some tips for getting the most out of your monitoring stack.
10
+
This page covers how to integrate Flagsmith with popular monitoring solutions like AppDynamics and StatsD. We'll walk
11
+
you through the setup steps and share some tips for getting the most out of your monitoring stack.
9
12
10
13
## AppDynamics
11
14
@@ -15,7 +18,8 @@ AppDynamics is an Enterprise only feature.
15
18
16
19
:::
17
20
18
-
The application supports the use of AppDynamics for monitoring purposes. In order to set up AppDynamics for your environment, follow the steps below:
21
+
The application supports the use of AppDynamics for monitoring purposes. In order to set up AppDynamics for your
22
+
environment, follow the steps below:
19
23
20
24
:::note
21
25
@@ -25,11 +29,14 @@ There is a bug in the AppDynamics wizard that sets the value `ssl = (on)` which
25
29
26
30
1. Set up your application in your AppDynamics dashboard using the "Getting Started Wizard - Python".
27
31
2. In the wizard, you will need to select the "uWSGI with Emperor: Module Directive" when choosing a deployment method.
28
-
3. On completing the wizard, you will be provided with a configuration file like the one seen here in the appdynamics.template.cfg provided, except with your application information. Make a copy of this information and place it in a file.
32
+
3. On completing the wizard, you will be provided with a configuration file like the one seen here in the
33
+
appdynamics.template.cfg provided, except with your application information. Make a copy of this information and
34
+
place it in a file.
29
35
30
36
### Running with Docker
31
37
32
-
When running with traditional Docker, you can use the code snippet below to inject the required information for running AppDynamics:
38
+
When running with traditional Docker, you can use the code snippet below to inject the required information for running
39
+
AppDynamics:
33
40
34
41
```shell
35
42
docker run -t \{image_name\} -v \{config_file_path\}:/etc/appdynamics.cfg -e APP_DYNAMICS=on
@@ -42,7 +49,8 @@ Replacing the values for:
42
49
43
50
### Running with Docker Compose
44
51
45
-
When running with the `docker-compose.yml` file provided, ensure the `APP_DYNAMICS` environment variable is set to `on` as seen below:
52
+
When running with the `docker-compose.yml` file provided, ensure the `APP_DYNAMICS` environment variable is set to `on`
53
+
as seen below:
46
54
47
55
```yaml
48
56
api:
@@ -71,24 +79,14 @@ docker-compose -f docker-compose.yml up
71
79
72
80
### Additional Settings
73
81
74
-
If you need additional AppDynamics setup options, you can find the other environment variables you can set [here](https://docs.appdynamics.com/display/PRO21/Python+Agent+Settings).
82
+
If you need additional AppDynamics setup options, you can find the other environment variables you can set
To enable the Prometheus `/metrics` endpoint, set the `PROMETHEUS_ENABLED` environment variable to `true`.
79
88
80
-
The metrics provided by Flagsmith are described below.
81
-
82
-
| Metric Name | Type | Description | Labels |
83
-
|-------------|------|-------------|--------|
84
-
|`flagsmith_build_info`| Gauge | Flagsmith version and build information |`ci_commit_sha`, `version`|
85
-
|`flagsmith_environment_document_cache_queries`| Counter | Results of cache retrieval for environment document. `result` label is either `hit` or `miss`|`result`|
|`flagsmith_task_processor_enqueued_tasks`| Counter | Total number of enqueued tasks |`task_identifier`|
90
-
|`flagsmith_task_processor_finished_tasks`| Counter | Total number of finished tasks. Only collected by Task Processor. `task_type` label is either `recurring` or `standard`|`task_identifier`, `task_type`, `result`|
91
-
|`flagsmith_task_processor_task_duration_seconds`| Histogram | Task processor task duration in seconds. Only collected by Task Processor. `task_type` label is either `recurring` or `standard`|`task_identifier`, `task_type`, `result`|
89
+
For the full list of metrics, see the [Metrics reference](/administration-and-security/platform-configuration/metrics).
92
90
93
91
## StatsD
94
92
@@ -100,14 +98,17 @@ There are a number of options for monitoring the task processor's health.
100
98
101
99
### Health Checks
102
100
103
-
A task processor container exposes `/health/readiness` and `/health/liveness` endpoints for readiness and liveness probes. The endpoints run simple availability checks. To include a test that enqueues a task and makes sure it's run to your readiness probe, set `ENABLE_TASK_PROCESSOR_HEALTH_CHECK` environment variable to `True`.
101
+
A task processor container exposes `/health/readiness` and `/health/liveness` endpoints for readiness and liveness
102
+
probes. The endpoints run simple availability checks. To include a test that enqueues a task and makes sure it's run to
103
+
your readiness probe, set `ENABLE_TASK_PROCESSOR_HEALTH_CHECK` environment variable to `True`.
104
104
105
105
### Task Statistics
106
106
107
-
Both API and task processor expose an endpoint which returns task processor statistics in JSON format. This endpoint is available at `GET /processor/monitoring`. See an example response below:
107
+
Both API and task processor expose an endpoint which returns task processor statistics in JSON format. This endpoint is
108
+
available at `GET /processor/monitoring`. See an example response below:
108
109
109
110
```json
110
111
{
111
-
"waiting": 1// The number of tasks waiting in the queue.
112
+
"waiting": 1// The number of tasks waiting in the queue.
0 commit comments