diff --git a/docs/Plugins.md b/docs/Plugins.md index 02d4f9fe..20327e99 100644 --- a/docs/Plugins.md +++ b/docs/Plugins.md @@ -585,6 +585,7 @@ The cAdvisor host check returns the following metrics: | mem.cache_bytes | hostname, unit | Number of bytes of page cache memory | mem.swap_bytes | hostname, unit | Swap usage in memory in bytes | mem.used_bytes | hostname, unit | Current memory in use in bytes +| mem.working_set_bytes | hostname, unit | Current working set of memory in bytes (total minus cache) | net.in_bytes | hostname, interface, unit | Total network bytes received by all interfaces | net.in_bytes_sec | hostname, interface, unit | Total number of network bytes received by all interfaces per second | net.in_dropped_packets | hostname, interface, unit | Total inbound network packets dropped by all interfaces @@ -1578,6 +1579,7 @@ Common Container metrics between containers running underneath kubernetes and st | container.mem.rss_bytes | image, container_name, pod_name, namespace, unit | image, container_name, hostname, unit | Size of rss in bytes | container.mem.swap_bytes | image, container_name, pod_name, namespace, unit | image, container_name, hostname, unit | Swap usage in memory in bytes | container.mem.used_bytes | image, container_name, pod_name, namespace, unit | image, container_name, hostname, unit | Current memory in use in bytes +| container.mem.working_set_bytes | image, container_name, pod_name, namespace, unit | image, container_name, hostname, unit | Current working set memory in bytes (total minus cache) | container.mem.fail_count | image, container_name, pod_name, namespace, unit | image, container_name, hostname, unit | Number of memory usage limit hits | container.net.in_bytes | image, container_name, pod_name, namespace, unit | image, container_name, hostname, unit | Total network bytes received | container.net.in_bytes_sec | image, container_name, pod_name, namespace, unit | image, container_name, hostname, unit | Number of network bytes received per second @@ -1628,6 +1630,7 @@ Pod Metrics: | pod.mem.rss_bytes | pod_name, namespace | Size of rss in bytes | pod.mem.swap_bytes | pod_name, namespace | Swap usage in memory in bytes | pod.mem.used_bytes | pod_name, namespace | Current memory in use in bytes +| pod.mem.working_set_bytes | pod_name, namespace | Current working set memory in bytes (total minus cache) | pod.net.in_bytes | pod_name, namespace | Total network bytes received | pod.net.in_bytes_sec | pod_name, namespace | Number of network bytes received per second | pod.net.in_dropped_packets | pod_name, namespace | Total inbound network packets dropped @@ -1656,6 +1659,7 @@ There is also additional Kubernetes dimensions for the Container and Pod metrics | ReplicaSet | replica_set | | DaemonSet | daemon_set | | Deployment| deployment | Only will be set if derive_host is set to true as it needs to connect to the API to see if the ReplicaSet is under a deployment +| Job | job | Pod Phase Mapping: diff --git a/monasca_agent/collector/checks/utils.py b/monasca_agent/collector/checks/utils.py index 560f5472..2db6cbe0 100644 --- a/monasca_agent/collector/checks/utils.py +++ b/monasca_agent/collector/checks/utils.py @@ -808,6 +808,8 @@ def _set_pod_owner_dimension(kubernetes_connector, pod_dimensions, pod_owner_typ pod_dimensions['deployment'] = deployment_name elif pod_owner_type == "DaemonSet": pod_dimensions['daemon_set'] = pod_owner_name + elif pod_owner_type == "Job": + pod_dimensions['job'] = pod_owner_name else: log.info("Unsupported pod owner kind {} as a dimension for pod {}".format(pod_owner_type, pod_dimensions)) diff --git a/monasca_agent/collector/checks_d/cadvisor_host.py b/monasca_agent/collector/checks_d/cadvisor_host.py index 374d4bbb..db21df42 100644 --- a/monasca_agent/collector/checks_d/cadvisor_host.py +++ b/monasca_agent/collector/checks_d/cadvisor_host.py @@ -21,6 +21,7 @@ METRICS = { "swap": ("swap_bytes", ["gauge"], ["bytes"]), "cache": ("cache_bytes", ["gauge"], ["bytes"]), "usage": ("used_bytes", ["gauge"], ["bytes"]), + "working_set": ("working_set", ["gauge"], ["bytes"]) }, "filesystem_metrics": { "capacity": ("total_bytes", ["gauge"], ["bytes"]), diff --git a/monasca_agent/collector/checks_d/kubernetes.py b/monasca_agent/collector/checks_d/kubernetes.py index f56b2eb2..94c6e118 100644 --- a/monasca_agent/collector/checks_d/kubernetes.py +++ b/monasca_agent/collector/checks_d/kubernetes.py @@ -32,6 +32,7 @@ CADVISOR_METRICS = { "cache": "mem.cache_bytes", "usage": "mem.used_bytes", "failcnt": "mem.fail_count", + "working_set": "mem.working_set" }, "filesystem_metrics": { "capacity": "fs.total_bytes", @@ -66,6 +67,7 @@ METRIC_TYPES_UNITS = { "mem.cache_bytes": (["gauge"], ["bytes"]), "mem.used_bytes": (["gauge"], ["bytes"]), "mem.fail_count": (["gauge"], ["count"]), + "mem.working_set": (["gauge"], ["bytes"]), "fs.total_bytes": (["gauge"], ["bytes"]), "fs.usage_bytes": (["gauge"], ["bytes"]), "fs.writes": (["gauge", "rate"], ["bytes", "bytes_per_second"]),