zarplata / zabbix-agent-extension-mysql

Zabbix extension for monitoring mysql.
23 stars 18 forks source link

No Slave data in Zabbix #3

Closed ahbruinsma closed 6 years ago

ahbruinsma commented 6 years ago

Hello,

I've installed everything according to the doc, but I don't see any data in Zabbix for this machine. The only stats number which I see is Number of running Mysql, which is 2 apparently.

When running /usr/bin/zabbix-agent-extension-mysql -m 127.0.0.1:3306 --user zabbix --pass zabbix --discovery, I get:

{"data":[{"{#TYPE}":"galera"},{"{#TYPE}":"slave"}]}

And when running nc -l -p 10051 and /usr/bin/zabbix-agent-extension-mysql --type mysql -z 127.0.0.1:

ZBXD▒{"request":"sender data","data":[{"host":"sentry","key":"mysql.Aborted_clients.[mysql]","value":"4","clock":1531198605},{"host":"sentry","key":"mysql.Aborted_connects.[mysql]","value":"36544","clock":1531198605},{"host":"sentry","key":"mysql.Innodb_rows_deleted.[mysql]","value":"10576602","clock":1531198605},{"host":"sentry","key":"mysql.Innodb_rows_inserted.[mysql]","value":"12592798","clock":1531198605},{"host":"sentry","key":"mysql.Innodb_rows_read.[mysql]","value":"1080566589","clock":1531198605},{"host":"sentry","key":"mysql.Innodb_rows_updated.[mysql]","value":"190552776","clock":1531198605},{"host":"sentry","key":"mysql.Com_begin.[mysql]","value":"246001943","clock":1531198605},{"host":"sentry","key":"mysql.Com_commit.[mysql]","value":"246001943","clock":1531198605},{"host":"sentry","key":"mysql.Com_rollback.[mysql]","value":"0","clock":1531198605},{"host":"sentry","key":"mysql.Com_delete.[mysql]","value":"19388949","clock":1531198605},{"host":"sentry","key":"mysql.Com_insert.[mysql]","value":"14701782","clock":1531198605},{"host":"sentry","key":"mysql.Com_select.[mysql]","value":"636614","clock":1531198605},{"host":"sentry","key":"mysql.Com_update.[mysql]","value":"211902306","clock":1531198605},{"host":"sentry","key":"mysql.Queries.[mysql]","value":"611657481","clock":1531198605},{"host":"sentry","key":"mysql.Slow_queries.[mysql]","value":"0","clock":1531198605},{"host":"sentry","key":"mysql.Uptime.[mysql]","value":"10691336","clock":1531198605},{"host":"sentry","key":"mysql.Threads_running.[mysql]","value":"2","clock":1531198605},{"host":"sentry","key":"mysql.Bytes_received.[mysql]","value":"742709057113","clock":1531198605},{"host":"sentry","key":"mysql.Bytes_sent.[mysql]","value":"748511737330","clock":1531198605}],"clock":1531198605}

There is a lot of data in there, but why don't I see those numbers in Zabbix?

tears-of-noobs commented 6 years ago

@ahbruinsma Hi. Can you show me Latest data of your host? And tell me, your host in Zabbix has the sentry hostname?

ahbruinsma commented 6 years ago

@tears-of-noobs Changing the hostname of the OS to the exact name of what was setup in Zabbix was the solution, suddenly all the data is there. The config of Zabbix already had the complete hostname, but apperantly you need to set the hostname on the OS as well.

So no problems anymore, thanks for pointing that out!