prometheus-nodejs-tutorial

APACHE-2.0 License

Stars
6
Committers
1

Using prom-client library in Node.js

Lab 1

Emit the default metrics lab1

Lab 2

Emit garbage collection metrics lab2

Lab 3

Emit http server metrics lab3

Lab 4

Push metrics to Prometheus push gateway lab4

Metrics are not available via scrape endpoint /metrics on the Node.js web server.

This use case is useful when the container has a very short life span (ie Serverless/Knative) and the scrape time window is to large to get metrics from the container.

Lab 5

Combined all examples lab5

Putting all the examples together, collects all metrics, sends to push gateway and available via scrape endpoint on the Node.js web server

Lab 6

Using the prom-client express middleware wrapper express-prom-bundle