Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow MySQL check configuration via a mysql config file #590

Merged
merged 1 commit into from
Sep 6, 2013

Conversation

micktwomey
Copy link

For more complex configuration (e.g. specifying SSL certificates) it's useful to use a mysql.cnf instead of specifying flags by hand.

For example I have a config like this:

[client]
default-character-set=utf8
database=dbname
user=username
password="password"
host=hostname.example.com
ssl-ca=/path/to/mysql-ssl-ca-cert.pem

I can then run the check using:

init_config:

instances:
   - defaults_file: /path/to/my.cnf

This (for example) allows datadog to collect metrics on externally hosted mysql instances over SSL.

For more complex configuration (e.g. specifying SSL certificates) it's
useful to use a mysql.cnf instead of specifying flags by hand.
@ghost ghost assigned remh Aug 22, 2013
@@ -294,6 +297,7 @@ def parse_agent_config(agent_config):
'sock': agent_config.get('mysql_sock',''),
'user': agent_config.get('mysql_user',''),
'pass': agent_config.get('mysql_pass',''),
'defaults_file': agent_config.get('defaults_file',''),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get rid of this line. This method is for backward compatibility to use old style configuration that was using datadog.conf to configure checks which is now deprecated.
default_files was not supported at that time so there is no need to add it now.

@remh
Copy link
Contributor

remh commented Aug 22, 2013

@micktwomey
It looks good!
Can you fix the line I pointed out and also rebase your branch so it's merged with master as we updated this check yesterday ?
Thanks!

remh added a commit that referenced this pull request Sep 6, 2013
Allow MySQL check configuration via a mysql config file
@remh remh merged commit 99d23b8 into DataDog:master Sep 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants