dark0096 / graphene Goto Github PK
View Code? Open in Web Editor NEWThis project forked from einsamhauer/disthene-reader
A highly scalable real-time metric system
Home Page: https://graphene-monitoring.readthedocs.io
License: MIT License
This project forked from einsamhauer/disthene-reader
A highly scalable real-time metric system
Home Page: https://graphene-monitoring.readthedocs.io
License: MIT License
Currently only JSON response is supported, but it can cause serious performance issue.
The following is code block from ResponseFormatter.java.
for(TimeSeries timeSeries : timeSeriesList) {
List<String> datapoints = new ArrayList<>();
for(int i = 0; i < timeSeries.getValues().length; i++) {
String stringValue;
if (timeSeries.getValues()[i] == null) {
stringValue = "null";
} else {
stringValue = GraphiteUtils.formatDoubleSpecialPlain(timeSeries.getValues()[i]);
}
datapoints.add("[" + stringValue + ", " + (timeSeries.getFrom() + timeSeries.getStep() * i) + "]");
}
results.add("{\"target\": " + gson.toJson(timeSeries.getName()) + ", \"datapoints\": [" + Joiner.on(", ").join(datapoints) + "]}");
}
String responseString = "[" + Joiner.on(", ").join(results) + "]";
Joiner.on(", ").join(datapoints) can be bottleneck if ArrayList 'datapoints' is large because Joiner uses StringBuilder to append each data in String, but the capacity of StringBuilder is not pre-determined, so it continuously copies whole array whenever it exceeds its capacity.
Here is the reference:
https://docs.oracle.com/javase/tutorial/java/data/buffers.html
It is recommend not to use Joiner in this case because it handles arbitrary length of ArrayLists. How about change the code to use StringBuilder directly with proper initialCapacity?
Graphite carbon provides the aggregation config.
And I want to read the metric to use the aggregationMethod.
Reference:
https://graphite.readthedocs.io/en/latest/config-carbon.html#storage-aggregation-conf
Sometimes, disthene-reader does not respond.
ERROR 01.08.2019 13:21:45,492 [nioEventLoopGroup-6-29] net.iponweb.disthene.reader.handler.RenderHandler - org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []
In some cases, metrics that don't match the convention may be published.
Python version of Graphite supports minus index when we query with aliasByNode, sumSeriesWithWildcards,.. and so on.
Please support this to make it work in the same as in original version of Graphite.
I want to aggregate metric's resolution 1d.
But it is failed. :(
So could you check SmartSummerize function for me?
Thanks.
Grafana allows Grahpite datasource to import and use metric paths via the metrics/find
api. There is no support for this and it is inconvenient to use.
Please check the memory leak point in disthene project :(
WARN 10.08.2019 23:57:07,642 [cluster1-nio-worker-3] io.netty.channel.AbstractChannelHandlerContext - An exception 'java.lang.OutOfMemoryError: GC overhead limit exceeded' [enable DEBUG level for full stacktrace] was thrown by a user handler's exceptionCaught() method while handling the following exception:
WARN 10.08.2019 23:56:26,557 [nioEventLoopGroup-4-2] io.netty.util.concurrent.SingleThreadEventExecutor - An event executor terminated with non-empty task queue (50)
Exception in thread "nioEventLoopGroup-4-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
WARN 10.08.2019 23:58:09,616 [cluster1-nio-worker-3] io.netty.channel.AbstractChannelHandlerContext - An exception 'java.lang.OutOfMemoryError: GC overhead limit exceeded' [enable DEBUG level for full stacktrace] was thrown by a user handler's exceptionCaught() method while handling the following exception:
WARN 10.08.2019 23:58:24,854 [nioEventLoopGroup-4-3] io.netty.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
WARN 11.08.2019 00:00:26,726 [cluster1-nio-worker-3] io.netty.channel.AbstractChannelHandlerContext - An exception 'java.lang.OutOfMemoryError: GC overhead limit exceeded' [enable DEBUG level for full stacktrace] was thrown by a user handler's exceptionCaught() method while handling the following exception:
java.lang.OutOfMemoryError: GC overhead limit exceeded
WARN 11.08.2019 00:01:39,674 [nioEventLoopGroup-4-3] io.netty.util.concurrent.SingleThreadEventExecutor - An event executor terminated with non-empty task queue (32)
Exception in thread "nioEventLoopGroup-4-3" java.lang.OutOfMemoryError: GC overhead limit exceeded```
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.