forked from DataDog/puppet-datadog-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow multiple MySQL instances (DataDog#267)
* Allowing Multiple MySQL instances * Tweaking tags and Dealing with undef sock declarations * Trying to fix Travis Failures involving the sock declaration * [puppet] address issue with undefined sock parameter.
- Loading branch information
Showing
2 changed files
with
67 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,26 +5,34 @@ | |
init_config: | ||
|
||
instances: | ||
- server: <%= @host %> | ||
user: <%= @user %> | ||
pass: <%= @password %> | ||
<% if @sock -%> | ||
sock: <%= @sock %> | ||
<%- (Array(@_instances)).each do |instance| -%> | ||
- server: <%= instance['host'] %> | ||
user: <%= instance['user'] %> | ||
pass: <%= instance['password'] %> | ||
<% if instance['port'] -%> | ||
port: <%= instance['port'] %> | ||
<% end -%> | ||
# port: 3306 # Optional | ||
# defaults_file: my.cnf # Alternate configuration mechanism | ||
<% if [email protected]? -%> | ||
tags: # Optional | ||
<% @tags.each do |tag| -%> | ||
- <%= tag %> | ||
<% if instance['sock'] and instance['sock'] != :undef -%> | ||
sock: <%= instance['sock'] %> | ||
<% end -%> | ||
|
||
<% if instance['tags'] and ! instance['tags'].empty? -%> | ||
tags: | ||
<%- Array(instance['tags']).each do |tag| -%> | ||
<%- if tag != '' -%> | ||
- <%= tag %> | ||
<%- end -%> | ||
<%- end -%> | ||
<% end -%> | ||
|
||
options: # Optional | ||
replication: <%= @replication %> | ||
galera_cluster: <%= @galera_cluster %> | ||
extra_status_metrics: <%= @extra_status_metrics %> | ||
extra_innodb_metrics: <%= @extra_innodb_metrics %> | ||
extra_performance_metrics: <%= @extra_performance_metrics %> | ||
schema_size_metrics: <%= @schema_size_metrics %> | ||
disable_innodb_metrics: <%= @disable_innodb_metrics %> | ||
replication: <%= instance['replication'] %> | ||
galera_cluster: <%= instance['galera_cluster'] %> | ||
extra_status_metrics: <%= instance['extra_status_metrics'] %> | ||
extra_innodb_metrics: <%= instance['extra_innodb_metrics'] %> | ||
extra_performance_metrics: <%= instance['extra_performance_metrics'] %> | ||
schema_size_metrics: <%= instance['schema_size_metrics'] %> | ||
disable_innodb_metrics: <%= instance['disable_innodb_metrics'] %> | ||
|
||
<% end -%> | ||
|