satu

Gajah mati meninggalkan tulang
harimau mati meninggalkan belang
manusia mati meninggalkan nama

persiapkan klu kalian mati ingin meninggalkan apa ?

Monday 11 January 2016

install template mysql ( testing agent )

 mySQL monitoring HowTo Zabbix 2.0

This is a howto for mysql monitoring with zabbix 2.0




I've attached a zip file that has:

-php script that goes on the mysql server you want to monitor (it is the latest version ATM - and you can always grab it from the percona mysql monitoring plugin toolkit in the "scripts" folder")

-zabbix user parameters file for use on the agent to grab all the values from the mysql server via the script above


I've also attached an XML file to import to the zabbix server that will create the template. I generated it as per the instructions on the link I provided at the beginning but I needed to add <delay_flex></delay_flex> to each item for zabbix succesfully import the template. I also erased all the triggers due to import problems.

________________________________

Instructions

On the Server
-Import the XML File template

On the Agent
you can refer to the instructions from the link above:

Quote:
Agent side server:

Make sure PHP5 is installed.
Make sure MySQL plugin for PHP is installed.
Make sure php-cli is installed (command line PHP).


Create a sub-dir (for example): /usr/local/zabbix/plugins/
Copy the ss_get_mysql_stats.php to this dir.
Copy the zabbixmysql.conf file to /etc/zabbix/.

Edit the /etc/zabbix/zabbix_agent.conf file.
Add: Include=/etc/zabbix/zabbixmysql.conf
(you might need to enable the "unsafe operators" also)

Create a MySQL database user:
GRANT PROCESS ON *.* TO 'zabbix'@'localhost' identified BY 'some_password';

Edit the ss_get_mysql_stats.php file, change the:
$mysql_user = 'zabbix';
$mysql_pass = 'some_password';

Do a Find and Replace in zabbixmysql.conf
REPLACE: /usr/local/share/zabbix/plugins/ss_get_mysql_stats.php
WITH: path to the location of your ss_get_mysql_stats.php script

Restart the agent.
To Test
You can do things like
(on agent) 
zabbix_agentd -t mysql.Sort_scan

(on server)
zabbix_get -s agentip -k mysql.Sort_scan

To ensure you get output.

Add the template to a host. I actually cloned the linux template (removed the mysql process counter and LINKED the mysql template to it) .

I hope this helps.

https://drive.google.com/open?id=0B8GDi0lY8FDgMkdGRVhZdXFoZ00  script

https://drive.google.com/open?id=0B8GDi0lY8FDgX1lTdVVVZjhnLVk template

sumber : https://www.zabbix.com/forum/showthread.php?t=26503

No comments:

Post a Comment