heapster

command module
v0.0.0-...-6b907e5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

README

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 without using Kubernetes.

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

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

Setup a Kubernetes cluster

Bring up a Kubernetes cluster, if you haven't already. Ensure that 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.

Start all of the pods and services
$ kubectl.sh create -f deploy/

Grafana will be accessible at https://<masterIP>/api/v1beta1/proxy/services/monitoring-grafana/. Use the master auth to access Grafana.

Troubleshooting guide
  1. If the Grafana service is not accessible, chances are it might not be running. Use kubectl.sh to verify that the heapster and influxdb & grafana pods are alive.

$ kubectl.sh get pods ```

```shell

$ kubectl.sh get services ```

  1. If the default Grafana dashboard doesn't show any graphs, check the Heapster logs with kubectl.sh log <heapster pod name>. Look for any errors related to accessing the Kubernetes master or the kubelet.

  2. To access the InfluxDB UI, you will have to open up the InfluxDB UI port (8083) on the nodes. You can do so by creating a firewall rule:

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

Then, find out the IP address of the node where InfluxDB is running and point your web browser to `http://<nodeIP>:8083/`.

_Note: We are working on exposing the InfluxDB UI using the proxy service on the Kubernetes master._
  1. If you find InfluxDB to be using up a lot of CPU or memory, consider placing resource restrictions on the InfluxDB & Grafana pod. You can add cpu: <millicores> and memory: <bytes> in the Controller Spec and relaunch the controllers:

$ deploy/kube.sh restart ```

Hints
  • To enable memory and swap accounting on the minions, follow these instructions.

  • If the Grafana UI is not accessible via the proxy on the master (URL mentioned above), open up port 80 on the nodes, find out the node on which Grafana container is running, and access the Grafana UI at http://<minion-ip>/

gcloud compute firewall-rules update monitoring-heapster --allow "tcp:80" --target-tags=kubernetes-minion echo "Grafana URL: http://$(kubectl.sh get pods -l name=influxGrafana -o yaml | grep hostIP | awk '{print $2}')/" ```

How Heapster works on Kubernetes
  1. Discovers all minions in a Kubernetes cluster
  2. Collects container statistics from the kubelets running on the nodes
  3. Organizes stats into pods and adds Kubernetes-specific metadata
  4. Stores pod stats in a configurable backend

Along with each container stat entry, its pod ID, container name, pod IP, hostname and labels are also stored. Labels are stored as key:value pairs.

Heapster currently supports InfluxDB and BigQuery backends. We welcome patches that add additional storage backends.

Community

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/go-uuid/uuid
The uuid package generates and inspects UUIDs.
The uuid package generates and inspects UUIDs.
_workspace/src/code.google.com/p/goauth2/oauth
Package oauth supports making OAuth2-authenticated HTTP requests.
Package oauth supports making OAuth2-authenticated HTTP requests.
_workspace/src/code.google.com/p/goauth2/oauth/example command
This program makes a call to the specified API, authenticated with OAuth2.
This program makes a call to the specified API, authenticated with OAuth2.
_workspace/src/code.google.com/p/goauth2/oauth/jwt
The jwt package provides support for creating credentials for OAuth2 service account requests.
The jwt package provides support for creating credentials for OAuth2 service account requests.
_workspace/src/code.google.com/p/goauth2/oauth/jwt/example command
This program makes a read only call to the Google Cloud Storage API, authenticated with OAuth2.
This program makes a read only call to the Google Cloud Storage API, authenticated with OAuth2.
_workspace/src/code.google.com/p/google-api-go-client/bigquery/v2
Package bigquery provides access to the BigQuery API.
Package bigquery provides access to the BigQuery API.
_workspace/src/code.google.com/p/google-api-go-client/googleapi
Package googleapi contains the common code shared by all Google API libraries.
Package googleapi contains the common code shared by all Google API libraries.
_workspace/src/code.google.com/p/google-api-go-client/googleapi/internal/uritemplates
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).
_workspace/src/code.google.com/p/google-api-go-client/googleapi/transport
Package transport contains HTTP transports used to make authenticated API requests.
Package transport contains HTTP transports used to make authenticated API requests.
_workspace/src/github.com/GoogleCloudPlatform/gcloud-golang/compute/metadata
Package metadata provides access to Google Compute Engine (GCE) metadata and API service accounts.
Package metadata provides access to Google Compute Engine (GCE) metadata and API service accounts.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api
Package api contains the latest (or "internal") version of the Kubernetes API objects.
Package api contains the latest (or "internal") version of the Kubernetes API objects.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors
Package errors provides detailed error types for api field validation.
Package errors provides detailed error types for api field validation.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors/etcd
Package etcd provides conversion of etcd errors to API errors.
Package etcd provides conversion of etcd errors to API errors.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest
Package latest defines the default output serializations that code should use and imports the required schemas.
Package latest defines the default output serializations that code should use and imports the required schemas.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta
Package meta provides functions for retrieving API metadata from objects belonging to the Kubernetes API
Package meta provides functions for retrieving API metadata from objects belonging to the Kubernetes API
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest
Package rest defines common logic around changes to Kubernetes resources.
Package rest defines common logic around changes to Kubernetes resources.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/testapi
Package testapi provides a helper for retrieving the KUBE_API_VERSION environment variable.
Package testapi provides a helper for retrieving the KUBE_API_VERSION environment variable.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1
Package v1beta1 is the v1beta1 version of the API.
Package v1beta1 is the v1beta1 version of the API.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2
Package v1beta2 is the v1beta2 version of the API.
Package v1beta2 is the v1beta2 version of the API.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3
Package v1beta3 is the v1beta3 version of the API.
Package v1beta3 is the v1beta3 version of the API.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation
Package validation has functions for validating the correctness of api objects and explaining what is wrong with them when they aren't valid.
Package validation has functions for validating the correctness of api objects and explaining what is wrong with them when they aren't valid.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/auth/user
Package user contains utilities for dealing with simple user exchange in the auth packages.
Package user contains utilities for dealing with simple user exchange in the auth packages.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/client
Package client contains the implementation of the client side communication with the Kubernetes master.
Package client contains the implementation of the client side communication with the Kubernetes master.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/client/cache
Package cache is a client-side caching mechanism.
Package cache is a client-side caching mechanism.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd
Package clientcmd provides one stop shopping for building a working client from a fixed config, from a .kubeconfig file, from command line flags, or from any merged combination.
Package clientcmd provides one stop shopping for building a working client from a fixed config, from a .kubeconfig file, from command line flags, or from any merged combination.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/client/record
Package record has all client logic for recording and reporting events.
Package record has all client logic for recording and reporting events.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/clientauth
Package authcfg defines a file format for holding authentication information needed by clients of Kubernetes.
Package authcfg defines a file format for holding authentication information needed by clients of Kubernetes.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/conversion
Package conversion provides go object versioning and encoding/decoding mechanisms.
Package conversion provides go object versioning and encoding/decoding mechanisms.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/labels
Package labels implements a simple label system, parsing and matching selectors with sets of labels.
Package labels implements a simple label system, parsing and matching selectors with sets of labels.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/probe
Package probe contains utilities for health probing, as well as health status information.
Package probe contains utilities for health probing, as well as health status information.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/runtime
Package runtime includes helper functions for working with API objects that follow the kubernetes API object conventions, which are:
Package runtime includes helper functions for working with API objects that follow the kubernetes API object conventions, which are:
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/types
Package types implements various generic types used throughout kubernetes.
Package types implements various generic types used throughout kubernetes.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util
Package util implements various utility functions used in both testing and implementation of Kubernetes.
Package util implements various utility functions used in both testing and implementation of Kubernetes.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/config
Package config provides utility objects for decoupling sources of configuration and the actual configuration state.
Package config provides utility objects for decoupling sources of configuration and the actual configuration state.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/errors
Package errors implements various utility functions and types around errors.
Package errors implements various utility functions and types around errors.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/exec
Package exec provides an injectable interface and implementations for running commands.
Package exec provides an injectable interface and implementations for running commands.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/iptables
Package iptables provides an interface and implementations for running iptables commands.
Package iptables provides an interface and implementations for running iptables commands.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/mount
Package mount defines an interface to mounting filesystems.
Package mount defines an interface to mounting filesystems.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/slice
Package slice provides utility methods for common operations on slices.
Package slice provides utility methods for common operations on slices.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/wait
Package wait provides tools for polling or listening for changes to a condition.
Package wait provides tools for polling or listening for changes to a condition.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/version
Package version supplies version information collected at build time to kubernetes components.
Package version supplies version information collected at build time to kubernetes components.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag
Package verflag defines utility functions to handle command line flags related to version of Kubernetes.
Package verflag defines utility functions to handle command line flags related to version of Kubernetes.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/watch
Package watch contains a generic watchable interface, and a fake for testing code that uses the watch interface.
Package watch contains a generic watchable interface, and a fake for testing code that uses the watch interface.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/watch/json
Package json implements a simple encoder and decoder for streams of watch events over io.Writer/Readers
Package json implements a simple encoder and decoder for streams of watch events over io.Writer/Readers
_workspace/src/github.com/coreos/fleet/schema
Package schema provides access to the fleet API.
Package schema provides access to the fleet API.
_workspace/src/github.com/davecgh/go-spew/spew
Package spew implements a deep pretty printer for Go data structures to aid in debugging.
Package spew implements a deep pretty printer for Go data structures to aid in debugging.
_workspace/src/github.com/docker/docker/pkg/pools
Package pools provides a collection of pools which provide various data types with buffers.
Package pools provides a collection of pools which provide various data types with buffers.
_workspace/src/github.com/docker/libcontainer/netlink
Packet netlink provide access to low level Netlink sockets and messages.
Packet netlink provide access to low level Netlink sockets and messages.
_workspace/src/github.com/fsouza/go-dockerclient
Package docker provides a client for the Docker remote API.
Package docker provides a client for the Docker remote API.
_workspace/src/github.com/fsouza/go-dockerclient/testing
Package testing provides a fake implementation of the Docker API, useful for testing purpose.
Package testing provides a fake implementation of the Docker API, useful for testing purpose.
_workspace/src/github.com/golang/glog
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
_workspace/src/github.com/google/cadvisor/client
TODO(cAdvisor): Package comment.
TODO(cAdvisor): Package comment.
_workspace/src/github.com/spf13/pflag
pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
_workspace/src/github.com/stretchr/testify/assert
A set of comprehensive testing tools for use with the normal Go testing system.
A set of comprehensive testing tools for use with the normal Go testing system.
_workspace/src/github.com/stretchr/testify/require
Alternative testing tools which stop test execution if test failed.
Alternative testing tools which stop test execution if test failed.
_workspace/src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
_workspace/src/google.golang.org/api/googleapi
Package googleapi contains the common code shared by all Google API libraries.
Package googleapi contains the common code shared by all Google API libraries.
_workspace/src/google.golang.org/api/googleapi/internal/uritemplates
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).
_workspace/src/google.golang.org/api/googleapi/transport
Package transport contains HTTP transports used to make authenticated API requests.
Package transport contains HTTP transports used to make authenticated API requests.
_workspace/src/google.golang.org/cloud/internal
Package internal provides support for the cloud packages.
Package internal provides support for the cloud packages.
_workspace/src/gopkg.in/v2/yaml
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.
_workspace/src/speter.net/go/exp/math/dec/inf
Package inf (type inf.Dec) implements "infinite-precision" decimal arithmetic.
Package inf (type inf.Dec) implements "infinite-precision" decimal arithmetic.
clusters
coreos command
gcm
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL