Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kube-state-metrics initial code #1

Merged
merged 3 commits into from
May 10, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
kube-state-metrics

# Created by https://www.gitignore.io/api/go

### Go ###
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so

# Folders
_obj
_test

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

_testmain.go

*.exe
*.test
*.prof

*.iml
.idea/
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# kube-state-metrics
Add-on agent to export cluster metrics to monitoring systems.
# Overview
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!


kube-state-metrics generates metrics about the state of the object inside of a
Kubernetes cluster. It is not focused on the health of the Kubernetes
components individually, but rather on the health of the various objects
inside, such as deployments, nodes and pods.

*Requires Kubernetes 1.2+*

# Usage

Simply build and run kube-state-metrics inside a Kubernetes pod which has a
service account token that has read-only access to the Kubernetes cluster.

## Metrics

There are many more metrics we could report, but this first pass is focused on
those that could result in actionable alerts. Please contribute PR's for
additional metrics!

### WARNING: THESE METRIC/TAG NAMES ARE UNSTABLE AND MAY CHANGE IN A FUTURE RELEASE.

* nodes ready=<true|false>
* deployment_replicas name=<deployment-name> namespace=<deployment-namespace>
* deployment_replicas_available name=<deployment-name> namespace=<deployment-namespace>
* container_restarts name=<container-name> namespace=<pod-namespace> pod_name=<pod-name>

# Development

When developing, test a metric dump against your local Kubernetes cluster by running:

```
go run main.go --apiserver=<APISERVER-HERE> --in-cluster=false --port=<APISERVER-PORT> --dry-run
```
Loading