GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

Cacti Percona Mysql plugin doesn't work properly.

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cacti Percona Mysql plugin doesn't work properly.

    Hi, there. I just installed the Percona plugins for Cacti. I followed the Percona instructions to install the PHP script and XML file into Cacti system. I created a new device to use this plugin. But, It doesn't work properly. I attach the Log of this plugin.

    05/16/2013 07:45:02 AM - CMDPHP: Poller[0] Host[2] DS[9] WARNING: Result from CMD not valid. Partial Result: MySQL: Can't connect

    What did I do wrong?

    Can you help me to solve this problem, please?

    Thanks in Advance.

  • #2
    Did you perform the section on configuring the username and password in the data pull scripts? The error looks like it is complaining about not being able to connect to a server it is trying to pull. So I'd check your config, and then check the server you are trying to monitor to make sure the username/password you specified works on it and that it allows connections from the Cacti host. Easy way to test that is to attempt to connect manually from the Cacti host to the server you are trying to monitor using the specified username and password. If that works, then it should work from Cacti if configured correctly. If that does not work, then you have an issue with your credentials.

    Likely place to start is the /scripts/ss_get_mysql_stats.php file, or /scripts/ss_get_mysql_stats.php.cnf if you put them in a separate file.

    Comment


    • #3
      Hi, Scott. Thanks for your sooner reply. I did it, but the plugin still doesn't work. I attach a screenshot of the Preview mode section. Question:

      Do I need to re start the Apache daemon?

      Thanks in Advance

      Jose
      Last edited by josem; 05-16-2013, 03:24 PM.

      Comment


      • #4
        Did you try connecting manually from the Cacti host to the server you are attempting to monitor using the same credentials you have configured in Cacti?

        Comment


        • #5
          Turn on more debugging in cacti to see which command is run, and then run that command from the shell. It will help find the mistake.

          Apache does not need to be restarted.

          Comment


          • #6
            Hi, there. My comments:

            Scott, I couldn't connect to the remote host using the same credentials that I configured in the PHP script. I tried using mysql commands. After I decided to monitoring mysql at localhost but I still have the same problem.

            Debugging mode information.

            /usr/share/cacti/site/scripts/ss_get_mysql_stats.php --host 127.0.0.1 --items ip,iq,ir,iu,ix,iz --user --pass --port , output: MySQL: Can't connect to MySQL server on '127.0.0.1' (111

            Hi, gmouse, thanks for your help. I can see more info related with my problem.

            I want to fix this problem. Question:

            Do I need to do something specific in mysql configuration to access remotely?

            Thanks in Advance.

            Comment


            • #7
              Hi there. I just checked the Cacti log file. I found the following message:

              05/17/2013 11:34:29 AM - WEBLOG: Poller[0] CACTI2RRD: /usr/bin/rrdtool graph - --imgformat=PNG --start=1368725669 --end=1368812069 --title='Percona MySQL - MySQL Connections' --base=1000 --height=100 --width=300 --alt-autoscale-max --lower-limit=0 --no-legend COMMENT:"From 2013/05/16 11\:34\:29 To 2013/05/17 11\:34\:29\c" COMMENT:" \n" --vertical-label='' --slope-mode --font TITLE:7: --font AXIS:7: --font LEGEND:8: --font UNIT:7: DEF:a="/var/lib/cacti/rra/percona_mysql_threads_connected_9.rrd":max_connect ions:AVERAGE DEF:b="/var/lib/cacti/rra/percona_mysql_threads_connected_9.rrd":Max_used_co nnectins:AVERAGE DEF:c="/var/lib/cacti/rra/percona_mysql_threads_connected_9.rrd":Aborted_cli ents:AVERAGE DEF:d="/var/lib/cacti/rra/percona_mysql_threads_connected_9.rrd":Aborted_con nects:AVERAGE DEF:e="/var/lib/cacti/rra/percona_mysql_threads_connected_9.rrd":Threads_con nected:AVERAGE DEF:f="/var/lib/cacti/rra/percona_mysql_threads_connected_9.rrd":Connections :AVERAGE AREA:a#C0C0C0FF:"" AREA:b#FFD660FF:"" LINE1:c#FF3932FF:"" LINE1:d#00FF00FF:"" LINE2:e#FF7D00FF:"" LINE1:f#4444FFFF:""

              But, Cacti still doesn't show the Percona Mysql graphic.

              Any idea?

              Thanks in Advance.

              Last edited by josem; 05-17-2013, 01:44 PM.

              Comment


              • #8
                If you cannot connect to the database manually using the credentials, then neither can Cacti.

                From the debug message you posted, it looks like Cacti is attempting to connect with no username or password. Verify that your credentials are in /usr/share/cacti/site/scripts/ss_get_mysql_stats.php and that they are in the correct format and everything based on what the manual says.

                Comment


                • #9
                  Do not edit ss_get_*.php scripts directly.

                  Simply create .cnf file in the same dir, e.g. ss_get_mysql_stats.php.cnf with the content like:
                  <?php
                  $mysql_user = 'user';
                  $mysql_pass = 'pass123';


                  Comment


                  • #10
                    Either way works, but the .cnf way is probably the more ideal way. You can see both options in the docs:

                    http://www.percona.com/doc/percona-m...templates.html

                    Comment


                    • #11
                      If you update ss_get_*.php they will get overwritten on the next update if using packages.

                      Comment

                      Working...
                      X