Skip to content

Commit

Permalink
add innodbstats and slavenotifications
Browse files Browse the repository at this point in the history
  • Loading branch information
t-8ch committed Aug 19, 2015
1 parent e6b7b6a commit 8520ac4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 12 additions & 10 deletions manifests/plugin/mysql/database.pp
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
#
define collectd::plugin::mysql::database (
$ensure = 'present',
$database = $name,
$host = 'UNSET',
$username = 'UNSET',
$password = 'UNSET',
$port = '3306',
$masterstats = false,
$slavestats = false,
$socket = undef,
$ensure = 'present',
$database = $name,
$host = 'UNSET',
$username = 'UNSET',
$password = 'UNSET',
$port = '3306',
$masterstats = false,
$slavestats = false,
$socket = undef,
$innodbstats = false,
$slavenotifications = false,
) {
include collectd::params
include collectd::plugin::mysql

$conf_dir = $collectd::params::plugin_conf_dir

validate_string($database, $host, $username, $password, $port)
validate_bool($masterstats, $slavestats)
validate_bool($masterstats, $slavestats, $innodbstats, $slavenotifications)
if $socket {
validate_string($socket)
}
Expand Down
2 changes: 2 additions & 0 deletions templates/mysql-database.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
<%- if @socket -%>
Socket "<%= @socket %>"
<%- end -%>
InnodbStats <%= @innodbstats %>
SlaveNotifications <%= @slavenotifications %>
</Database>
</Plugin>

0 comments on commit 8520ac4

Please sign in to comment.