Skip to content

Commit 2382e00

Browse files
Ilja WeisIlja Weis
authored andcommitted
add README, samples
1 parent d8a54e1 commit 2382e00

File tree

3 files changed

+52
-4
lines changed

3 files changed

+52
-4
lines changed

.goreleaser.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
builds:
2+
- binary: check_kubernetes
3+
goos:
4+
- windows
5+
- darwin
6+
- linux
7+
goarch:
8+
- amd64
9+
env:
10+
- CGO_ENABLED=0
11+
archive:
12+
format: tar.gz
13+
release:
14+
draft: true

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
1-
See https://github.com/kubernetes/client-go/blob/master/INSTALL.md on
2-
how to install the dependencies.
1+
# check_kubernetes
32

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

6-
should work.
5+
For use with https://github.com/Nexinto/kubernetes-icinga.
76

7+
## Usage
8+
9+
```bash
10+
check_kubernetes -kubeconfig ... -type deployment -namespace kube-system -name kube-dns
11+
12+
```
13+
14+
Supported types:
15+
16+
* pod
17+
* replicaset
18+
* deployment
19+
* daemonset
20+
* statefulset
21+
* node
22+
* componentstatus
23+
* service
24+
25+
## Using Icinga
26+
27+
Use the configuration in `examples/check_kubernetes.conf` to configure check_kubernetes as a check_command in Icinga.

examples/check_kubernetes.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
object CheckCommand "check_kubernetes" {
2+
3+
command = [
4+
PluginDir + "/check_kubernetes"
5+
]
6+
7+
arguments = {
8+
"-kubeconfig" = "$kubernetes_config$"
9+
"-type" = "$kubernetes_type$"
10+
"-name" = "$kubernetes_name$"
11+
"-namespace" = "$kubernetes_namespace$"
12+
}
13+
14+
}

0 commit comments

Comments
 (0)