|
From: Robert J. <rj...@no...> - 2011-05-16 19:52:00
|
Also, the Windows agent currently allows only a single collector whereas the linux (and other) agents allow for multiple. It's all planned for support if I ever find the time. Thanks for taking on some of it Nicholas and just let us know if you're interested in adding any of the other features. Thanks, Robert On Mon, May 16, 2011 at 9:26 AM, Peter Phaal <pet...@in...> wrote: > It is a good idea to allow the destination port to be settable on the > Windows platform - it is configurable on the other platforms. > > The latest version of Ganglia allows the sFlow listen port to be set > differently for each gmond instance, but to make use of this capability, the > port needs to be settable at the sending end. > > There is also work under way to add DNS-SD support to the Windows sFlow > agent. Is this something you might use? It would allow you to reconfigure > sFlow settings across the the Windows clusters simply by changing a record > on the DNS server: > > http://blog.sflow.com/2010/06/dns-sd.html > > On May 16, 2011, at 8:59 AM, <nic...@no...> wrote: > > > Hi all, > > > > We want to send metrics to different Ganglia gmond’s on the same Linux > server so that we could have each gmond assigned to collect metrics from > different windows clusters. I couldn’t work out how to do it without > modifying the code so I wrote a patch for the windows agent to allow you to > specify a UDP port number for the destination (if this wasn’t necessary > please let me know how else I could have done it -- thanks). > > > > The port number will remain as the default unless the following DWORD > registry entry exists: > > > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hsflowd\Parameters\port > > > > --- a/hsflowconfig.c 2011-05-12 00:43:45.000000000 +0100 > > +++ b/hsflowconfig.c 2011-05-16 16:35:24.033451001 +0100 > > @@ -39,7 +39,6 @@ extern int debug; > > HSPCollector *col = (HSPCollector *)my_calloc(sizeof(HSPCollector)); > > ADD_TO_LIST(sf->collectors, col); > > sf->numCollectors++; > > - col->udpPort = SFL_DEFAULT_COLLECTOR_PORT; > > return col; > > } > > > > @@ -49,6 +48,7 @@ extern int debug; > > DWORD dwRet,cbData = 16; > > HKEY hkey; > > char collector_ip[16]; > > + uint32_t collector_port; > > int gotData = NO; > > struct sockaddr_in *sendSocketAddr; > > > > @@ -75,6 +75,18 @@ extern int debug; > > &cbData ); > > if(dwRet != ERROR_SUCCESS) return gotData; > > > > + cbData = sizeof(collector_port); > > + dwRet = RegQueryValueEx( hkey, > > + "port", > > + NULL, > > + NULL, > > + (LPBYTE) &collector_port, > > + &cbData ); > > + if(dwRet == ERROR_SUCCESS) > > + col->udpPort = collector_port; > > + else > > + col->udpPort = SFL_DEFAULT_COLLECTOR_PORT; > > + > > gotData = YES; > > col->ipAddr.address.ip_v4.addr = inet_addr(collector_ip); > > col->ipAddr.type = SFLADDRESSTYPE_IP_V4; > > @@ -83,6 +95,7 @@ extern int debug; > > sendSocketAddr->sin_addr.s_addr = col->ipAddr.address.ip_v4.addr; > > > > myLog(LOG_INFO,"collector: %s",collector_ip); > > + myLog(LOG_INFO," port: %s",collector_port); > > > > return gotData; > > } > > > > The problem though it that when I try to compile it I get the following > errors with the REL1_16 code branch in SVN… > > > > readSystemUUID.c > > > z:\home\svn\host-sflow-r188\tags\rel-1_16\src\windows\hsflowd\hsflowd\readsystemuuid.c(61) > : error C2440: 'function' : cannot convert from 'const CLSID' to 'const IID > *const ' > > > z:\home\svn\host-sflow-r188\tags\rel-1_16\src\windows\hsflowd\hsflowd\readsystemuuid.c(61) > : warning C4024: 'CoCreateInstance' : different types for formal and actual > parameter 1 > > > z:\home\svn\host-sflow-r188\tags\rel-1_16\src\windows\hsflowd\hsflowd\readsystemuuid.c(61) > : error C2440: 'function' : cannot convert from 'const IID' to 'const IID > *const ' > > > z:\home\svn\host-sflow-r188\tags\rel-1_16\src\windows\hsflowd\hsflowd\readsystemuuid.c(61) > : warning C4024: 'CoCreateInstance' : different types for formal and actual > parameter 4 > > > z:\home\svn\host-sflow-r188\tags\rel-1_16\src\windows\hsflowd\hsflowd\readsystemuuid.c(68) > : error C2039: 'ConnectServer' : is not a member of 'IWbemLocator' > > c:\program files\microsoft > sdks\windows\v6.0a\include\wbemcli.h(2230) : see declaration of > 'IWbemLocator' > > > z:\home\svn\host-sflow-r188\tags\rel-1_16\src\windows\hsflowd\hsflowd\readsystemuuid.c(69) > : error C2039: 'Release' : is not a member of 'IWbemLocator' > > c:\program files\microsoft > sdks\windows\v6.0a\include\wbemcli.h(2230) : see declaration of > 'IWbemLocator' > > > z:\home\svn\host-sflow-r188\tags\rel-1_16\src\windows\hsflowd\hsflowd\readsystemuuid.c(76) > : error C2039: 'CreateInstanceEnum' : is not a member of 'IWbemServices' > > c:\program files\microsoft > sdks\windows\v6.0a\include\wbemcli.h(2071) : see declaration of > 'IWbemServices' > > > z:\home\svn\host-sflow-r188\tags\rel-1_16\src\windows\hsflowd\hsflowd\readsystemuuid.c(77) > : error C2039: 'Release' : is not a member of 'IWbemServices' > > c:\program files\microsoft > sdks\windows\v6.0a\include\wbemcli.h(2071) : see declaration of > 'IWbemServices' > > > z:\home\svn\host-sflow-r188\tags\rel-1_16\src\windows\hsflowd\hsflowd\readsystemuuid.c(84) > : error C2039: 'Next' : is not a member of 'IEnumWbemClassObject' > > c:\program files\microsoft > sdks\windows\v6.0a\include\wbemcli.h(2442) : see declaration of > 'IEnumWbemClassObject' > > > z:\home\svn\host-sflow-r188\tags\rel-1_16\src\windows\hsflowd\hsflowd\readsystemuuid.c(85) > : error C2039: 'Release' : is not a member of 'IEnumWbemClassObject' > > c:\program files\microsoft > sdks\windows\v6.0a\include\wbemcli.h(2442) : see declaration of > 'IEnumWbemClassObject' > > > z:\home\svn\host-sflow-r188\tags\rel-1_16\src\windows\hsflowd\hsflowd\readsystemuuid.c(92) > : error C2039: 'Get' : is not a member of 'IWbemClassObject' > > c:\program files\microsoft > sdks\windows\v6.0a\include\wbemcli.h(1071) : see declaration of > 'IWbemClassObject' > > > > I had to go back as far as REL1_13 before I found a code base that would > compile without error and convert the patch to work with it so that I could > test it. The patch worked and so I expect the patch I have included here for > REL1_16 to work also. > > > > I’d be interested to know if this is of use to anyone. > > > > Regards, > > Nick > > > ------------------------------------------------------------------------------ > > Achieve unprecedented app performance and reliability > > What every C/C++ and Fortran developer should know. > > Learn how Intel has extended the reach of its next-generation tools > > to help boost performance applications - inlcuding clusters. > > > http://p.sf.net/sfu/intel-dev2devmay_______________________________________________ > > host-sflow-discuss mailing list > > hos...@li... > > https://lists.sourceforge.net/lists/listinfo/host-sflow-discuss > > > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > host-sflow-discuss mailing list > hos...@li... > https://lists.sourceforge.net/lists/listinfo/host-sflow-discuss > |