diff options
author | juanvallejo <jvallejo@redhat.com> | 2017-06-26 17:41:40 -0400 |
---|---|---|
committer | juanvallejo <jvallejo@redhat.com> | 2017-08-01 17:25:40 -0400 |
commit | 04154a21237f9da6ee64bf57097d125b85b99a5f (patch) | |
tree | 1d17e8bceefd45e8da6741813fc136c892b27429 /roles/openshift_health_checker/openshift_checks/logging/fluentd.py | |
parent | 01e48932d615dd17c316c1b9ab00216ab0f3f78d (diff) | |
download | openshift-04154a21237f9da6ee64bf57097d125b85b99a5f.tar.gz openshift-04154a21237f9da6ee64bf57097d125b85b99a5f.tar.bz2 openshift-04154a21237f9da6ee64bf57097d125b85b99a5f.tar.xz openshift-04154a21237f9da6ee64bf57097d125b85b99a5f.zip |
add fluentd logging driver config check
Diffstat (limited to 'roles/openshift_health_checker/openshift_checks/logging/fluentd.py')
-rw-r--r-- | roles/openshift_health_checker/openshift_checks/logging/fluentd.py | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/roles/openshift_health_checker/openshift_checks/logging/fluentd.py b/roles/openshift_health_checker/openshift_checks/logging/fluentd.py index 063e707a9..b3485bf44 100644 --- a/roles/openshift_health_checker/openshift_checks/logging/fluentd.py +++ b/roles/openshift_health_checker/openshift_checks/logging/fluentd.py @@ -11,8 +11,6 @@ class Fluentd(LoggingCheck): name = "fluentd" tags = ["health", "logging"] - logging_namespace = None - def run(self): """Check various things and gather errors. Returns: result as hash""" @@ -27,7 +25,6 @@ class Fluentd(LoggingCheck): if check_error: msg = ("The following Fluentd deployment issue was found:" - "\n-------\n" "{}".format(check_error)) return {"failed": True, "changed": False, "msg": msg} @@ -147,7 +144,11 @@ class Fluentd(LoggingCheck): def get_nodes_by_name(self): """Retrieve all the node definitions. Returns: dict(name: node), error string""" - nodes_json = self._exec_oc("get nodes -o json", []) + nodes_json = self.exec_oc( + self.logging_namespace, + "get nodes -o json", + [] + ) try: nodes = json.loads(nodes_json) except ValueError: # no valid json - should not happen @@ -158,10 +159,3 @@ class Fluentd(LoggingCheck): node['metadata']['name']: node for node in nodes['items'] }, None - - def _exec_oc(self, cmd_str, extra_args): - return super(Fluentd, self).exec_oc( - self.logging_namespace, - cmd_str, - extra_args, - ) |