def createMonitorChart(self, host): """Create monitrored server charts.""" stats = self.monitor[host] times = [] cvus_list = [] for stat in stats: test, cycle, cvus = stat.key.split(':') stat.cvus = cvus date = datetime.fromtimestamp(float(stat.time)) times.append(date.strftime("%H:%M:%S")) #times.append(int(float(stat.time))) # - time_start)) cvus_list.append(cvus) Plugins = MonitorPlugins() Plugins.registerPlugins() Plugins.configure(self.getMonitorConfig(host)) charts = [] for plugin in Plugins.MONITORS.values(): image_prefix = gnuplot_scriptpath(self.report_dir, '%s_%s' % (host, plugin.name)) data_prefix = gnuplot_scriptpath(self.report_dir, '%s_%s' % (host, plugin.name)) gplot_path = str( os.path.join(self.report_dir, '%s_%s.gplot' % (host, plugin.name))) r = plugin.gnuplot(times, host, image_prefix, data_prefix, gplot_path, self.chart_size, stats) if r != None: gnuplot(gplot_path) charts.extend(r) return charts
def createMonitorChart(self, host): """Create monitrored server charts.""" stats = self.monitor[host] times = [] cvus_list = [] for stat in stats: test, cycle, cvus = stat.key.split(':') stat.cvus=cvus date = datetime.fromtimestamp(float(stat.time)) #change time format to fix cross day-night display issue times.append(date.strftime("%H:%M:%S-%m/%d")) #times.append(int(float(stat.time))) # - time_start)) cvus_list.append(cvus) Plugins = MonitorPlugins() Plugins.registerPlugins() Plugins.configure(self.getMonitorConfig(host)) charts=[] for plugin in Plugins.MONITORS.values(): image_prefix = gnuplot_scriptpath(self.report_dir, '%s_%s' % (host, plugin.name)) data_prefix = gnuplot_scriptpath(self.report_dir, '%s_%s' % (host, plugin.name)) gplot_path = str(os.path.join(self.report_dir, '%s_%s.gplot' % (host, plugin.name))) r=plugin.gnuplot(times, host, image_prefix, data_prefix, gplot_path, self.chart_size, stats) if r!=None: gnuplot(gplot_path) charts.extend(r) return charts
def createMonitorChart(self, host): """Create monitrored server charts.""" charts = [] Plugins = MonitorPlugins() Plugins.registerPlugins() Plugins.configure(self.getMonitorConfig(host)) for plugin in Plugins.MONITORS.values(): image_path = ('%s_%s' % (host, plugin.name)).replace("\\", "/") charts.append((plugin.name, image_path)) return charts
def createMonitorChart(self, host): """Create monitrored server charts.""" charts = [] Plugins = MonitorPlugins() Plugins.registerPlugins() Plugins.configure(self.getMonitorConfig(host)) for plugin in Plugins.MONITORS.values(): image_path = ('%s_%s' % (host, plugin.name)).replace("\\", "/") charts.append((plugin.name, image_path)) return charts