The artifacts in this repository contain unreleased changes.
If you are looking at deploying from a stable release, please follow the instructions at Quick Start Guide
If this is your first time to Kubernetes, please go through these introductory tutorials:
- https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615
- https://kubernetes.io/docs/tutorials/kubernetes-basics/
kubectl apply -f openebs-operator.yaml
Use this step if you don't already have monitoring services installed on your k8s cluster.
kubectl apply -f openebs-monitoring-pg.yaml
You can also obtain Kubernetes resource metrics via the following step:
kubectl apply -f openebs-kube-state-metrics.yaml
This folder also contains a set of dashboards that can be imported into your grafana:
- OpenEBS Persistent Volume Dashboard
- OpenEBS Storage Pool Dashboard
- Node Exporter Dashboard
- Kubernetes cAdvisor Dashboard(metrics segregated by node)
- Kubernetes App Metrics Dashboard(metrics segregated by namespace)
It is assumed that you have prometheus operator already deployed and working fine. If not done already follow instructions to do it here.
While deploying above chart make sure the values of specified field are as follows:
serviceMonitorSelectorNilUsesHelmValues: false
serviceMonitorSelector: {}
serviceMonitorNamespaceSelector: {}
This makes sure that all the ServiceMonitor
objects from all namespaces we create further will be selected.
Now to monitor openebs related resources create following ServiceMonitor
object in openebs
namespace. See openebs-servicemonitor.yaml file.
kubectl -n openebs apply -f openebs-servicemonitor.yaml
Find docs here to read about other fields in ServiceMonitor
object.
Now once this config is picked up by prometheus operator it will start scraping the metrics and you can start seeing them in prometheus dashboard. The metrics relevant to openebs are conveniently prefixed with openebs*
or latest_openebs*
.
If you would like to receive alerts for specific Node, Kubernetes & OpenEBS conditions, setup the alert-manager:
kubectl apply -f openebs-alertmanager.yaml
NOTE: The alert rules are currently placed into the prometheus configmag in openebs-monitoring-pg.yaml.
Use the following step (requires setup of helm client & tiller server on the server) to setup grafana loki stack on the cluster. On the grafana console, select loki
as
the datasource and provide the appropriate URL (typically http://loki:3100) to visualize logs.
helm repo add loki https://grafana.github.io/loki/charts
helm repo update
helm upgrade --install loki --namespace=openebs loki/loki-stack
NOTE: A sample template specification of the components in the loki stack can be found here obtained as part of helm --debug --dry-run
command.