← Back to team overview

graphite-dev team mailing list archive

Re: [Question #136096]: Collecting system metrics

 

Question #136096 on Graphite changed:
https://answers.launchpad.net/graphite/+question/136096

Pete Emerson posted a new comment:
As far as a collection agent is concerned, I'd love to contribute back
to Graphite in this way. My python is very raw, however (I'm probably
writing very perlish python). I'd also need to get it approved from the
powers-that-be.

It seems that something as simple as:


for file in glob.glob('path/to/plugins/*'):
        exit_code, result = commands.getstatusoutput(file)
        if exit_code != 0:
                print "Failed to get info from " + file
                continue
        # SEND DATA TO GRAPHITE

would be a minimum viable product. Add a configuration file via
ConfigParser for settings (like debug mode, graphite server / port, et
cetera) and it would be in good shape. Add daemon support for those who
don't want it running in cron and it'd be even better.

Pete

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.



Follow ups