diff --git a/docs/Plugins.md b/docs/Plugins.md index 2feb6f6a..f8e54a8a 100644 --- a/docs/Plugins.md +++ b/docs/Plugins.md @@ -1769,6 +1769,7 @@ There is also additional Kubernetes dimensions for the Container and Pod metrics | ReplicationController | replication_controller | | ReplicaSet | replica_set | | DaemonSet | daemon_set | +| StatefulSet | stateful_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 | diff --git a/monasca_agent/collector/checks/utils.py b/monasca_agent/collector/checks/utils.py index 25aea681..ea55cb29 100644 --- a/monasca_agent/collector/checks/utils.py +++ b/monasca_agent/collector/checks/utils.py @@ -1,5 +1,6 @@ # (C) Copyright 2015,2017-2018 Hewlett Packard Enterprise Development LP # (C) Copyright 2017 KylinCloud +# Copyright 2018 OP5 AB import base64 import json @@ -815,6 +816,8 @@ def _get_pod_owner_pair(kubernetes_connector, pod_owner_type, pod_owner_name, po return 'deployment', deployment_name elif pod_owner_type == "DaemonSet": return 'daemon_set', pod_owner_name + elif pod_owner_type == "StatefulSet": + return 'stateful_set', pod_owner_name elif pod_owner_type == "Job": if not kubernetes_connector: log.info("Can not set cronjob name as connection information to API is not set. "