Hello,
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...).

I've read the collectd-python manpage but I still haven't figured out how to
send multiple datasets to the same graph.

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.

import random
import collectd

def read(data=None):
    vl = collectd.Values(type='gauge')
    vl.plugin = 'python.spam'
    vl.dispatch(values=[random.random() * 100])

def write(vl, data=None):
    for i in vl.values:
        print "%s (%s): %f" % (vl.plugin, vl.type, i)

collectd.register_read(read)
collectd.register_write(write)
_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd

Reply via email to