Code Monkey home page Code Monkey logo

nsq_exporter's Introduction

NSQ Exporter

GoDoc Build Status

NSQ exporter for prometheus.io, written in go.

Usage

docker run -d --name nsq_exporter -l nsqd:nsqd -p 9117:9117 lovoo/nsq_exporter:latest -nsq.addr=http://nsqd:4151 -collectors=nsqstats

Building

make

OR

go get -u github.com/lovoo/nsq_exporter
go install github.com/lovoo/nsq_exporter

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

nsq_exporter's People

Contributors

0x46616c6b avatar ickymettle avatar nordicdyno avatar tecbot avatar zwopir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nsq_exporter's Issues

Don't implement TODO multi-nsqd support

Hi,

I'm looking for a nsqd exporter and came across this project. Awesome!
For now, I just want to say I would recommend to run one exporter instance per nsqd instance and not implement discovery via nsqlookupd because it make it easier to isolate failures to specific instances and leave the instance labeling to prometheus. This is generally considered best practice in the prometheus community.

Panic in ChannelStats

goroutine 51 [running]:
panic(0x80c8a0, 0xc820010050)
        /usr/lib/go/src/runtime/panic.go:481 +0x3e6
github.com/lovoo/nsq_exporter/collector.ChannelStats.func6(0xc820206090, 0xc820294cf0)
        /go/src/github.com/lovoo/nsq_exporter/collector/stats_channel.go:62 +0x99
github.com/lovoo/nsq_exporter/collector.channelStats.collect(0xc8200a7400, 0xa, 0xa, 0xc820216018, 0xc82000cba0)
        /go/src/github.com/lovoo/nsq_exporter/collector/stats_channel.go:115 +0x3cf
github.com/lovoo/nsq_exporter/collector.(*channelStats).collect(0xc820108920, 0xc820216018, 0xc82000cba0)
        <autogenerated>:3 +0xb5
github.com/lovoo/nsq_exporter/collector.(*NsqdStats).Collect.func1(0xc820216018, 0xc82000cba0, 0xc8202912e0, 0x7f754ac27a10, 0xc820108920)
        /go/src/github.com/lovoo/nsq_exporter/collector/nsqd.go:54 +0x3b
created by github.com/lovoo/nsq_exporter/collector.(*NsqdStats).Collect
        /go/src/github.com/lovoo/nsq_exporter/collector/nsqd.go:56 +0x184
2016/08/09 07:19:08 listening to :9117
panic: runtime error: index out of range

nsq_exporter not collect any data

Hello,

Wnen we trying running nsq_exporter by:
version: '2'
services:
nsqlookupd:
image: nsqio/nsq
command: /nsqlookupd -broadcast-address=nsqlookupd
restart: always
ports:
- "4160:4160"
- "4161:4161"
nsqd:
image: nsqio/nsq
command: /nsqd --lookupd-tcp-address=nsqlookupd:4160 --data-path=/data --broadcast-address=nsqd
restart: always
volumes:
- nsq_data:/data
ports:
- "4150:4150"
- "4151:4151"
nsqadmin:
image: nsqio/nsq
command: /nsqadmin --lookupd-http-address=nsqlookupd:4161
restart: always
ports:
- "4171:4171"
nsq_exporter:
image: lovoo/nsq_exporter:latest
restart: always
command:
- '-nsqd.addr=http://nsqd:4151/stats'
- '-collect=stats.topics,stats.channels,stats.clients'
ports:
- "9117:9117"

volumes:
nsq_data: {}

they not collecnt any data:
go_memstats_alloc_bytes 1.610192e+06
go_memstats_alloc_bytes_total 2.4429984e+07
go_memstats_buck_hash_sys_bytes 1.444735e+06
go_memstats_frees_total 30021
go_memstats_gc_sys_bytes 475136
go_memstats_heap_alloc_bytes 1.610192e+06
go_memstats_heap_idle_bytes 5.808128e+06
go_memstats_heap_inuse_bytes 2.121728e+06
go_memstats_heap_objects 5940
go_memstats_heap_released_bytes 0
go_memstats_heap_sys_bytes 7.929856e+06
go_memstats_last_gc_time_seconds 1.4992581719082916e+09
go_memstats_lookups_total 287
go_memstats_mallocs_total 35961
go_memstats_mcache_inuse_bytes 2400
go_memstats_mcache_sys_bytes 16384
go_memstats_mspan_inuse_bytes 24000
go_memstats_mspan_sys_bytes 32768
go_memstats_next_gc_bytes 4.194304e+06
go_memstats_other_sys_bytes 789881
go_memstats_stack_inuse_bytes 458752
go_memstats_stack_sys_bytes 458752
go_memstats_sys_bytes 1.1147512e+07
http_request_duration_microseconds{handler="prometheus",quantile="0.5"} 1768.584
http_request_duration_microseconds{handler="prometheus",quantile="0.9"} 5565.156
http_request_duration_microseconds{handler="prometheus",quantile="0.99"} 15772.45
http_request_duration_microseconds_sum{handler="prometheus"} 71702.471
http_request_duration_microseconds_count{handler="prometheus"} 26
http_request_size_bytes{handler="prometheus",quantile="0.5"} 276
http_request_size_bytes{handler="prometheus",quantile="0.9"} 276
http_request_size_bytes{handler="prometheus",quantile="0.99"} 276
http_request_size_bytes_sum{handler="prometheus"} 6963
http_request_size_bytes_count{handler="prometheus"} 26
http_requests_total{code="200",handler="prometheus",method="get"} 26
http_response_size_bytes{handler="prometheus",quantile="0.5"} 1447
http_response_size_bytes{handler="prometheus",quantile="0.9"} 1467
http_response_size_bytes{handler="prometheus",quantile="0.99"} 7046
http_response_size_bytes_sum{handler="prometheus"} 42655
http_response_size_bytes_count{handler="prometheus"} 26
nsq_exporter_scrape_duration_seconds{result="success",quantile="0.5"} 0.0007699250000000001
nsq_exporter_scrape_duration_seconds{result="success",quantile="0.9"} 0.001025803
nsq_exporter_scrape_duration_seconds{result="success",quantile="0.99"} 0.014166406000000001
nsq_exporter_scrape_duration_seconds_sum{result="success"} 0.03366974
nsq_exporter_scrape_duration_seconds_count{result="success"} 26
process_cpu_seconds_total 0.09
process_max_fds 65536
process_open_fds 8
process_resident_memory_bytes 1.2742656e+07
process_start_time_seconds 1.49925804813e+09
process_virtual_memory_bytes 1.8702336e+07

How we can fix that?

Thank you.

rename depth and backend_depth to match other *_counter ?

I feel like the metric names could be made more consistent.
Every gauge exported by nsq_exporter uses _counter as its suffix, except depth and backend_depth.

Any thoughts on updating their names?

When aggregating, it's somewhat jarring to see two metrics with different suffixes being added together:

The expression (depth + in_flight_count) looks strange...
even though they're both gauges.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.