Open Sopamo opened 5 years ago
Hi @Sopamo . This behavior is fine. OK
means that the extension successfully gets metrics from your MySQL server and send it to Zabbix
server. Be note that hostname of your server (where you execute extension) should be the same as on Zabbix
server. If you wanna see the metrics in a terminal - use ngrep
ngrep port 10051
Thank you for your fast response.
I double checked the hostname, it is identical in the zabbix configuration to the value of the command hostname
and also in the configuration file of the zabbix agent.
I also checked the network traffic via ngrep
. There are packets being sent, but they contain no data:
ngrep port 30051 -e
interface: eth0 (server/255.255.255.255)
filter: (ip or ip6) and ( port 30051 )
T agent:57066 -> server:30051 [A]
#
T agent:57066 -> server:30051 [AP]
ZBXD.3.......{"request":"active checks","host":"hostname"}
#
T server:30051 -> agent:57066 [A]
#
T server:30051 -> agent:57066 [AP]
ZBXD. .......{"response":"success","data":[]}
#
T server:30051 -> agent:57066 [AF]
#
T agent:57066 -> server:30051 [A]
...
I'm running the server on port 30051 instead of 10051. I did configure the agent accordingly and communication seems to be working, so this shouldn't be a problem, right? Is there a way to check if the mysql script is able to fetch data from the mysql server?
Seems I know what's the problem. It's here https://github.com/zarplata/zabbix-agent-extension-mysql/blob/master/main.go#L36. Port of Zabbix
server is non-configurable through a template. I'll notify you when fixed it.
Thanks a lot! This was the issue, I manually specified the port in the zabbix-agent-extension-mysql.conf file and now it's working perfectly. Would be great if we could set the port in the template, but for me it's not necessary at the moment.
I already enabled logging to see what might be the issue, and it seems like the agent just doesn't send anything. (I replaced all ips and passwords with placeholders, the correct values are used on the server)
When I execute the command manually:
It just returns:
I expected it to return all the status data next to "OK". Is that not a correct assumption? In the web interface I see a value for mysql processes, but everything else shows "no data". Could you give me a pointer on where to debug further?