Skip to content
Grafana-plugin for k8s' monitoring
TypeScript HTML JavaScript CSS Dockerfile
Branch: master
Clone or download

Latest commit

SergeiSporyshev Merge pull request #27 from filip-havlicek/bugfix/pod-dashboard-conta…
…iners-statuses-datasource

fix datasource for containers statuses in pod dashboard
Latest commit 6617875 Feb 14, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist fix datasource for containers statuses in pod dashboard Feb 13, 2020
kubernetes feature/204 Error parsing from events Jan 22, 2020
prometheus Recommended prometheus configuration [issue #16] Dec 3, 2019
scripts initial commit Aug 14, 2019
src fix datasource for containers statuses in pod dashboard Feb 13, 2020
.dockerignore initial commit Aug 14, 2019
.gitignore initial commit Aug 14, 2019
CHANGELOG.md changelog Feb 12, 2020
Dockerfile initial commit Aug 14, 2019
Gruntfile.js changelog Nov 18, 2019
LICENSE initial commit Aug 14, 2019
README.md add project site link Dec 2, 2019
package.json webpack Jan 28, 2020
tsconfig.json webpack Jan 28, 2020
tslint.json initial commit Aug 14, 2019
webpack.config.js webpack Jan 28, 2020

README.md

DevOpsProdigy KubeGraf

Slack Url Telegram Url Change Log Project Site

Kubernetes plugin for Grafana

An updated version of the Grafana App for Kubernetes plugin (https://grafana.com/plugins/grafana-kubernetes-app), this plugin allows you to visualize and analyze your Kubernetes cluster’s performance. It demonstrates in graphics the main service metrics and characteristics of the Kubernetes cluster. It also makes it easier to examine the application’s life cycle and error logs.

Requirements

  1. Grafana > 5.0.0
  2. Prometheus + node-exporter + kube-state-metrics
  3. Grafana-piechart-panel

Features

The plugin consists of three main info pages with detailed information about the Kubernetes cluster.

Applications overview

  • Logic map of applications;
  • Distribution of Kubernetes entities;
  • List of pod entities with life metrics;
  • Visual presentation of the application’s life cycle and its basic characteristics;
  • Description of the ports that allow access services in the cluster.

Pic. 1: Applications overview

Cluster status

  • Summary about the status of the cluster and the nodes within it;
  • Details of monitoring the application’s life cycle;
  • Visual presentation of where the services in the cluster servers are located.

Pic. 2: Cluster status

Nodes overview

  • Summary of cluster’s nodes;
  • Information about used and allocated resources (RAM, CPU utilization) and the number of pods;
  • Physical distribution of pods.

Pic. 3: Nodes overview

Dashboards

Besides providing general information on the main pages, the plugin allows you to track a cluster’s performance in graphs, which are located on five dashboards.

  • node dashboard

This is a dashboard with node metrics. It displays the employment of resources like CPU utilization, memory consumption, percentage of CPU time in idle / iowait modes, and disk and network status.

Pic. 4: Node dashboard

  • pod resources

Displays how much of the resources the selected pod has used.

Pic. 5: Pod resources

  • deployment dashboard

Pic. 6: Deployment dashboard

Pic. 7: Deployment dashboard

  • statefulsets dashboard
  • daemonsets dashboard

The above three dashboards show the number of available / unavailable application replicas and the status of containers in the pods of these applications, and trace containers’ restarts.

Installation

  1. Go to the plugins directory in Grafana:

    cd $GRAFANA_PATH/data/plugins

  2. Copy the repository:

    git clone https://github.com/devopsprodigy/kubegraf /var/lib/grafana/plugins and restart grafana-server

    or

    grafana-cli plugins install devopsprodigy-kubegraf-app and restart grafana-server.

  3. Apply Kubernetes manifests from kubernetes/ directory to give required permissions to the user grafana-kubegraf:

    kubectl apply -f https://raw.githubusercontent.com/devopsprodigy/kubegraf/master/kubernetes/serviceaccount.yaml
    kubectl apply -f https://raw.githubusercontent.com/devopsprodigy/kubegraf/master/kubernetes/clusterrole.yaml
    kubectl apply -f https://raw.githubusercontent.com/devopsprodigy/kubegraf/master/kubernetes/clusterrolebinding.yaml
    kubectl apply -f https://raw.githubusercontent.com/devopsprodigy/kubegraf/master/kubernetes/secret.yaml
    
  4. Create a grafana-kubegraf user private key and certificate on one of the master nodes:

    openssl genrsa -out ~/grafana-kubegraf.key 2048
    openssl req -new -key ~/grafana-kubegraf.key -out ~/grafana-kubegraf.csr -subj "/CN=grafana-kubegraf/O=monitoring"
    openssl x509 -req -in ~/grafana-kubegraf.csr -CA /etc/kubernetes/pki/ca.crt -CAkey /etc/kubernetes/pki/ca.key -out /etc/kubernetes/pki/grafana-kubegraf.crt -CAcreateserial
    

    Copy /etc/kubernetes/pki/grafana-kubegraf.crt to all other master nodes.

    or

    Get the token

    kubectl get secret grafana-kubegraf-secret -o jsonpath={.data.token} | base64 -d
    
  5. Go to /configuration-plugins in Grafana and click on the plugin. Then click “enable”.

  6. Go to the plugin and select “create cluster”.

  7. Enter the settings of http-access to the Kubernetes api server:

    • Kubernetes master's url from kubectl cluster-info
    • Enter the certificate and key from step #4 "TLS Client Auth" section Or The token from step #4 in "Bearer token access" section
  8. Open the “additional datasources” drop-down list and select the prometheus that is used in this cluster.

You can’t perform that action at this time.