Node.js Monitoring with Prometheus+Grafana

Jack Yeh
TeamZeroLabs
Published in
5 min readDec 14, 2019

--

Is this you?

  • Running Node.JS express applications in staging/production
  • Not sure on how many times api routes are called
  • Not sure on how fast api routes responds to the user
  • Interested in self-hosted monitoring solution
Wow. That’s a lot of 304s

Less articles. More git clones.

Well, here is the finished sample code repo if you’d like to see it in action:

  • https://github.com/teamzerolabs/express-monitoring
  • yarn start to have the server and metrics exporter up and running.
  • Continue if you want to know how metrics are wired up into prometheus and grafana
  • Need help setting things up and give recommendations? Contact us at info@teamzerolabs.com

Hello world

In this article, we will be monitoring this short express app.

If you can setup metrics for this app, you will be ready for any other express monitoring.

Start by cloning the repo, and run yarn dev . Once the server is up and running, try hitting the api in the browser/postman/curl a couple of times. Next, we will learn about prometheus and…

--

--

Jack Yeh
TeamZeroLabs

I monitor your full stack deployment in production, so you can sleep at night. Docker | Kubernetes | AWS | Prometheus | Grafana