nuxt-prometheus-module
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-moduledependency withyarnornpmto your project - Add
nuxt-prometheus-moduleto themodulessection 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 installornpm install - Start development server using
npm run dev
License
Related Packages
A Nuxt module for observability: debug server, health checks, and Prometheus met...
One utility function for module authors to define compiler constants for all bui...
Version History
| Version | Released | License |
|---|---|---|
| 0.1.4 | MIT |