Hi guys, I'm the author of a addon to Ganglia that reports batch clusters job statistics and information in the webfrontend.
Right now - among other things - I make use of a daemon that submits all the jobs information as a whole bunch of gmetrics (written in Python). Now I've been looking at how the Python modules are going to work and it would be great if for the future Ganglia modules, people could just load it as a module in stead of running it as a daemon (while still supporting that for backwards compatibility). However I think I've run into a problem now. If I understand correctly, every (python) module is initialized first with: metric_init(): And then it should return a (static) list of metrics that module is going to report. Am I correct to understand that after this init, the amount and names of the gmetrics reported by the module cannot change anymore from the list returned by metric_init? For my particular purpose, the amount of gmetrics and their names vary each time it is polled. This is because I submit the job information as metrics named after their jobid in the batch system, for example: <METRIC NAME="MONARCH-JOB-56372-0" VAL="status=R start_timestamp=1184925586 name=STDIN poll_interval=30 domain=gina.sara.nl queue=short reported=1184926420 requested_time=04:00:00 queued_timestamp=1184925585 owner=lhcb008 nodes=wn02" TYPE="string" UNITS="" TN="17" TMAX="60" DMAX="60" SLOPE="both" SOURCE="gmetric"/> Since the jobs ids/amounts may/will vary at each polling interval, the metric names, amount and list changes each time it is executed. Now it would be great if I could 'simply' "modulize" my code by adding a couple of Ganglia/gmond specific functions that spit out the Gmetrics in a form that gmond wants to, but it seems with the current (metric) initilization setup as described in the README and example.py my code will never work and would require significant rewrite of my web addon. Is there any way the (python) module support could be changed to support a dynamic/changing list/names of Gmetrics? Or is that technically difficult to achieve in gmond, with regard to memory allocation etc? I can imagine that authors of other scripts/modules might encounter the same issue later on. For example for other changing/dynamic system resources that they would like reported from a module. *phew* someone read all the way up till here. ;) Or am I completely missing the boat here? Cheers, - Ramon. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers
