Skip to content

Instantly share code, notes, and snippets.

@omerlh

omerlh/init.pp Secret

Last active March 23, 2017 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omerlh/a35f869eb5442f84ded7299aaa864de4 to your computer and use it in GitHub Desktop.
Save omerlh/a35f869eb5442f84ded7299aaa864de4 to your computer and use it in GitHub Desktop.
Keep your Redis in shape!
class check_webdis {
vcsrepo { '/usr/lib/nagios/plugins/check_webdis':
ensure => latest,
provider => git,
source => 'https://github.com/Soluto/check-redis-plugin.git',
revision => 'master',
before => File['/usr/lib/nagios/plugins/check_webdis/index.js'],
notify => Exec['install_webdis_packages']
}
file { '/usr/lib/nagios/plugins/check_webdis/index.js':
ensure => 'file',
owner => 'root',
group => '0',
mode => '0755'
}
exec { 'install_webdis_packages':
command => 'npm install',
cwd => '/usr/lib/nagios/plugins/check_webdis/',
path => '/usr/bin/',
refreshonly => true
}
}
{
"redis_host": "127.0.0.1",
"redis_port": 6379,
"redis_auth": null,
"http_host": "0.0.0.0",
"http_port": 7379,
"threads": 5,
"pool_size": 20,
"daemonize": true,
"websockets": false,
"database": 0,
"acl": [
{
"disabled": ["*"]
},
{
"http_basic_auth": "user:password",
"enabled": ["INFO"]
}
],
"verbosity": 6,
"logfile": "webdis.log"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment