Miscellaneous projects related to DevOps
- Create a local monitioring and alerting environment
- Components: Prometheus(monitoring), grafana(visualization), alertmanager(alerting)
- Test "inhibit rules" to suppress child alerts. Eg: if CPU_utilization > 90% then CPU_utilization > 70% should not fire
- Install the following on your local system
- docker
- docker-compose
-
mkdir monitoring_project && cd monitoring_project
-
git clone https://github.com/Oartihsin/Devops.git
Changes to be made. File: alertmanager/alertmanager.yml
- lines 3,4 -> add sender's email (Try using gmail.com emails)
- line 5 -> sender's password
- line 30 -> receiver's email (Try using gmail.com emails)
-
run "docker-compose up -d"
-
Important urls :
- prometheus : http://localhost:9000
- grafana : http://localhost:3000
- alertmanager : http://localhost:9093
- "docker ps" -> copy the container-id for node exporter
- "docker exec -it sh" -> to get the shell for node exporter container
- "dd if=/dev/zero of=/dev/null" -> manual convert and copy files
- Take a new terminal tab
- "docker stats" -> to check CPU utilization of all containers (check node-exporter)
-
You should receive mails for 2 alerts only
- InstanceDownCritical
- HostHighCpuLoad (this is for >90%)
-
Alerts ignored
- HostHighCpuLoad (this is for >70%)