>>> Ben Hartshorne <[EMAIL PROTECTED]> 10/23/2007 7:23 AM >>> >On Thu, Oct 18, 2007 at 09:04:40PM -0600, Brad Nicholes wrote: >> >>> On 10/18/2007 at 7:25 PM, in message >> <[EMAIL PROTECTED]>, Matthias Blankenhaus <[EMAIL PROTECTED]> wrote: >> >> IMHO enhancing gmetric is irrelevant for 3.1.x. Its usefulness is >> primarily for backwards compatibility. You can accomplish the same >> thing now with a C or python module. In fact you can create a single >> module that will discover hardware and then create metrics on the fly. >> In other words, discover multiple CPUs, disks, network interfaces, >> etc. > >Brad, > >If gmetric is replaced (or obsoleted by) a plugin architecture to gmond, >how will it take care of metrics like this one: >http://ben.hartshorne.net/ganglia/ganglia_apache.pl >The part that I'm not sure about is that at the moment, the above script >is called *by* apache (through a LogFormat pipe) rather than being >called by a cronjob (or by gmond). If gmetric is replaced by plugins to >gmond, how can anything other than gmond initiate inserting a metric >into the stream? > >Caveat - I havn't really looked at the architecture yet, so please >forgive me if the answer is obvious. >
That's pretty cool. I hadn't thought about feeding ganglia with status information by piping it through an apache customlog. As far as the script goes, it could be done in much the same way. The perl script would be fed with the status information from the customlog and keep the counts in memory as it already is. The only difference is that rather than calling gmetric the script would need an interface function that simply returns the current counts. Then the gmond module would just call the interface function whenever gmond needs metric information. If this script were ported to python, all of the code could be in one module rather than a separate gmond module from the perl collection script. Apache could just write the log entries to a named pipe and a python thread running in the gmond python module would simply read the entries from the named pipe as they are written and store the counts in memory. Then whenever gmond needs data, it would call the handler function within the python module and read the counts from memory. This would eliminate apache having to spawn off a perl script and creating the pipes between them. Everything would be contained in the gmond python module and apache wouldn't know the difference. Of course once a gmond perl interface has been implemented, the whole thing could easily be converted to be a gmond perl interface module. Then there is the fact that gmetric will still be there for backward compatibility so the script could just continue to run as it does today. Brad ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Ganglia-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-general

