zarplata / zabbix-agent-extension-mysql

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

Unsupported item key for "mysql.discovery,,,slave" #2

Open SmetDenis opened 6 years ago

SmetDenis commented 6 years ago

Hi

I have successfully installed your MySQL Template (import xml, global macros, bin, agent config) So now I have Unsupported item key. for mysql.discovery[{$MYSQL_DSN},{$MYSQL_USER},{$MYSQL_PASS},slave]

How I can fix it? Thanx and best regards.


Zabbix server/agent: 3.4.10 MySQL: 5.7.22 Ubuntu: 18.04

tears-of-noobs commented 6 years ago

@SmetDenis Hi. Can you manually run on your server this command from the user which use by zabbix-agent and show me the output?

/usr/bin/zabbix-agent-extension-mysql -m MYSQL_DSN --user MYSQL_USER --pass MYSQL_PASS --discovery

where: MYSQL_DSN - data source of MySQL server e.g. - "localhost:3306" MYSQL_USER - mysql user which has permissions for performing queries like - SHOW GLOBAL STATUS and SHOW PROCESSLIST MYSQL_PASSWORD - password of MySQL user.

SmetDenis commented 6 years ago

Hi Tnx for reply.

$ /usr/bin/zabbix-agent-extension-mysql -m "127.0.0.1:3306" --user zabbix --pass ****** --discovery
{"data":[{"{#TYPE}":"galera"}]}

But galera descovering doesn't work too. It shows me Unsupported item key. like MySQL slave

Yeap, user zabbix has permissions for SHOW GLOBAL STATUS and SHOW PROCESSLIST. I have checked it now.

Is there any other way to check it? Maybe i have to check some config in the template...

Thanks a lot.

akitsul commented 6 years ago

Hi,

Install and run netcat nc -l -p 10051 (not on zabbix-server) and run /usr/bin/zabbix-agent-extension-mysql --type galera -z $NETCAT_IP on host with mysql. Please show the output of netcat.

SmetDenis commented 6 years ago

Thnx. I'll check it later and say you about results. Sorry,I don't have any opportunities to do that. Later.

chadsterBAM commented 5 years ago

Can I jump in here? I've also run the same nc line and it returns PuTTYPuTTYPuTTY. However when I try to run the other lines, I get "blah blah, command cant be run by 'zabbix'@'localhost' - permission denied. I can confirm that I ran the query for granting as described in setup multiple times, and have also added zabbix to localhost.

Thoughts?

UPDATE: I should also mention that from the Zabbix server I am getting "Unsupported item key"