Commit d3428ef3 authored by Marco Ceppi's avatar Marco Ceppi Committed by George Kraft

Add metric collection to charms for autoscalling

parent a4354569
repo: https://github.com/kubernetes/kubernetes.git repo: https://github.com/kubernetes/kubernetes.git
includes: includes:
- 'layer:metrics'
- 'layer:nagios' - 'layer:nagios'
- 'layer:nginx' - 'layer:nginx'
- 'layer:tls-client' - 'layer:tls-client'
......
repo: https://github.com/kubernetes/kubernetes.git repo: https://github.com/kubernetes/kubernetes.git
includes: includes:
- 'layer:basic' - 'layer:basic'
- 'layer:tls-client'
- 'layer:leadership'
- 'layer:debug' - 'layer:debug'
- 'layer:leadership'
- 'layer:metrics'
- 'layer:nagios' - 'layer:nagios'
- 'layer:tls-client'
- 'interface:ceph-admin' - 'interface:ceph-admin'
- 'interface:etcd' - 'interface:etcd'
- 'interface:http' - 'interface:http'
......
metrics:
juju-units: {}
pods:
type: gauge
description: number of pods
command: kubectl get po --all-namespaces | tail -n+2 | wc -l
services:
type: gauge
description: number of services
command: kubectl get svc --all-namespaces | tail -n+2 | wc -l
replicasets:
type: gauge
description: number of replicasets
command: kubectl get rs --all-namespaces | tail -n+2 | wc -l
replicationcontrollers:
type: gauge
description: number of replicationcontrollers
command: kubectl get rc --all-namespaces | tail -n+2 | wc -l
nodes:
type: gauge
description: number of kubernetes nodes
command: kubectl get nodes | tail -n+2 | wc -l
persistentvolume:
type: gauge
description: number of pv
command: kubectl get pv --all-namespaces | tail -n+2 | wc -l
persistentvolumeclaims:
type: gauge
description: number of claims
command: kubectl get pvc --all-namespaces | tail -n+2 | wc -l
serviceaccounts:
type: gauge
description: number of sa
command: kubectl get sa --all-namespaces | tail -n+2 | wc -l
...@@ -3,6 +3,7 @@ includes: ...@@ -3,6 +3,7 @@ includes:
- 'layer:basic' - 'layer:basic'
- 'layer:debug' - 'layer:debug'
- 'layer:docker' - 'layer:docker'
- 'layer:metrics'
- 'layer:nagios' - 'layer:nagios'
- 'layer:tls-client' - 'layer:tls-client'
- 'layer:nvidia-cuda' - 'layer:nvidia-cuda'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment