Overview
The repository includes a Node.js server built using Express.js, which handles HTTP requests. The server is integrated with Prometheus for collecting metrics and Grafana for visualizing these metrics. Additionally, Winston logger is used to log messages to a Loki instance.
Features
Node.js Server: The server is built using Express.js and handles HTTP requests.
Prometheus Integration: Prometheus is used to collect metrics from the server, including request-response times and total requests.
Grafana Integration: Grafana is used to visualize the metrics collected by Prometheus.
Logging: Winston logger is used to log messages to a Loki instance.
Getting Started
To set up the server, follow these steps:
Clone the Repository: https://github.com/AkashBhadana/Nodeserver-Prometheus-Grafana.git
Install Dependencies: npm install
Start & Acess the Server: http://localhost:8000
Access Prometheus: http://localhost:9090
5. Access Grafana: http://localhost:3000
Metrics
Request-Response Time: The histogram
http_express_req_res_time
tracks the time taken by the server to respond to requests.Total Requests: The counter
total_req
counts the total number of requests made to the server.
Logging
Winston Logger: Winston logger is used to log messages to a Loki instance.
Loki Transport: The Loki transport is used to send logs to a Loki instance.