File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,11 @@ a nice system to aggregate them using the env variable: `prometheus_multiproc_di
84
84
which will configure the directory where metrics will be stored as files per process.
85
85
86
86
Configuration in uwsgi would look like:
87
- ```
87
+
88
+ ``` ini
88
89
env = prometheus_multiproc_dir =/path/to/django_metrics
89
90
```
91
+
90
92
You can also set this environment variable elsewhere such as in a kubernetes manifest.
91
93
Note that the environment variable is lower_case.
92
94
@@ -97,6 +99,7 @@ created, it's possible to create file using worker ids rather than pids.
97
99
98
100
You can change the function used for identifying the process to use the uwsgi worker_id.
99
101
Modify this in settings before any metrics are created:
102
+
100
103
``` python
101
104
try :
102
105
import prometheus_client
106
109
except ImportError :
107
110
pass # not running in uwsgi
108
111
```
112
+
109
113
Note that this code uses internal interfaces of prometheus_client.
110
114
The underlying implementation may change.
111
115
Original file line number Diff line number Diff line change @@ -9,10 +9,12 @@ To run a demo Prometheus, you'll need to follow these steps:
9
9
instructions] ( http://prometheus.io/docs/introduction/install/ ) .
10
10
Let's assume you cloned it to ` ~/prometheus ` .
11
11
* Run prometheus like this:
12
+
12
13
``` shell
13
14
~ /prometheus/prometheus \
14
15
--config.file=prometheus.yml \
15
16
--web.console.templates consoles/ \
16
17
--web.console.libraries ~ /prometheus/console_libraries/
17
18
```
18
- * Navigate to [ http://localhost:9090 ] .
19
+
20
+ * Navigate to ` http://localhost:9090 ` .
You can’t perform that action at this time.
0 commit comments