Hello,<br>I'm running a task scheduler on my server and can extract the number of active tasks from the program. I have several different task "types" and would like the number of active tasks for each type plotted on the SAME graph using collectd (similar to the way multiple datasets are plotted on the cpu graphs. e.g. nice, user, wait etc...).<br>
<br>I've read the collectd-python manpage but I still haven't figured out how to send multiple datasets to the same graph. <br><br>Is there a way to modify (for instance) the sample python plugin (below) in the docs to graph multiple lines corresponding to different data sets like "spam" and "ham", and also label the data points something other than the default "Exec value". Thank you for your time.<br>
<br>import random<br>import collectd<br><br>def read(data=None):<br> vl = collectd.Values(type='gauge')<br> vl.plugin = 'python.spam'<br> vl.dispatch(values=[random.random() * 100])<br><br>def write(vl, data=None):<br>
for i in vl.values:<br> print "%s (%s): %f" % (vl.plugin, vl.type, i)<br><br>collectd.register_read(read)<br>collectd.register_write(write)<br><br>