PDA

View Full Version : Log slow-queries


tempus1984
15-06-2009, 10:52
Hi all,

I want to log slow-queries on a server, I had created the item in zabbix server,
log[/var/log/mysql/mysql-slow.log]
With an active check type.
I have my file on the server.
But it doesn't works!

Some ideas?
Do you know the exact method?

thanks everybody

tekknokrat
16-06-2009, 13:33
did you checked all the parts from the handbook regarding log[] item?

- access rights of agentd to file
- file exists
- item is active check
- item is enabled

Is it with in DM environment or direct agent->server communication?

tempus1984
16-06-2009, 14:23
hello, thanks you for you response.

I'm not sure about rights on the log file, but I'm sur about others points.

look:
-rwxrwxrwx 1 mysql adm 177 2009-06-16 06:26 mysql-slow.log

I have made a chmod 777 on the file...

Thanks

tekknokrat
16-06-2009, 14:34
hello, thanks you for you response.

I'm not sure about rights on the log file, but I'm sur about others points.

look:
-rwxrwxrwx 1 mysql adm 177 2009-06-16 06:26 mysql-slow.log

I have made a chmod 777 on the file...

Thanks

Hi,

are you sure agent can access the folder where the file is in?
Try something like:

sudo -u zabbix ls /var/log/mysql/mysql-slow.log
(zabbix is the userid the agent is running)

Best way to give the agent access is:

usermod -a -G adm zabbix
/etc/init.d/zabbix-agent restart

tempus1984
16-06-2009, 14:50
You' right, I did
sudo -u zabbix ls /var/log/mysql/mysql-slow.log
and it returns:
ls: ne peut accéder /var/log/mysql/mysql-slow.log: Permission non accordée

so I tried:

usermod -a -G adm zabbix
/etc/init.d/zabbix-agent restart

But It still doesn't works...
What is DM environnement?
My zabbix server is 1.6 and zabbix agent is 1.4
In zabbix interface I see

agent D3YSTEM (actif) Non support - Not supported by ZABBIX agent

thanks for your help

tempus1984
16-06-2009, 14:56
Yes it works!! you're the best.
If I update zabbix agent 1.4 to 1.6 it work, with goods rights!

Thanks you very much teknokrat!

xibbaz
22-09-2009, 13:12
In zabbix interface I see "agent D3YSTEM (actif)"

Me too. Can someone confirm that this is in reality the "ZABBIX agent (active)" agent? Please :)

tempus1984
23-09-2009, 06:35
yes it is. good luck!