Guest User

Untitled

a guest
May 11th, 2018
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. MySQL metrics
  2. Version 1.1.0 and above of the Amplify agent has a plugin for monitoring MySQL databases. Again, the agent should run in the same process environment as MySQL, and be able to find the mysqld processes with ps(1), otherwise the MySQL metric collection won't work.
  3. The agent doesn't try to find and parse any existing MySQL configuration files. In order for the agent to connect to MySQL and collect the metrics, a few simple configuration steps should be performed.
  4. To start monitoring MySQL, follow the instructions below.
  5. Create a new user for the Amplify agent.
  6. $ mysql -u root -p
  7. [..]
  8. mysql> CREATE USER 'amplify-agent'@'localhost' IDENTIFIED BY 'xxxxxx';
  9. Query OK, 0 rows affected (0.01 sec)
  10. Check that the user can read MySQL metrics.
  11. $ mysql -u amplify-agent -p
  12. ..
  13. mysql> show global status;
  14. +-----------------------------------------------+--------------------------------------------------+
  15. | Variable_name | Value |
  16. +-----------------------------------------------+--------------------------------------------------+
  17. | Aborted_clients | 0 |
  18. ..
  19. | Uptime_since_flush_status | 1993 |
  20. +-----------------------------------------------+--------------------------------------------------+
  21. 353 rows in set (0.01 sec)
  22. Note. The agent doesn't use mysql(1) for metric collection, however it implements a similar query mechanism via a Python module.
  23. Update the agent to the most recent version.
  24. Add the following to /etc/amplify-agent/agent.conf
  25. [extensions]
  26. ..
  27. mysql = True
  28.  
  29. [mysql]
  30. #host =
  31. #port =
  32. unix_socket = /var/run/mysqld/mysqld.sock
  33. user = amplify-agent
  34. password = xxxxxx
  35. where the password option mirrors the password from the step #1 above.
  36. Restart the agent.
Add Comment
Please, Sign In to add comment