https://github.com/vikash1596kumarkharwar/monitoring_using-prometheus-1
monitoring the node.js application using the promotheus
https://github.com/vikash1596kumarkharwar/monitoring_using-prometheus-1
docker docker-compose node promotheus tyepscript
Last synced: 2 months ago
JSON representation
monitoring the node.js application using the promotheus
- Host: GitHub
- URL: https://github.com/vikash1596kumarkharwar/monitoring_using-prometheus-1
- Owner: VIKASH1596KUMARKHARWAR
- Created: 2024-12-20T09:45:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-20T10:02:45.000Z (over 1 year ago)
- Last Synced: 2025-04-08T22:47:38.652Z (about 1 year ago)
- Topics: docker, docker-compose, node, promotheus, tyepscript
- Language: TypeScript
- Homepage:
- Size: 2.89 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Prometheus Overview
Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. Since its inception in 2012, Prometheus has become a standalone open-source project and maintained independently by the Prometheus community.
---
## Getting Started with Prometheus
### Running Prometheus in Docker
To run Prometheus in a Docker container, you can use either of the following methods:
### 1. Docker Run Command
```bash
docker run -p 9090:9090 -v ./prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus
```
---
```bash
docker-compose up
````
----
## Key Characteristics
1. **Single Machine Operation**:
- Prometheus is designed to run on a single machine.
- It is not distributed in nature, meaning it cannot be horizontally scaled across multiple machines.
- Prometheus operates on a single load process.
---
## Main Features
Prometheus offers robust monitoring and alerting features, including:
- **Multi-Dimensional Data Model**:
- Time series data is identified by metric name and key-value pairs.
- **PromQL**:
- A flexible query language designed to leverage the multi-dimensional data model.
- **Autonomous Nodes**:
- Prometheus servers do not rely on distributed storage; each server node operates independently.
- **Pull-Based Data Collection**:
- Time series collection is performed via a pull model over HTTP.
- **Push Support**:
- Time series data can also be pushed using an intermediary gateway.
- **Service Discovery**:
- Targets are discovered dynamically using service discovery or static configuration.
- **Graphing and Dashboarding**:
- Prometheus supports multiple modes for graphing and creating dashboards.
---
## Types of Metrics in Prometheus
### Counter
A counter is a cumulative metric that only increases. It is typically used to count events or conditions over time.
- **Example**: Counting the number of HTTP requests.
### Gauge
A gauge is a metric that can go up and down. It is often used to measure values that fluctuate.
- **Example**: Measuring the current memory usage or the current number of active users.
### Histogram
A histogram samples observations (usually things like request durations or response sizes) and counts them in configurable buckets. It also provides a sum of all observed values. It's a cummulative type.
- **Example**: Measuring the duration of HTTP requests.
---
## Limitations
- **No Horizontal Scaling**:
- Prometheus cannot run on multiple machines simultaneously for a single data load process.
---
## Resources
For more information, visit the [official Prometheus documentation](https://prometheus.io/docs/introduction/overview/).