forked from redhat-openstack/openstack-puppet-modules
-
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.
Update module-collectd to 010a7b9f5a6939e001fe515224cb1be6d9cfdf88
010a7b9f5a6939e001fe515224cb1be6d9cfdf88 Merge pull request #372 from ghoneycutt/add_mongodb_plugin 4e98bf4f4d6d969aa2722385aee28937516179cb Merge pull request #370 from daenney/ping-to-class 01efe141f29955532c3aa01a39356ea2e0ef5b01 Add tests for the MongoDB plugin 6b709c82d46e1927862c359d8a45134b4ba30868 Add MongoDB plugin 0251e98956fd958df6bbe471efff24408852a453 plugin/ping: Transition from defined type to class bd63397c582edfc6c002839e8657833735ec8257 Merge pull request #368 from hdoedens/regex_compatibility 097e2a9662441e3753d92bdf10fd2e176adccf21 Removed group naming from regex for ruby 1.8.7 compatibility. Escaped dots in literal strings in regex. cdd0e94bdd4a1d5123846820c88c443bce12cf78 Merge pull request #364 from noris-network/fix-processes 395036ae332c56800481459fef9f1691a484de9f collectd may fail to start in wheezy if processes-plugin is used without any process 953b71bac189355b0a690ba2160ccfe8295f61fc Merge pull request #365 from blacktoko/patch-1 6ee3a3df6cde65da3d506a2bd0fb6e81d3f41fc5 #355 Removed Master/Slave if statement 2ea35b6dd8a261d30726690ddf9c5e23eaf0f587 Merge pull request #361 from t-8ch/empty_filecount deb4a4b9483abe55bbd0a58e55e13bd5baa6a7e0 [filecount] do not an emit empty <Plugin> block a7dc5bfe5d78668808c70b271f709c1be29d2111 Merge pull request #360 from t-8ch/solaris_variables f0c92e0381585522d0635b63a31c9eb5192cbc8a solaris: use more idiomatic file locations 53e88c67d48638bc1dbfbe1e9792b19e8566b6a1 solaris: rename service to full csw name Change-Id: Ib2996200593a43e06a9439ae758bf76dda2c8157
- Loading branch information
Showing
21 changed files
with
516 additions
and
37 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
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
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Class: collectd::plugin::mongodb | ||
# | ||
class collectd::plugin::mongodb ( | ||
$ensure = 'present', | ||
$interval = undef, | ||
$db_host = '127.0.0.1', | ||
$db_user = undef, | ||
$db_pass = undef, | ||
$db_port = undef, | ||
$configured_dbs = undef, | ||
$collectd_dir = '/usr/lib/collectd', | ||
) { | ||
|
||
validate_re($ensure,'^(present)|(absent)$', | ||
"collectd::plugin::mongodb::ensure is <${ensure}> and must be either 'present' or 'absent'.") | ||
|
||
if $interval != undef { | ||
validate_numeric($interval) | ||
} | ||
|
||
if $configured_dbs != undef { | ||
validate_array($configured_dbs) | ||
if ( $db_port == undef ) { fail('db_port is undefined, but must be set if configured_dbs is set.') } | ||
validate_string($db_port) | ||
} | ||
|
||
if ( $db_host != undef ) and ( is_ip_address($db_host) == false ) { | ||
fail("collectd::plugin::mongodb::db_host is <${db_host}> and must be a valid IP address.") | ||
} | ||
|
||
if $db_user == undef { | ||
fail('collectd::plugin::mongodb::db_user is <undef> and must be a mongodb username') | ||
} | ||
elsif $db_pass == undef { | ||
fail("collectd::plugin::mongodb::db_pass is <undef>, please specify the password for db user: ${db_user}") | ||
} | ||
|
||
collectd::plugin { 'mongodb': | ||
ensure => $ensure, | ||
content => template('collectd/plugin/mongodb.conf.erb'), | ||
interval => $interval, | ||
} | ||
} |
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
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
Oops, something went wrong.