Skip to content

Commit

Permalink
add README, samples
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilja Weis authored and Ilja Weis committed Jun 12, 2018
1 parent d8a54e1 commit 2382e00
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 4 deletions.
14 changes: 14 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
builds:
- binary: check_kubernetes
goos:
- windows
- darwin
- linux
goarch:
- amd64
env:
- CGO_ENABLED=0
archive:
format: tar.gz
release:
draft: true
28 changes: 24 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
See https://github.com/kubernetes/client-go/blob/master/INSTALL.md on
how to install the dependencies.
# check_kubernetes

$ go get k8s.io/client-go/...
Icinga/Nagios Kubernetes check. Checks state of individual objects.

should work.
For use with https://github.com/Nexinto/kubernetes-icinga.

## Usage

```bash
check_kubernetes -kubeconfig ... -type deployment -namespace kube-system -name kube-dns

```

Supported types:

* pod
* replicaset
* deployment
* daemonset
* statefulset
* node
* componentstatus
* service

## Using Icinga

Use the configuration in `examples/check_kubernetes.conf` to configure check_kubernetes as a check_command in Icinga.
14 changes: 14 additions & 0 deletions examples/check_kubernetes.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
object CheckCommand "check_kubernetes" {

command = [
PluginDir + "/check_kubernetes"
]

arguments = {
"-kubeconfig" = "$kubernetes_config$"
"-type" = "$kubernetes_type$"
"-name" = "$kubernetes_name$"
"-namespace" = "$kubernetes_namespace$"
}

}

0 comments on commit 2382e00

Please sign in to comment.