Beispiel #1
0
 def _inject_m2ee_stats(self, stats):
     try:
         m2ee_stats, java_version = munin.get_stats_from_runtime(
             self.m2ee.client, self.m2ee.config)
         if "sessions" in m2ee_stats:
             m2ee_stats["sessions"]["user_sessions"] = {}
         m2ee_stats = munin.augment_and_fix_stats(
             m2ee_stats, self.m2ee.runner.get_pid(), java_version)
         self._sanity_check_m2ee_stats(m2ee_stats)
         stats["mendix_runtime"] = m2ee_stats
     except Exception:
         logging.debug("Unable to get metrics from runtime")
     finally:
         return stats
Beispiel #2
0
    def _inject_m2ee_stats(self, stats):
        try:
            m2ee_stats, java_version = munin.get_stats_from_runtime(
                self.m2ee.client, self.m2ee.config)
            if "sessions" in m2ee_stats:
                m2ee_stats["sessions"]["user_sessions"] = {}
            m2ee_stats = munin.augment_and_fix_stats(
                m2ee_stats, self.m2ee.runner.get_pid(), java_version)

            critical_logs_count = len(
                self.m2ee.client.get_critical_log_messages())
            m2ee_stats["critical_logs_count"] = critical_logs_count
            stats["mendix_runtime"] = m2ee_stats
        except Exception:
            logging.debug("Unable to get metrics from runtime")
        finally:
            return stats
Beispiel #3
0
 def _get_munin_stats(self):
     m2ee_stats, _ = munin.get_stats_from_runtime(self.m2ee.client,
                                                  self.m2ee.config)
     return m2ee_stats