From 032ae4863bf46089d5de0ae5c6079536aa77d55a Mon Sep 17 00:00:00 2001 From: Samuel Vandamme Date: Tue, 26 Jun 2018 17:01:33 +0200 Subject: [PATCH] Updated metrics to latest --- _includes/plugins/docker.md | 94 ++++++++++++++++------- _includes/plugins/kubernetes.md | 129 +++++++++++++++++++------------- _includes/plugins/resources.md | 6 +- generate-metrics.py | 6 +- 4 files changed, 153 insertions(+), 82 deletions(-) diff --git a/_includes/plugins/docker.md b/_includes/plugins/docker.md index c8b95c0..2db8e58 100644 --- a/_includes/plugins/docker.md +++ b/_includes/plugins/docker.md @@ -5,24 +5,87 @@ | Name | Unit | Dimensions | |------|------|------------| | Docker active check latency | s | | -| Docker container block IO read rate | b/s | | -| Docker container block IO write rate | b/s | | -| Docker container cache memory bytes | b | | +| Docker running | % | | + +### Docker / CPU + +| Name | Unit | Dimensions | +|------|------|------------| | Docker container cpu limit | cores | | | Docker container cpu usage percent from limit | % | | +| Docker container kernel mode cpu usage | % | | +| Docker container total cpu usage | % | | +| Docker container total cpu usage in cores | cores | | +| Docker container user mode cpu usage | % | | + +### Docker / Disk + +| Name | Unit | Dimensions | +|------|------|------------| +| Docker container block IO read rate | b/s | | +| Docker container block IO write rate | b/s | | + +### Docker / FS + +| Name | Unit | Dimensions | +|------|------|------------| | Docker container filesystem size | b | | +| Docker container total filesystem size (virtual) | b | | + +### Docker / General + +| Name | Unit | Dimensions | +|------|------|------------| +| Docker container number of running processes | # | | + +### Docker / Host + +| Name | Unit | Dimensions | +|------|------|------------| +| Docker host kernel mode cpu usage | % | | +| Docker host memory usage bytes | b | | +| Docker host network receive rate | b/s | | +| Docker host network transmit rate | b/s | | +| Docker host user mode cpu usage | % | | +| Docker total host cpu usage | % | | +| Docker total number of containers | # | | +| Docker total number of images | # | | + +### Docker / Memory + +| Name | Unit | Dimensions | +|------|------|------------| +| Docker container cache memory bytes | b | | | Docker container free memory bytes | b | | | Docker container free memory percentage | % | | -| Docker container kernel mode cpu usage | % | | | Docker container memory limit | b | | | Docker container memory usage bytes | b | | | Docker container memory usage percentage | % | | +| Docker container pgfault memory failures total | # | | +| Docker container pgmajfault memory failures total | # | | +| Docker container RSS bytes | b | | +| Docker container shm memory free bytes | b | | +| Docker container shm memory free percent | % | | +| Docker container shm memory limit | b | | +| Docker container shm memory used bytes | b | | +| Docker container swap usage bytes | b | | +| Docker container working set | b | | + +### Docker / Network + +| Name | Unit | Dimensions | +|------|------|------------| | Docker container network receive errors total | # | | | Docker container network receive packets dropped total | # | | | Docker container network receive rate | b/s | | | Docker container network transmit errors total | # | | | Docker container network transmit packets dropped total | # | | | Docker container network transmit rate | b/s | | + +### Docker / Network / TCP States + +| Name | Unit | Dimensions | +|------|------|------------| | Docker container number of CLOSE_WAIT connections | # | | | Docker container number of CLOSING connections | # | | | Docker container number of ESTABLISHED connections | # | | @@ -30,30 +93,7 @@ | Docker container number of FIN_WAIT2 connections | # | | | Docker container number of LAST_ACK connections | # | | | Docker container number of LISTEN connections | # | | -| Docker container number of running processes | # | | | Docker container number of SYN_RECV connections | # | | | Docker container number of SYN_SENT connections | # | | | Docker container number of TIME_WAIT connections | # | | -| Docker container pgfault memory failures total | # | | -| Docker container pgmajfault memory failures total | # | | -| Docker container RSS bytes | b | | -| Docker container shm memory free bytes | b | | -| Docker container shm memory free percent | % | | -| Docker container shm memory limit | b | | -| Docker container shm memory used bytes | b | | -| Docker container swap usage bytes | b | | -| Docker container total cpu usage | % | | -| Docker container total cpu usage in cores | cores | | -| Docker container total filesystem size (virtual) | b | | -| Docker container user mode cpu usage | % | | -| Docker container working set | b | | -| Docker host kernel mode cpu usage | % | | -| Docker host memory usage bytes | b | | -| Docker host network receive rate | b/s | | -| Docker host network transmit rate | b/s | | -| Docker host user mode cpu usage | % | | -| Docker running | % | | -| Docker total host cpu usage | % | | -| Docker total number of containers | # | | -| Docker total number of images | # | | diff --git a/_includes/plugins/kubernetes.md b/_includes/plugins/kubernetes.md index ae05c36..6bb55b9 100644 --- a/_includes/plugins/kubernetes.md +++ b/_includes/plugins/kubernetes.md @@ -1,66 +1,23 @@ ## Metrics -### Kubernetes / Master +### Kubernetes / Containers | Name | Unit | Dimensions | |------|------|------------| -| Kubernetes capacity for persistent volume | # | Persistent volume | -| Kubernetes internal service health status | | Service name | -| Kubernetes max number of pods in namespace | # | Namespace | | Kubernetes number containers in pod | # | Pod | -| Kubernetes number of bound persistent volumes | # | | -| Kubernetes number of bound persistent volumes claims | # | | | Kubernetes number of containers | # | | -| Kubernetes number of containers in namespace | # | Namespace | -| Kubernetes number of daemon sets | # | | -| Kubernetes number of daemon sets in namespace | # | Namespace | -| Kubernetes number of deployments | # | | -| Kubernetes number of failed jobs | # | | -| Kubernetes number of failed nodes | # | | -| Kubernetes number of failed persistent volumes | # | | -| Kubernetes number of jobs | # | | -| Kubernetes number of namespaces | # | | -| Kubernetes number of nodes | # | | -| Kubernetes number of pending persistent volumes claims | # | | -| Kubernetes number of persistent volumes | # | | -| Kubernetes number of persistent volumes claims | # | | -| Kubernetes number of pods | # | | -| Kubernetes number of pods created in namespace | # | Namespace | -| Kubernetes number of pods in container creating state for 5 minutes | # | | -| Kubernetes number of pods in container pending state for 5 minutes | # | | -| Kubernetes number of pods in namespace | # | Namespace | -| Kubernetes number of pods templates in namespace | # | Namespace | -| Kubernetes number of podTemplates | # | | | Kubernetes number of ready containers | # | | -| Kubernetes number of ready containers in namespace | # | Namespace | -| Kubernetes number of ready nodes | # | | -| Kubernetes number of released persistent volumes | # | | -| Kubernetes number of replica sets | # | | -| Kubernetes number of replica sets in namespace | # | Namespace | -| Kubernetes number of replication controllers | # | | -| Kubernetes number of replication controllers in namespace | # | Namespace | | Kubernetes number of running containers | # | | -| Kubernetes number of running containers in namespace | # | Namespace | -| Kubernetes number of running jobs | # | | -| Kubernetes number of running pods | # | | -| Kubernetes number of services | # | | -| Kubernetes number of services in namespace | # | Namespace | -| Kubernetes number of stateful(pet) sets | # | | -| Kubernetes number of stateful(pet) sets in namespace | # | Namespace | -| Kubernetes number of successful jobs | # | | | Kubernetes number ready containers in pod | # | Pod | | Kubernetes number running containers in pod | # | Pod | -| Kubernetes size for persistent volume claim | # | Persistent volume claim | -| Number of executions per cron job | # | Cron job | -| Number of failed executions per cron job | # | Cron job | -| Number of successful executions per cron job | # | Cron job | -### Kubernetes / Master / Daemon sets +### Kubernetes / Daemon sets | Name | Unit | Dimensions | |------|------|------------| | Kubernetes number of actual replicas in daemon set | # | Namespace, Daemon set | | Kubernetes number of containers in daemon set | # | Namespace, Daemon set | +| Kubernetes number of daemon sets | # | | | Kubernetes number of desired replicas in daemon set | # | Namespace, Daemon set | | Kubernetes number of failed containers in daemon set | # | Namespace, Daemon set | | Kubernetes number of failed pods in daemon set | # | Namespace, Daemon set | @@ -69,12 +26,13 @@ | Kubernetes number of running containers in daemon set | # | Namespace, Daemon set | | Kubernetes number of running pods in daemon set | # | Namespace, Daemon set | -### Kubernetes / Master / Deployments +### Kubernetes / Deployments | Name | Unit | Dimensions | |------|------|------------| | Kubernetes number of actual replicas in deployment | # | Namespace, Deployment | | Kubernetes number of containers in deployment | # | Namespace, Deployment | +| Kubernetes number of deployments | # | | | Kubernetes number of desired replicas in deployment | # | Namespace, Deployment | | Kubernetes number of failed containers in deployment | # | Namespace, Deployment | | Kubernetes number of failed pods in deployment | # | Namespace, Deployment | @@ -83,7 +41,54 @@ | Kubernetes number of running containers in deployment | # | Namespace, Deployment | | Kubernetes number of running pods in deployment | # | Namespace, Deployment | -### Kubernetes / Master / Quotas +### Kubernetes / Jobs + +| Name | Unit | Dimensions | +|------|------|------------| +| Kubernetes number of failed jobs | # | | +| Kubernetes number of jobs | # | | +| Kubernetes number of running jobs | # | | +| Kubernetes number of successful jobs | # | | +| Number of executions per cron job | # | Cron job | +| Number of failed executions per cron job | # | Cron job | +| Number of successful executions per cron job | # | Cron job | + +### Kubernetes / Namespace + +| Name | Unit | Dimensions | +|------|------|------------| +| Kubernetes number of containers in namespace | # | Namespace | +| Kubernetes number of daemon sets in namespace | # | Namespace | +| Kubernetes number of namespaces | # | | +| Kubernetes number of pods created in namespace | # | Namespace | +| Kubernetes number of pods in namespace | # | Namespace | +| Kubernetes number of pods templates in namespace | # | Namespace | +| Kubernetes number of ready containers in namespace | # | Namespace | +| Kubernetes number of replica sets in namespace | # | Namespace | +| Kubernetes number of replication controllers in namespace | # | Namespace | +| Kubernetes number of running containers in namespace | # | Namespace | +| Kubernetes number of services in namespace | # | Namespace | + +### Kubernetes / Nodes + +| Name | Unit | Dimensions | +|------|------|------------| +| Kubernetes internal service health status | | Service name | +| Kubernetes number of failed nodes | # | | +| Kubernetes number of nodes | # | | +| Kubernetes number of ready nodes | # | | + +### Kubernetes / Pods + +| Name | Unit | Dimensions | +|------|------|------------| +| Kubernetes number of pods | # | | +| Kubernetes number of pods in container creating state for 5 minutes | # | | +| Kubernetes number of pods in container pending state for 5 minutes | # | | +| Kubernetes number of podTemplates | # | | +| Kubernetes number of running pods | # | | + +### Kubernetes / Quotas | Name | Unit | Dimensions | |------|------|------------| @@ -97,6 +102,7 @@ | Kubernetes available memory requests per namespace | b | Namespace | | Kubernetes available pods per node | # | | | Kubernetes available storage requests per namespace | b | Namespace | +| Kubernetes max number of pods in namespace | # | Namespace | | Kubernetes maximum object count per namespace | # | Namespace, Object type | | Kubernetes object count percentage per namespace | % | Namespace, Object type | | Kubernetes percentage of max pods per node | % | | @@ -119,7 +125,7 @@ | Kubernetes used storage requests per namespace | b | Namespace | | Kubernetes used storage requests percentage per namespace | % | Namespace | -### Kubernetes / Master / Replica sets +### Kubernetes / Replica sets | Name | Unit | Dimensions | |------|------|------------| @@ -130,10 +136,11 @@ | Kubernetes number of failed pods in replica set | # | Namespace, Replica set | | Kubernetes number of missing replicas in replica set | # | Namespace, Replica set | | Kubernetes number of pods in replica set | # | Namespace, Replica set | +| Kubernetes number of replica sets | # | | | Kubernetes number of running containers in replica set | # | Namespace, Replica set | | Kubernetes number of running pods in replica set | # | Namespace, Replica set | -### Kubernetes / Master / Replication controllers +### Kubernetes / Replication controllers | Name | Unit | Dimensions | |------|------|------------| @@ -144,18 +151,20 @@ | Kubernetes number of failed pods in replication controller | # | Namespace, Replication controller | | Kubernetes number of missing replicas in replication controller | # | Namespace, Replication controller | | Kubernetes number of pods in replication controller | # | Namespace, Replication controller | +| Kubernetes number of replication controllers | # | | | Kubernetes number of running containers in replication controller | # | Namespace, Replication controller | | Kubernetes number of running pods in replication controller | # | Namespace, Replication controller | -### Kubernetes / Master / Services +### Kubernetes / Services | Name | Unit | Dimensions | |------|------|------------| | Kubernetes number of containers in service | # | Namespace, Service | | Kubernetes number of failed containers in service | # | Namespace, Service | | Kubernetes number of running containers in service | # | Namespace, Service | +| Kubernetes number of services | # | | -### Kubernetes / Master / Stateful sets +### Kubernetes / Stateful(pet) sets | Name | Unit | Dimensions | |------|------|------------| @@ -168,6 +177,22 @@ | Kubernetes number of pods in stateful(pet) set | # | Namespace, Stateful set | | Kubernetes number of running containers in stateful(pet) set | # | Namespace, Stateful set | | Kubernetes number of running pods in stateful(pet) set | # | Namespace, Stateful set | +| Kubernetes number of stateful(pet) sets | # | | +| Kubernetes number of stateful(pet) sets in namespace | # | Namespace | + +### Kubernetes / Volumes + +| Name | Unit | Dimensions | +|------|------|------------| +| Kubernetes capacity for persistent volume | # | Persistent volume | +| Kubernetes number of bound persistent volumes | # | | +| Kubernetes number of bound persistent volumes claims | # | | +| Kubernetes number of failed persistent volumes | # | | +| Kubernetes number of pending persistent volumes claims | # | | +| Kubernetes number of persistent volumes | # | | +| Kubernetes number of persistent volumes claims | # | | +| Kubernetes number of released persistent volumes | # | | +| Kubernetes size for persistent volume claim | # | Persistent volume claim | ## Events diff --git a/_includes/plugins/resources.md b/_includes/plugins/resources.md index a03b303..0189366 100644 --- a/_includes/plugins/resources.md +++ b/_includes/plugins/resources.md @@ -26,8 +26,8 @@ | Number of processes currently running on CPUs | procs | | | Number of servicing softirqs | int | | | Number of zombie processes | procs | | -| Processor load | % | | -| System load | % | | +| System load | | | +| System load percentage | % | | | Total CPU idle time | % | | | Total CPU iowait time | % | | | Total CPU nice time | % | | @@ -104,6 +104,7 @@ | Name | Unit | Dimensions | |------|------|------------| | % Active memory | % | | +| % Available memory | % | | | % Buffered memory | % | | | % Cached memory | % | | | % Free memory | % | | @@ -112,6 +113,7 @@ | Active memory | b | | | Amount of memory swapped in from disk | b/s | | | Amount of memory swapped to disk | b/s | | +| Available memory | b | | | Buffers memory | b | | | Cached memory | b | | | Free memory | b | | diff --git a/generate-metrics.py b/generate-metrics.py index 6e23a8e..4a5f602 100755 --- a/generate-metrics.py +++ b/generate-metrics.py @@ -38,13 +38,17 @@ def readMetrics(plugin, directory): if m.group(7) != '': dimensions = [x.split(':')[1] for x in m.group(7).split(',')] + group = m.group(4) + if group[:2] == 's|': + group = group.split('|')[2] + name = m.group(2) if name not in names: result = { 'type': m.group(1), 'name': name, 'description': m.group(3), - 'group': m.group(4), + 'group': group, 'unit': m.group(5), 'unknown': m.group(6), 'dimensions': ', '.join(dimensions),