Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jovanyaldair/prometheus-monitoring
https://github.com/jovanyaldair/prometheus-monitoring
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/jovanyaldair/prometheus-monitoring
- Owner: JovanyAldair
- Created: 2024-07-23T17:24:01.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-24T20:32:24.000Z (5 months ago)
- Last Synced: 2024-07-24T23:18:30.671Z (5 months ago)
- Language: Shell
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Monitoring VMs and Containers with Prometheus
## Introduction
This project consist in monitor 2 VMs using the stack Prometheus, Node Exporter, CAdvisor and Grafana.
## Archtecture
In this project there is:
* **monitor_server** the machine that will be installed the Prometheus, node_exporter and Grafana to monitor himself.
* **app_server** the machine that will be installed node_exporter, docker and CAdvisor to collect metrics and send to Prometheus on monitor_server machine.
## Usage
### Step 1 Setup the enviroment using the command
`vagrant up`
### Step 2 Download and Install Prometheus, Node_exporter and Grafana on Monitor_server
[Prometheus](https://www.cherryservers.com/blog/install-prometheus-ubuntu)
Access the Prometheus typing on browser:
`http://192.168.57.52:9090`
[Node_exporter](https://prometheus.io/docs/guides/node-exporter/)
Access the Node_exporter typing on browser:
`http://192.168.57.52:9100`
[Grafana](https://grafana.com/grafana/download?edition=oss)
Access the Grafana typing on browser:
`http://192.168.57.52:3000`
### Step 3 Download Node_exporter and CAdvisor on App_server
[CAdvisor](https://installati.one/install-cadvisor-ubuntu-20-04/)
Access the CAdvisor typing on browser:
`http://192.168.57.50:4194`
### Step 4 Edit the prometheus.yml and alert.rules files
Edit the prometheus.ylm file to get metrics, and alert.rules to send alrts about the state of the machines, like:
[Prometheus.yml file](https://pastebin.com/nuSVvFAV)
[Alert.rules file](https://pastebin.com/EphnGhc8)
Restart the prometheus.service using the command:
`sudo systemctl restart prometheus.service`
If you need, edit the prometheus.service and node_exporter.service, like:
[Prometheus.service](https://pastebin.com/ywHhhx0q)
[Node_exporter.service](https://pastebin.com/uZ9yxysW)
--------------------
Enjoyed ;)