0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 08:40:03 +01:00
posthog/unit.json
Frank Hamand 773e20d771
feat: Add prometheus metrics to nginx unit (#18387)
* Add prometheus metrics to nginx unit

* Run multiprocess prom collector in unit

* Refactor unit metrics to use prom client properly

* Ruff
2023-11-07 15:12:03 +00:00

58 lines
1.3 KiB
JSON

{
"listeners": {
"*:8000": {
"pass": "applications/posthog"
},
"*:8001": {
"pass": "routes/metrics"
},
"*:8081": {
"pass": "routes/status"
}
},
"routes": {
"metrics": [
{
"match": {
"uri": [
"/metrics"
]
},
"action": {
"pass": "applications/metrics"
}
},
],
"status": [
{
"match": {
"uri": [
"/status"
]
},
"action": {
"proxy": "http://unix:/var/run/control.unit.sock"
}
},
],
},
"applications": {
"posthog": {
"type": "python 3.10",
"processes": 1,
"working_directory": "/code",
"path": ".",
"module": "posthog.wsgi",
"user": "nobody"
},
"metrics": {
"type": "python 3.10",
"processes": 1,
"working_directory": "/code/bin",
"path": ".",
"module": "unit_metrics",
"user": "nobody"
},
}
}