cyanite
cyanite copied to clipboard
facing issues with metrics API
I pulled the latest master branch and created a standalone-jar. I also created tables as per the schema.cql file. Now, when i push the metric using carbon as input, all the 3 tables, metrics, path, segment are being populated correctly. The path API is also working properly. However, when i am trying to fetch the corresponding metrics for the paths, I am getting the following error
http://localhost:8090/metrics?path=com.graphiteData.test.metrics4.data.compressed&from=1465498000
DEBUG [2016-06-12 16:37:06,066] nioEventLoopGroup-3-1 - io.cyanite.api got request: {:uri "/metrics", :get-params {:path "com.graphiteData.test.metrics4.data.compressed", :from "1465498000"}, :body-params nil, :params {:path "com.graphiteData.test.metrics4.data.compressed", :from "1465498000"}, :request-method :get, :version "HTTP/1.1", :headers {:user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36", :upgrade-insecure-requests "1", :host "localhost:8090", :content-length "0", :cookie "grafana_sess=7ab0c9e14152e4ff; grafana_user=admin; grafana_remember=14658092828452b16fe4c1620605e50e256572c407555ffa", :accept-encoding "gzip, deflate, sdch", :connection "keep-alive", :accept-language "en-US,en;q=0.8", :accept "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"}, :body ""}
DEBUG [2016-06-12 16:37:06,066] nioEventLoopGroup-3-1 - io.cyanite.api metric fetch request for: "com.graphiteData.test.metrics4.data.compressed"
ERROR [2016-06-12 16:37:06,071] nioEventLoopGroup-3-1 - io.cyanite.api could not process request
java.lang.NullPointerException: null
at java.util.regex.Matcher.getTextLength(Matcher.java:1283) ~[na:1.8.0_51]
at java.util.regex.Matcher.reset(Matcher.java:309) ~[na:1.8.0_51]
at java.util.regex.Matcher.<init>(Matcher.java:229) ~[na:1.8.0_51]
at java.util.regex.Pattern.matcher(Pattern.java:1093) ~[na:1.8.0_51]
at clojure.core$re_matcher.invokeStatic(core.clj:4674) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core$re_find.invokeStatic(core.clj:4716) ~[cyanite-0.5.1-standalone.jar:na]
at io.cyanite.engine.rule.MetricRule.metric_matches_QMARK_(rule.clj:61) ~[cyanite-0.5.1-standalone.jar:na]
at io.cyanite.engine.rule$__GT_exec_plan$fn__1746.invoke(rule.clj:66) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core$some.invokeStatic(core.clj:2592) ~[cyanite-0.5.1-standalone.jar:na]
at io.cyanite.engine.rule$__GT_exec_plan.invokeStatic(rule.clj:64) ~[cyanite-0.5.1-standalone.jar:na]
at io.cyanite.engine.Engine.resolution(engine.clj:85) ~[cyanite-0.5.1-standalone.jar:na]
at io.cyanite.engine$fn__4782$G__4778__4787.invoke(engine.clj:16) ~[cyanite-0.5.1-standalone.jar:na]
at io.cyanite.engine$fn__4782$G__4777__4793.invoke(engine.clj:16) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core$partial$fn__4763.invoke(core.clj:2529) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core$map$fn__4785.invoke(core.clj:2646) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.lang.RT.seq(RT.java:521) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core$seq__4357.invokeStatic(core.clj:137) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core$filter$fn__4812.invoke(core.clj:2700) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.lang.RT.seq(RT.java:521) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core$seq__4357.invokeStatic(core.clj:137) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:24) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core.protocols$fn__6738.invokeStatic(protocols.clj:75) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core.protocols$fn__6738.invoke(protocols.clj:75) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core.protocols$fn__6684$G__6679__6697.invoke(protocols.clj:13) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core$reduce.invokeStatic(core.clj:6545) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.core$mapv.invokeStatic(core.clj:6618) ~[cyanite-0.5.1-standalone.jar:na]
at io.cyanite.store.CassandraV2Store.fetch_BANG_(store.clj:11) ~[cyanite-0.5.1-standalone.jar:na]
at io.cyanite.store$query_BANG_.invokeStatic(store.clj:108) ~[cyanite-0.5.1-standalone.jar:na]
at io.cyanite.api$fn__7351.invokeStatic(api.clj:139) ~[cyanite-0.5.1-standalone.jar:na]
at io.cyanite.api$fn__7351.invoke(api.clj:131) ~[cyanite-0.5.1-standalone.jar:na]
at clojure.lang.MultiFn.invoke(MultiFn.java:229) ~[cyanite-0.5.1-standalone.jar:na]
at io.cyanite.api$process.invokeStatic(api.clj:89) ~[cyanite-0.5.1-standalone.jar:na]
at io.cyanite.api$make_handler$fn__7360.invoke(api.clj:153) [cyanite-0.5.1-standalone.jar:na]
at io.cyanite.http$request_handler$fn__7081.invoke(http.clj:110) [cyanite-0.5.1-standalone.jar:na]
at io.cyanite.http$netty_handler$fn__7089.invoke(http.clj:125) [cyanite-0.5.1-standalone.jar:na]
at io.cyanite.http.proxy$io.netty.channel.ChannelInboundHandlerAdapter$ff19274a.channelRead(Unknown Source) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:307) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:293) [cyanite-0.5.1-standalone.jar:na]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:307) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:293) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:428) [cyanite-0.5.1-standalone.jar:na]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276) [cyanite-0.5.1-standalone.jar:na]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:263) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:243) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:307) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:293) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:840) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [cyanite-0.5.1-standalone.jar:na]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [cyanite-0.5.1-standalone.jar:na]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [cyanite-0.5.1-standalone.jar:na]
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) [cyanite-0.5.1-standalone.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51]
Here is my cyanite.yaml
engine:
rules:
default: [ "5s:1h" ]
api:
host: 127.0.0.1
port: 8090
input:
- type: carbon
port: 2003
store:
cluster: 'localhost'
keyspace: 'metric'
logging:
level: info
console: true
files:
- "/opt/cyanite/cyanite.log"
overrides:
io.cyanite: "debug"
drift:
type: volatile
index:
type: cassandra
cluster: 'localhost'
keyspace: 'metric'
Cassandra version details -
[cqlsh 5.0.1 | Cassandra 3.5 | CQL spec 3.4.0 | Native protocol v4]
Am i missing any step or using some wrong version of cassandra?
Can someone please look into this and tell me if its a bug or am I doing something wrong? Been struck with this for past few days, tried with different versions of cassandra but no luck :( Thanks in advance.
Sure, we're monitoring issues and will check it out as soon as we have time.
Any updates here?
@paralin there's a PR that waits a review for that