mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-07 14:02:48 +00:00
fix: Add default configuration file for prometheus monitoring
This commit is contained in:
committed by
Jovan Krunić
parent
1596b6e3b8
commit
7ed2921efb
@@ -52,13 +52,12 @@ The middleware may be configured with JSON provided in `config/prometheus.json`,
|
||||
{
|
||||
"metricsPath": "/metrics",
|
||||
"collectDefaultMetrics": true,
|
||||
"requestDurationBuckets": [0.1, 0.5, 1, 2],
|
||||
"requestDurationBuckets": [0.1, 0.5, 1, 2, 5, 10, 20],
|
||||
"requestLengthBuckets": [512, 1024, 5120, 10240, 51200, 102400],
|
||||
"responseLengthBuckets": [512, 1024, 5120, 10240, 51200, 102400]
|
||||
}
|
||||
```
|
||||
|
||||
You can get a compatible grafana dashboard at [grafana.com](https://grafana.com/grafana/dashboards/14565).
|
||||
The available options are documented on [npmjs](https://www.npmjs.com/package/express-prometheus-middleware) or the [homepage](https://github.com/joao-fontenele/express-prometheus-middleware#readme) of the express-prometheus-middleware project. You may get a compatible grafana dashboard at [grafana.com](https://grafana.com/grafana/dashboards/14565).
|
||||
|
||||
## Start backend
|
||||
Run `npm install` and `npm run build`, then start with `npm start`. The server should now be accepting connections at `http://localhost:3000`.
|
||||
|
||||
7
config/prometheus.json
Normal file
7
config/prometheus.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"metricsPath": "/metrics",
|
||||
"collectDefaultMetrics": true,
|
||||
"requestDurationBuckets": [0.1, 0.5, 1, 2, 5, 10, 20],
|
||||
"requestLengthBuckets": [512, 1024, 5120, 10240, 51200, 102400],
|
||||
"responseLengthBuckets": [512, 1024, 5120, 10240, 51200, 102400]
|
||||
}
|
||||
Reference in New Issue
Block a user