# parse passed command line arguments
modules = parse_cmdline(MODULES_DIR, *sys.argv)
msg.DEBUG_FLAG = DEBUG_FLAG
- modules = ['sensors']
msg.info("MODULES_DIR='" + MODULES_DIR +
"', CONFIG_DIR='" + CONFIG_DIR +
"', UPDATE_EVERY=" + str(BASE_CONFIG['update_every']) +
p = self._format(type_id, name, title, units, family, category, charttype, priority, update_every)
self._line("CHART", *p)
-
-
def dimension(self, id, name=None, algorithm="absolute", multiplier=1, divisor=1, hidden=False):
"""
Defines a new dimension for the chart
if algorithm not in ("absolute", "incremental", "percentage-of-absolute-row", "percentage-of-incremental-row"):
algorithm = "absolute"
- self._dimensions.append(id)
+ self._dimensions.append(str(id))
if hidden:
p = self._format(id, name, algorithm, multiplier, divisor, "hidden")
#self._line("DIMENSION", id, name, algorithm, str(multiplier), str(divisor), "hidden")
:return: boolean
"""
if id not in self._dimensions:
- self.error("wrong dimension id:", id)
+ self.error("wrong dimension id:", id, "Available dimensions are:", *self._dimensions)
return False
try:
value = str(int(value))