nsqio/nsq

nsqadmin: does not properly prefix statsd urls

Open

#752 opened on Apr 24, 2016

View on GitHub
 (5 comments) (0 reactions) (0 assignees)Go (25,788 stars) (2,898 forks)batch import
bughelp wanted

Description

I'm a newbie to nsq, graphite, and statsd so I apologize if this is a trivial oversight on my part. I tried to search through the code for where these urls are being generated but I couldn't locate it. Thanks in advance for taking a look at this.

I'm running on nsq 0.3.7 (precompiled binaries). The server is a recently fresh install of Ubuntu 14.04. I just installed graphite, carbon, and statsd using the tutorials at digital ocean (https://www.digitalocean.com/community/tutorials/how-to-install-and-use-graphite-on-an-ubuntu-14-04-server)

I can see that all the data is properly published to statsd by nsqd because I can view the graphs using the graphite browser. However the only graphs that show up correctly in the nsqadmin panel are depth graphs for particular channels.

Here is the url generated for the garbage collection summary of my server.

http://mysite.com/render?colorList=red%2Cgreen%2Cblue%2Cpurple&height=450&width=800&bgcolor=ff000000&fgcolor=999999&yMin=0&lineMode=connected&drawNullAsZero=false&from=-1h&until=-1min&target%5B%5D=summarize(nsq.ServerName.mem.*_bytes%2C%2260sec%22%2C%22avg%22)

In this case, manually appending the stats.gauges prefix makes it work.

...summarize(**stats.gauges.**nsq.ServerName.mem.*_bytes...

For a garbage collection counters, I also have to append ".count" to the end of the statsd url. ...summarize(scale(movingAverage(stats.counters.nsq.ServerName.mem.gc_runs.count...

For a topic depth graph, it is placing "undefined" as the topic name in the url, but the statd prefix is correctly appended. ...sumSeries(stats.gauges.nsq.ServerName.topic.undefined.depth)...

Yet the urls for depths of particular channels on a topic are correctly generated, and the graphs for number of connections to a channel are also correct.

Also the RATE column on the topics page simply displays the text "ERROR".

The counter page of nsqadmin is a blank white screen when I have graphs enabled. In the javascritp consol, the following error is logged.

"main.js:3026 - Uncaught ReferenceError: prefix is not defined"

By the way NSQ is awesome, great work on building this system. Thanks!

Contributor guide