linode / longview

Linode Longview Agent
Other
334 stars 45 forks source link

Support for MariaDB #20

Closed halles closed 9 years ago

halles commented 9 years ago

Since CentOS 7, mysql has been replaced by MariaDB. I supposed it would be no issue at all, but it seems the necessary modules are not installed since mysql is never actually installed. Is there a workaround? Is support assigned on a milestone already?

levlaz commented 9 years ago

Hello @halles, I apologize for the delay in response. Thank you for this issue.

Since MariaDB is a drop in replacement for MySQL, it is supported in Longview by default. In order to get it to work, you will need to do a little bit of manual configuration as described in this guide: https://www.linode.com/docs/platform/longview/longview-app-for-mysql/

I spun up a brand new Linode with CentOS 7, installed mariadb-server and verified that following the guide allowed me to view data about MariaDB in Longview. The specific steps that I took are:

  1. Open up MariaDB by typing in mysql in a terminal and create a linode-longview user in MariaDB

    CREATE USER 'linode-longview'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';
    flush privileges;
  2. Edit the /etc/linode/longview.d/MySQL.conffile and add the credentials from the previous step to this file. They should look something like this:

    #username root
    #password example_password
    username linode-longview 
    password YOUR_PASSWORD
  3. Restart Longview and MariaDB

    service longview restart
    systemctl restart mariadb.service

After about a minute if you refresh the MySQL tab in the Longview section of the Linode Manager you should see data start to come in from your server.

Please let me know if you run into any issues!

Best, Lev