Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-2469

Parsing of a valid my.cnf can break the mysqld_exporter

    Details

      Description

      The parsing of the .my.cnf is invalid - it expects a k:v pairing, even when the option is a flag:

      key-value delimiter not found

      In addition to this, it parses more than it should do:

      skip-auto-rehash
      # cat /root/.my.cnf 
      [client]
      socket = /var/run/mysqld/mysqld.sock
      
      [mysql]
      skip-auto-rehash
      
      Produces ->
      time="2018-05-01T11:03:54Z" level=fatal msg="failed reading ini file: key-value delimiter not found: skip-auto-rehash\n" source="mysqld_exporter.go:294"
      
      disable-auto-rehash
      # cat /root/.my.cnf 
      [client]
      socket = /var/run/mysqld/mysqld.sock
      
      [mysql]
      disable-auto-rehash
      
      Produces ->
      time="2018-05-01T11:07:53Z" level=fatal msg="failed reading ini file: key-value delimiter not found: disable-auto-rehash\n" source="mysqld_exporter.go:294"
      
      wrong section parsed
      # cat /root/.my.cnf 
      [client]
      socket = /var/run/mysqld/mysqld.sock
      
      [mysqld]
      disable-auto-rehash
      
      Produces ->
      time="2018-05-01T11:09:59Z" level=fatal msg="failed reading ini file: key-value delimiter not found: disable-auto-rehash\n" source="mysqld_exporter.go:294"
      

      All of these cause the exporter to abort.

      It should be noted that this seems to also occur even when --defaults-file has been used to configure the agent

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  ceri.williams Ceri Williams
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 5 hours
                    5h