Giter VIP home page Giter VIP logo

heapster's Introduction

Heapster

Heapster enables monitoring of Clusters using cAdvisor.

Heapster supports Kubernetes natively and collects resource usage of all the Pods running in the cluster. It was built to showcase the power of core Kubernetes concepts like labels and pods and the awesomeness that is cAdvisor.

Heapster can be used to enable cluster wide monitoring on other Cluster management solutions by running a simple cluster specific buddy container that will help heapster with discovery of hosts. For example, take a look at this guide for setting up Cluster monitoring in CoreOS.

#####How heapster works on Kubernetes:

  1. Discovers all minions in a Kubernetes cluster
  2. Collects container statistics from the cadvisors running on the minions
  3. Organizes stats into Pods
  4. Stores Pod stats in a configurable backend

Along with each container stat entry, it's Pod ID, Container name, Pod IP, Hostname and Labels are also stored. Labels are stored as key:value pairs.

Heapster currently supports in-memory and InfluxDB backends. Patches are welcome for adding more storage backends.

#####Run Heapster in a Kubernetes cluster with an Influxdb backend and Grafana

Step 1: Setup Kube cluster

Fork the Kubernetes repository and turn up a Kubernetes cluster, if you haven't already. Make sure kubecfg.sh is exported. By default, cAdvisor runs as a Pod on all nodes using a static manifest file that is distributed via salt. Make sure that it is running on port 4194 on all nodes.

Step 2: Start a Pod with Influxdb, grafana and elasticsearch

$ kubectl.sh create -f deploy/influxdb-grafana-controller.js

Step 3: Start Influxdb service

$ kubectl.sh create -f deploy/influxdb-service.json

Step 4: Update firewall rules

Open up ports tcp:80,8083,8086,9200.

$ gcloud compute firewall-rules create monitoring-heapster --allow "tcp:80" "tcp:8083" "tcp:8086" --target-tags=kubernetes-minion

Step 5: Start Heapster Pod

$ kubectl.sh create -f deploy/heapster-controller.js

Verify that all the pods and services are up and running:

$ kubectl.sh get pods
$ kubectl.sh get services

To start monitoring the cluster using grafana, find out the the external IP of the minion where the 'influx-grafana' Pod is running from the output of kubectl.sh get pods -l "name=influxGrafana", and visit http://<minion-ip>:80.

To access the Influxdb UI visit http://<minion-ip>:8083.

Warning: Virtual Machines need to have at least 2 cores for InfluxDB to perform optimally.

#####Hints

  • To enable memory and swap accounting on the minions follow the instructions here

Community

Contributions, questions, and comments are all welcomed and encouraged! Heapster and cAdvisor developers hang out in #google-containers room on freenode.net. We also have the google-containers Google Groups mailing list.

heapster's People

Contributors

brendandburns avatar dipankar avatar jimmidyson avatar rjnagal avatar vishh avatar vmarmol avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.