0.1.4 • Published 4 years ago
nuxt-prometheus-module v0.1.4
nuxt-prometheus-module
Use this module to expose metrics to another port (you need to use nuxt start or nuxt dev).
This repo was forked from https://gitlab.com/qonfucius/nuxt-prometheus-module.
Setup
- Add the
nuxt-prometheus-module
dependency withyarn
ornpm
to your project - Add
nuxt-prometheus-module
to themodules
section ofnuxt.config.js
- Configure it:
{
modules: [
// Simple usage
'nuxt-prometheus-module',
// With options
['nuxt-maps-module', { /* module options */ }]
]
}
Options
path
Default: /metrics
Path where metrics will be available
port
Default: 9100
Port where metrics will be available
host
Default: 127.0.0.1
Host to bind. Use 0.0.0.0
to be available everywhere, 127.0.0.1
mean "only available on the current host"
metrics
Enable/Disable some metrics
collectDefault
Default: true
Send default metrics about nodejs itself. Pass object to send options to Prometheus.collectDefaultMetrics
.
requestDuration
Default: true
Send request duration tile with routes.
Development
- Clone this repository
- Install dependencies using
yarn install
ornpm install
- Start development server using
npm run dev
License
0.1.4
4 years ago