def _configDevBytes(self, namestr, titlestr, devlist): """Generate configuration for I/O Throughput stats. @param namestr: Field name component indicating device type. @param titlestr: Title component indicating device type. @param devlist: List of devices. """ name = 'diskio_%s_bytes' % namestr if self.graphEnabled(name): graph = MuninGraph('Disk I/O - %s - Throughput' % titlestr, self._category, info='Disk I/O - %s Throughput, bytes read / written per second.' % titlestr, args='--base 1000 --lower-limit 0', printf='%6.1lf', vlabel='bytes/sec read (-) / write (+)', autoFixNames = True) for dev in devlist: graph.addField(dev + '_read', fixLabel(dev, maxLabelLenGraphDual, repl = '..', truncend=False, delim = self._labelDelim.get(namestr)), draw='LINE2', type='DERIVE', min=0, graph=False) graph.addField(dev + '_write', fixLabel(dev, maxLabelLenGraphDual, repl = '..', truncend=False, delim = self._labelDelim.get(namestr)), draw='LINE2', type='DERIVE', min=0, negative=(dev + '_read'), info=dev) self.appendGraph(name, graph)
def __init__(self, argv=(), env=None, debug=False): """Populate Munin Plugin with MuninGraph instances. @param argv: List of command line arguments. @param env: Dictionary of environment variables. @param debug: Print debugging messages if True. (Default: False) """ MuninPlugin.__init__(self, argv, env, debug) self.envRegisterFilter('fspaths', '^[\w\-\/]+$') self.envRegisterFilter('fstypes', '^\w+$') self._category = 'Disk Usage' self._statsSpace = None self._statsInode = None self._info = FilesystemInfo() self._fslist = [fs for fs in self._info.getFSlist() if (self.fsPathEnabled(fs) and self.fsTypeEnabled(self._info.getFStype(fs)))] self._fslist.sort() name = 'diskspace' if self.graphEnabled(name): self._statsSpace = self._info.getSpaceUse() graph = MuninGraph('Disk Space Usage (%)', self._category, info='Disk space usage of filesystems.', args='--base 1000 --lower-limit 0', printf='%6.1lf', autoFixNames=True) for fspath in self._fslist: if self._statsSpace.has_key(fspath): graph.addField(fspath, fixLabel(fspath, maxLabelLenGraphSimple, delim='/', repl='..', truncend=False), draw='LINE2', type='GAUGE', info="Disk space usage for: %s" % fspath) self.appendGraph(name, graph) name = 'diskinode' if self.graphEnabled(name): self._statsInode = self._info.getInodeUse() graph = MuninGraph('Inode Usage (%)', self._category, info='Inode usage of filesystems.', args='--base 1000 --lower-limit 0', printf='%6.1lf', autoFixNames=True) for fspath in self._fslist: if self._statsInode.has_key(fspath): graph.addField(fspath, fixLabel(fspath, maxLabelLenGraphSimple, delim='/', repl='..', truncend=False), draw='LINE2', type='GAUGE', info="Inode usage for: %s" % fspath) self.appendGraph(name, graph)
def _configDevActive(self, namestr, titlestr, devlist): """Generate configuration for I/O Queue Length. @param namestr: Field name component indicating device type. @param titlestr: Title component indicating device type. @param devlist: List of devices. """ name = 'diskio_%s_active' % namestr if self.graphEnabled(name): graph = MuninGraph( 'Disk I/O - %s - Queue Length' % titlestr, 'Disk I/O', info= 'Disk I/O - Number of I/O Operations in Progress for every %s.' % titlestr, args='--base 1000 --lower-limit 0', printf='%6.1lf', autoFixNames=True) for dev in devlist: graph.addField(dev, fixLabel(dev, maxLabelLenGraphSimple, repl='..', truncend=False, delim=self._labelDelim.get(namestr)), draw='AREASTACK', type='GAUGE', info=dev) self.appendGraph(name, graph)
def _configDevBytes(self, namestr, titlestr, devlist): """Generate configuration for I/O Throughput stats. @param namestr: Field name component indicating device type. @param titlestr: Title component indicating device type. @param devlist: List of devices. """ name = 'diskio_%s_bytes' % namestr if self.graphEnabled(name): graph = MuninGraph( 'Disk I/O - %s - Throughput' % titlestr, 'Disk I/O', info= 'Disk I/O - %s Throughput, bytes read / written per second.' % titlestr, args='--base 1000 --lower-limit 0', printf='%6.1lf', vlabel='bytes/sec read (-) / write (+)', autoFixNames=True) for dev in devlist: graph.addField(dev + '_read', fixLabel(dev, maxLabelLenGraphDual, repl='..', truncend=False, delim=self._labelDelim.get(namestr)), draw='LINE2', type='DERIVE', min=0, graph=False) graph.addField(dev + '_write', fixLabel(dev, maxLabelLenGraphDual, repl='..', truncend=False, delim=self._labelDelim.get(namestr)), draw='LINE2', type='DERIVE', min=0, negative=(dev + '_read'), info=dev) self.appendGraph(name, graph)
def _configDevActive(self, namestr, titlestr, devlist): """Generate configuration for I/O Queue Length. @param namestr: Field name component indicating device type. @param titlestr: Title component indicating device type. @param devlist: List of devices. """ name = 'diskio_%s_active' % namestr if self.graphEnabled(name): graph = MuninGraph('Disk I/O - %s - Queue Length' % titlestr, self._category, info='Disk I/O - Number of I/O Operations in Progress for every %s.' % titlestr, args='--base 1000 --lower-limit 0', printf='%6.1lf', autoFixNames = True) for dev in devlist: graph.addField(dev, fixLabel(dev, maxLabelLenGraphSimple, repl = '..', truncend=False, delim = self._labelDelim.get(namestr)), draw='AREASTACK', type='GAUGE', info=dev) self.appendGraph(name, graph)
def __init__(self, argv=(), env={}, debug=False): """Populate Munin Plugin with MuninGraph instances. @param argv: List of command line arguments. @param env: Dictionary of environment variables. @param debug: Print debugging messages if True. (Default: False) """ MuninPlugin.__init__(self, argv, env, debug) self.envRegisterFilter("fspaths", "^[\w\-\/]+$") self.envRegisterFilter("fstypes", "^\w+$") self._statsSpace = None self._statsInode = None self._info = FilesystemInfo() self._fslist = [ fs for fs in self._info.getFSlist() if (self.fsPathEnabled(fs) and self.fsTypeEnabled(self._info.getFStype(fs))) ] self._fslist.sort() name = "diskspace" if self.graphEnabled(name): self._statsSpace = self._info.getSpaceUse() graph = MuninGraph( "Disk Space Usage (%)", "Disk Usage", info="Disk space usage of filesystems.", args="--base 1000 --lower-limit 0", printf="%6.1lf", autoFixNames=True, ) for fspath in self._fslist: if self._statsSpace.has_key(fspath): graph.addField( fspath, fixLabel(fspath, maxLabelLenGraphSimple, delim="/", repl="..", truncend=False), draw="LINE2", type="GAUGE", info="Disk space usage for: %s" % fspath, ) self.appendGraph(name, graph) name = "diskinode" if self.graphEnabled(name): self._statsInode = self._info.getInodeUse() graph = MuninGraph( "Inode Usage (%)", "Disk Usage", info="Inode usage of filesystems.", args="--base 1000 --lower-limit 0", printf="%6.1lf", autoFixNames=True, ) for fspath in self._fslist: if self._statsInode.has_key(fspath): graph.addField( fspath, fixLabel(fspath, maxLabelLenGraphSimple, delim="/", repl="..", truncend=False), draw="LINE2", type="GAUGE", info="Inode usage for: %s" % fspath, ) self.appendGraph(name, graph)
def __init__(self, argv=(), env=None, debug=False): """Populate Munin Plugin with MuninGraph instances. @param argv: List of command line arguments. @param env: Dictionary of environment variables. @param debug: Print debugging messages if True. (Default: False) """ MuninPlugin.__init__(self, argv, env, debug) self.envRegisterFilter('fspaths', '^[\w\-\/]+$') self.envRegisterFilter('fstypes', '^\w+$') self._category = 'Disk Usage' self._statsSpace = None self._statsInode = None self._info = FilesystemInfo() self._fslist = [ fs for fs in self._info.getFSlist() if (self.fsPathEnabled(fs) and self.fsTypeEnabled(self._info.getFStype(fs))) ] self._fslist.sort() name = 'diskspace' if self.graphEnabled(name): self._statsSpace = self._info.getSpaceUse() graph = MuninGraph('Disk Space Usage (%)', self._category, info='Disk space usage of filesystems.', args='--base 1000 --lower-limit 0', printf='%6.1lf', autoFixNames=True) for fspath in self._fslist: if self._statsSpace.has_key(fspath): graph.addField(fspath, fixLabel(fspath, maxLabelLenGraphSimple, delim='/', repl='..', truncend=False), draw='LINE2', type='GAUGE', info="Disk space usage for: %s" % fspath) self.appendGraph(name, graph) name = 'diskinode' if self.graphEnabled(name): self._statsInode = self._info.getInodeUse() graph = MuninGraph('Inode Usage (%)', self._category, info='Inode usage of filesystems.', args='--base 1000 --lower-limit 0', printf='%6.1lf', autoFixNames=True) for fspath in self._fslist: if self._statsInode.has_key(fspath): graph.addField(fspath, fixLabel(fspath, maxLabelLenGraphSimple, delim='/', repl='..', truncend=False), draw='LINE2', type='GAUGE', info="Inode usage for: %s" % fspath) self.appendGraph(name, graph)