Skip to content
Snippets Groups Projects
Commit 9459af8f authored by suraksha.shetty's avatar suraksha.shetty
Browse files

Update file README.md

parents
Branches
No related tags found
No related merge requests found
README.md 0 → 100644
Infrastructure Monitoring
Architecture
Prerequisites
Create a gke cluster
Steps
Step 1
Clone repo
This repository contains deployment files for prometheus, alertmanager and grafana
Step 2
Run script
Step 3
Provide username and password of gitlab
Step 4
Creating cluster roles…
Step 5
Setting up Prometheus, Kube State Metrics, Alertmanager, Grafana, Node Exporter
Prometheus
Prometheus rules contains all the alert rules for sending alerts to the Alertmanager.
We have the following scrape jobs in our Prometheus scrape configuration.
kubernetes-apiservers: It gets all the metrics from the API servers.
kubernetes-nodes: It collects all the kubernetes node metrics.
kubernetes-pods: All the pod metrics get discovered if the pod metadata is annotated with prometheus.io/scrape and prometheus.io/port annotations.
kubernetes-cadvisor: Collects all cAdvisor metrics.
kubernetes-service-endpoints: All the Service endpoints are scrapped if the service metadata is annotated with prometheus.io/scrape and prometheus.io/port annotations. It can be used for black-box monitoring.
Kube State Metrics
Kube state metrics service will provide many metrics which is not available by default. Please make sure you deploy Kube state metrics to monitor all your kubernetes API objects like deployments, pods, jobs, cronjobs etc.
Alertmanager
Alertmanager handles all the alerting mechanisms for Prometheus metrics. There are many integrations available to receive alerts from the Alertmanager (Slack, email, API endpoints, etc)
Grafana
Using Grafana you can create dashboards from Prometheus metrics to monitor the kubernetes cluster.
Node Exporter
Node Exporter will provide all the Linux system-level metrics of all Kubernetes nodes.
The scrape config for node-exporter is part of the Prometheus config map. Once you deploy the node-exporter, you should see node-exporter targets and metrics in Prometheus.
Step 6
Retrieving urls
Step 7
Access dashboard
Prometheus dashboard
Now check prometheus configurations are up in dashboard, which defined in prometheus.yml
Prometheus rules
Check alerts
Node exporter
Grafana
Provide username and password
Username - admin
Password - admin
Alertmanager
Step 8
Creating datasource by logging in to grafana
Step 9
Run script to import json file to create dashboard
This will executing next part of script automatically which will import json file to create dashboard
Step 10
Import dashboard json files and create dashboard using datasource created
Step 11
Alert
In case of any disaster depending on condition provide you will get notification through mail or slack
Email Alert
Slack alert
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment