ganglia / gmetric4j Goto Github PK
View Code? Open in Web Editor NEWgmetric and basic gmond functionality in Java
License: Other
gmetric and basic gmond functionality in Java
License: Other
Name gmetric4j - gmetric and gmond functionality in Java Version The latest version of this software and document will always be found at http://github.com/ganglia/gmetric4j Synopsis gmetric4j is a 100% java, configurable Ganglia agent that periodically polls arbitrary attributes and reports their values to Ganglia. It supports both the v3.1 wire format and the legacy wire format. This code is based on the jmxetric project code. It has been generalized for use in non-JMX situations (e.g. any Java app, Android app, ...). The JMX support could be re-implemented on top of these generalized classes without significant difficulty. The gmetric4j protocol implementation uses classes generated by the LGPL remotetea project (http://remotetea.sf.net). Copyright Copyright (C) 2010-2015 Daniel Pocock <[email protected]> Copyright (c) 2008-2011 Jasper Humphrey <[email protected]>
Hi~
I found that gmetric4j always send a metric as string but the type that is included in the metadata show actual data type such as double, long.
you can see the code at here: https://github.com/ganglia/gmetric4j/blob/master/src/main/java/info/ganglia/gmetric4j/gmetric/Protocolv31x.java#L138
Is there any reason for do that?
Hello,
I am currently working on porting jmxtrans (which use your project for a GangliaWriter) to maven but I am facing a problem with the gmetric4j jar version currently used which seems to have been built manually. When I use the last gmetric4j from maven central (info.ganglia.gmetric4j:gmetric4j:1.0.2), I see that the Spoofing Support is missing in the jar.
As the Spoofing Support was recently merged in the master (#4) I would like to know if it is possible for you to release a new version of gmetric4j to have this change in Maven Central ?
Thanks in advance for your response
Frederic
I maintain Metrics which is Apache 2 licensed, and has ganglia as an output. It was brought to my attention that gmetric4j has a dependency on remotetea, which as you know is LGPL licensed. This severely limits its usefulness. Having inspected the code, it seems to me that it would be relatively trivial[citation needed] to reimplement the parts of XDR which are required by ganglia. Is this something you would consider?
Protocolv31x.java line 39 InetAddress.getLocalHost().getHostName();
On some machine configurations, getLocalHost() throws UnknownHostException
For example, on a developer machine that does not have a static ip address configured into /etc/hosts for the machine host name, this pesky problem prevents gmetric4j from initializing, even when a spoofName is set.
If we skip getLocalHost() when spoofName is set (since localHostName would not be used), there would be a workaround for this situation.
It would be very useful to read all the default settings from the gmond.conf file if it can be found in one of the usual locations.
It may also be possible to inspect the list of open sockets of any running gmond process to discover configuration details.
I'm getting the following error when sending a metric with 10 attributes. How can I increase this buffer?
I tried changing the udp receive buffer in gmond to 20 mb but that did not help.
info.ganglia.gmetric4j.gmetric.GangliaException: Exception announcing metric
at info.ganglia.gmetric4j.gmetric.GMetric.announce(GMetric.java:138)
at com.googlecode.jmxtrans.model.output.GangliaWriter.internalWrite(GangliaWriter.java:203)
at com.googlecode.jmxtrans.model.output.BaseOutputWriter.doWrite(BaseOutputWriter.java:157)
at com.googlecode.jmxtrans.jmx.ResultProcessor$1.run(ResultProcessor.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.acplt.oncrpc.OncRpcException: ONC/RPC buffer overflow
at org.acplt.oncrpc.XdrBufferEncodingStream.xdrEncodeOpaque(XdrBufferEncodingStream.java:198)
at org.acplt.oncrpc.XdrEncodingStream.xdrEncodeOpaque(XdrEncodingStream.java:167)
at org.acplt.oncrpc.XdrEncodingStream.xdrEncodeDynamicOpaque(XdrEncodingStream.java:148)
at org.acplt.oncrpc.XdrEncodingStream.xdrEncodeString(XdrEncodingStream.java:358)
at info.ganglia.gmetric4j.xdr.v31x.Ganglia_extra_data.xdrEncode(Ganglia_extra_data.java:25)
at info.ganglia.gmetric4j.xdr.v31x.Ganglia_metadata_message.xdrEncode(Ganglia_metadata_message.java:35)
at info.ganglia.gmetric4j.xdr.v31x.Ganglia_metadatadef.xdrEncode(Ganglia_metadatadef.java:25)
at info.ganglia.gmetric4j.xdr.v31x.Ganglia_metadata_msg.xdrEncode(Ganglia_metadata_msg.java:36)
at info.ganglia.gmetric4j.gmetric.Protocolv31x.encodeGMetric(Protocolv31x.java:131)
at info.ganglia.gmetric4j.gmetric.Protocolv31x.announce(Protocolv31x.java:73)
at info.ganglia.gmetric4j.gmetric.GMetric.announce(GMetric.java:136)
... 8 more
In the 3.1 version of the protocol, the spoof boolean is hard set to false.
Hello,
I am migrating from metrics 2 to 3.
In the old yammer metrics' GangliaReporter class, there are two String arguments specifying the host and the "ganglia group name".
GangliaReporter(MetricsRegistry metricsRegistry, String gangliaHost, int port, String groupPrefix)
But following their new API, i.e using a GMetric object to configure the reporter, there is only one "group" argument described in the doc as "the host/group to send the event to".
public GMetric( String group, int port, UDPAddressingMode mode, int ttl)
As I am relatively new to the concepts involved here, do you have an idea how I could specify the old GangliaReporter's host and group arguments into a GMetric Object?
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.