Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql plugin #8

Open
zodman opened this issue Jan 16, 2017 · 1 comment
Open

mysql plugin #8

zodman opened this issue Jan 16, 2017 · 1 comment

Comments

@zodman
Copy link

zodman commented Jan 16, 2017

root@237001:~# /opt/amonagent/amonagent -debug -test-plugin=mysql
panic: runtime error: invalid memory address or nil pointer dereference
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x64b136]

goroutine 1 [running]:
panic(0x742e40, 0xc420012070)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
database/sql.(*Rows).Close(0x0, 0x0, 0x0)
/usr/local/go/src/database/sql/sql.go:1864 +0x26
panic(0x742e40, 0xc420012070)
/usr/local/go/src/runtime/panic.go:458 +0x243
database/sql.(*Rows).Next(0x0, 0x7ded78)
/usr/local/go/src/database/sql/sql.go:1752 +0x26
github.com/amonapp/amonagent/plugins/mysql.(*MySQL).Collect(0xc4200e4ec0, 0x0, 0x0, 0x0, 0x0)
/home/martin/go/src/github.com/amonapp/amonagent/plugins/mysql/mysql.go:287 +0x1d4c
github.com/amonapp/amonagent.(*Agent).TestPlugin(0xc4200e4f00, 0x7ffc0ba277e1, 0x5, 0xc42000b8c0, 0x28)
/home/martin/go/src/github.com/amonapp/amonagent/agent.go:35 +0x197
main.main()
/home/martin/go/src/github.com/amonapp/amonagent/cmd/amonagent.go:101 +0x2d0

My conf:

root@237001:~# cat /etc/opt/amonagent/plugins-enabled/mysql.conf
{"host": "wp:pass@/wp_anime"}

@jyksnw
Copy link
Contributor

jyksnw commented Mar 23, 2017

@zodman did you resolve this issue? It looks like the issue might be related to missing host information form the config.

Try updating:
{"host": "wp:pass@/wp_anime"}

To:
{"host": "wp:[email protected]:3306/wp_anime"} (assuming that your database is local)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants