foxdalas / sphinx_exporter Goto Github PK
View Code? Open in Web Editor NEWExports metrics from sphinx servers for consumption by Prometheus.
License: MIT License
Exports metrics from sphinx servers for consumption by Prometheus.
License: MIT License
When the exporter is unable to connect to sphinx server at startup, the exporter dies due to a stack overflow
. A gist of the stack trace is this:
INFO[0000] Starting sphinx_exporter (version=0.0.2, branch=master, revision=01fbd50db7193cef6ce37ed527e3a1c7494b6695) source="main.go:658"
INFO[0000] Build context (go=go1.11.1, user=root@f7cd2537cfdd, date=20181031-08:51:54) source="main.go:659"
INFO[0000] Starting HTTP server on :9247 source="main.go:673"
runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow
runtime stack:
runtime.throw(0x8d296f, 0xe)
/usr/local/go/src/runtime/panic.go:608 +0x72
runtime.newstack()
/usr/local/go/src/runtime/stack.go:1008 +0x729
runtime.morestack()
/usr/local/go/src/runtime/asm_amd64.s:429 +0x8f
goroutine 21 [running]:
main.printerror(0xc000097380, 0x949fa0, 0xc00008ed70, 0xc00019e000)
/go/src/github.com/foxdalas/sphinx_exporter/main.go:637 +0xbd fp=0xc0201c2328 sp=0xc0201c2320 pc=0x7d7e2d
main.printerror(0xc000097380, 0x949fa0, 0xc00008ed70, 0xc00019e000)
/go/src/github.com/foxdalas/sphinx_exporter/main.go:639 +0x4d fp=0xc0201c2388 sp=0xc0201c2328 pc=0x7d7dbd
main.printerror(0xc000097380, 0x949fa0, 0xc00008ed70, 0xc00019e000)
/go/src/github.com/foxdalas/sphinx_exporter/main.go:639 +0x4d fp=0xc0201c23e8 sp=0xc0201c2388 pc=0x7d7dbd
main.printerror(0xc000097380, 0x949fa0, 0xc00008ed70, 0xc00019e000)
/go/src/github.com/foxdalas/sphinx_exporter/main.go:639 +0x4d fp=0xc0201c2448 sp=0xc0201c23e8 pc=0x7d7dbd
main.printerror(0xc000097380, 0x949fa0, 0xc00008ed70, 0xc00019e000)
/go/src/github.com/foxdalas/sphinx_exporter/main.go:639 +0x4d fp=0xc0201c24a8 sp=0xc0201c2448 pc=0x7d7dbd
main.printerror(0xc000097380, 0x949fa0, 0xc00008ed70, 0xc00019e000)
/go/src/github.com/foxdalas/sphinx_exporter/main.go:639 +0x4d fp=0xc0201c2508 sp=0xc0201c24a8 pc=0x7d7dbd
[many repeated lines]
...additional frames elided...
created by github.com/foxdalas/sphinx_exporter/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Gather
/go/src/github.com/foxdalas/sphinx_exporter/vendor/github.com/prometheus/client_golang/prometheus/registry.go:381 +0x302
Looking at main.go
source code, I've the feeling there's an infinite recursion at line 639. May you explain the purpose of that line, please?
Thanks,
Marco
Hi,
Does it work with manticore search?
Steps to reproduce
# docker run --rm -it foxdalas/sphinx-exporter:v0.1.0
standard_init_linux.go:228: exec user process caused: no such file or directory
Then some debug:
# docker run --rm -it --entrypoint=sh foxdalas/sphinx-exporter:v0.1.0
/ # ls -lah /bin/sphinx_exporter
-rwxr-xr-x 1 root root 8.4M Dec 27 09:29 /bin/sphinx_exporter
/ # /bin/sphinx_exporter
sh: /bin/sphinx_exporter: not found
/ # file /bin/sphinx_exporter
/bin/sphinx_exporter: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=73P0s5YKkefPXvH5yrc0/pain-d_RTIRiUpco8NMS/h6Sxie90oBypkw18qH1J/saA34-lO2D5nUEce6gPW, stripped
/ # ls -lah /lib64/ld-linux-x86-64.so.2
ls: /lib64/ld-linux-x86-64.so.2: No such file or directory
We should install apk package libc6-compat with /lib64/ld-linux-x86-64.so.2, because we using alpine image or build sphinx_exporter with statically linked library.
https://pkgs.alpinelinux.org/contents?file=ld-linux-x86-64*&path=&name=&branch=v3.15&repo=main
ERROR: packets.go:428: busy buffer
Sphinx 2.1.9-id64-release
Try to use sphinx-exporter geting the error:
time="2022-02-07T09:52:09Z" level=error msg="sql: expected 5 destination arguments in Scan, not 14" source="main.go:608"
time="2022-02-07T09:52:24Z" level=error msg="Error 1040: Too many connections" source="main.go:432"
As I see it were broken in #10
Hello !
Would you mind adding a license file to the repo ? I need this to be able to use the software.
Thanks!
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.