Ad Widget

Collapse

Log slow-queries

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tempus1984
    Junior Member
    • May 2009
    • 10

    #1

    Log slow-queries

    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
    Senior Member
    • Sep 2008
    • 140

    #2
    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?

    Comment

    • tempus1984
      Junior Member
      • May 2009
      • 10

      #3
      hello, thanks you for you response.

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

      look:
      HTML Code:
      -rwxrwxrwx 1 mysql adm      177 2009-06-16 06:26 mysql-slow.log
      I have made a chmod 777 on the file...

      Thanks

      Comment

      • tekknokrat
        Senior Member
        • Sep 2008
        • 140

        #4
        Originally posted by tempus1984
        hello, thanks you for you response.

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

        look:
        HTML Code:
        -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:

        Code:
        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:

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

        Comment

        • tempus1984
          Junior Member
          • May 2009
          • 10

          #5
          You' right, I did
          Code:
          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:

          Code:
          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

          Comment

          • tempus1984
            Junior Member
            • May 2009
            • 10

            #6
            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!

            Comment

            • xibbaz
              Member
              Zabbix Certified Specialist
              • Jun 2009
              • 74

              #7
              Originally posted by tempus1984
              In zabbix interface I see "agent D3YSTEM (actif)"
              Me too. Can someone confirm that this is in reality the "ZABBIX agent (active)" agent? Please

              Comment

              • tempus1984
                Junior Member
                • May 2009
                • 10

                #8
                yes it is. good luck!

                Comment

                Working...