Created
December 2, 2013 18:55
-
-
Save sts/7754883 to your computer and use it in GitHub Desktop.
checkmk::plugin
This file contains hidden or 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
| # Definition: checkmk::plugin | |
| # | |
| # Install a check_mk agent plugin on machine into the directroy: | |
| # /usr/lib/check-mk-agent/plugins/ | |
| # | |
| # Usage: | |
| # | |
| # The following will source the check-mk-agent plugin called 'puppet' from the | |
| # puppet module puppet: puppet:///modules/puppet/checkmk/agent.plugin | |
| # | |
| # class puppet::server { | |
| # checkmk::plugin { "agent": } | |
| # } | |
| # | |
| # Here is a more complex example, with a manually specified plugin source. | |
| # | |
| # checkmk::plugin { "memcachedng": | |
| # source => "pupppet:///modules/memcached/memcachedng.sh" | |
| # } | |
| # | |
| define checkmk::plugin($source = "puppet:///modules/${caller_module_name}/checkmk/${name}.plugin", $ensure = 'present') { | |
| $plugin = "/usr/lib/check_mk_agent/plugins/${name}" | |
| file { $plugin: | |
| ensure => $ensure, | |
| owner => 'root', | |
| group => 'root', | |
| mode => '0755', | |
| source => $source, | |
| require => Class["checkmk::agent"] | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment