def r_callback(): TendrlBrickDeviceStatsPlugin.CLUSTER_TOPOLOGY = \ gluster_utils.get_gluster_cluster_topology() metrics = TendrlBrickDeviceStatsPlugin().get_metrics() for metric_name, value in metrics.iteritems(): if value is not None: if (isinstance(value, str) and value.isdigit()): value = int(value) gluster_utils.write_graphite( metric_name, value, TendrlBrickDeviceStatsPlugin.CONFIG['graphite_host'], TendrlBrickDeviceStatsPlugin.CONFIG['graphite_port'])
def init(): TendrlGlusterfsMonitoringBase.CLUSTER_TOPOLOGY = \ tendrl_glusterfs_utils.get_gluster_cluster_topology()