From e6bebaa98b7668a0c1f60bfc585af166bc8ddd0b Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Sun, 19 Jan 2014 02:40:08 -0500 Subject: [PATCH] Minor docs fixes and increment Modulefile --- Modulefile | 2 +- README.md | 51 ++++++++++++++++++++++++++++++--------------------- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/Modulefile b/Modulefile index 9c7f3e6ab7..c18daed2a5 100644 --- a/Modulefile +++ b/Modulefile @@ -1,4 +1,4 @@ -version '0.7.7' +version '1.0.0' name 'sensu-sensu' license 'MIT' summary 'A module to intall the Sensu monitoring framework' diff --git a/README.md b/README.md index a3f238ee51..37e9c18d35 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Tested with Travis CI [![Build Status](https://travis-ci.org/sensu/sensu-puppet.png)](https://travis-ci.org/sensu/sensu-puppet) ## Upgrade note -Version 0.5.0 and later are incompatible with previous versions of the +Versions prior to 1.0.0 are incompatible with previous versions of the Sensu-Puppet module. ## Installation @@ -17,21 +17,27 @@ Sensu-Puppet module. - RabbitMQ server, vhost, and credentials ### Dependencies - - puppetlabs/apt +- puppetlabs/stdlib -See Modulefile for details. - -### Others +See `Modulefile` for details. Pluginsync should be enabled. Also, you will need the Ruby JSON library or gem on all your nodes. [EPEL](http://mirrors.kernel.org/fedora-epel/6/x86_64/rubygem-json-1.4.6-1.el6.x86_64.rpm) -## Basic Example +Rubygem: + + $ sudo gem install json + +Debian & Ubuntu: + + $ sudo apt-get install ruby-json -### Sensu Server +## Basic example + +### Sensu server node 'sensu-server.foo.com' { class { 'sensu': @@ -61,7 +67,7 @@ or gem on all your nodes. } -### Sensu Client +### Sensu client node 'sensu-client.foo.com' { class { 'sensu': @@ -71,7 +77,8 @@ or gem on all your nodes. } } -## Advanced Example (hiera) +## Advanced example using Hiera + This example includes the `sensu` class as part of a base class or role and configures Sensu on each individual node via [Hiera](http://docs.puppetlabs.com/#hierahiera1). @@ -116,9 +123,10 @@ site.pp ## Safe Mode checks By default Sensu clients will execute whatever check messages are on the -queue. This is potentially a large security hole. -If you enable the safe_mode parameter, it will require that checks are -defined on the client. If standalone checks are used then defining on +queue. This is potentially a large security hole. + +If you enable the `safe_mode` parameter, it will require that checks are +defined on the client. If standalone checks are used then defining on the client is sufficient, otherwise checks will also need to be defined on the server as well. @@ -126,8 +134,8 @@ A usage example is shown below. ### Sensu server -Each component of Sensu can be controlled separately. The server components -are managed with the server, dashboard, and api parameters. +Each component of Sensu can be controlled separately. The server components +are managed with the server, dashboard, and API parameters. node 'sensu-server.foo.com' { class { 'sensu': @@ -167,7 +175,7 @@ are managed with the server, dashboard, and api parameters. } -## Using custom variables in check definition +## Using custom variables in check definitions sensu::check{ 'check_file_test': command => '/usr/local/bin/check_file_test.sh', @@ -181,7 +189,7 @@ are managed with the server, dashboard, and api parameters. subscribers => 'sensu-test' } -This will create the following check definition for Sensu +This will create the following check definition for Sensu: { "checks": { @@ -205,7 +213,7 @@ This will create the following check definition for Sensu } } -## Handler configuration +## Handler configuration sensu::handler { 'handler_foobar': @@ -216,7 +224,7 @@ This will create the following check definition for Sensu } } -This will create the following handler definition for Sensu (server) +This will create the following handler definition for Sensu (server): { "handler_foobar": { @@ -238,8 +246,9 @@ This will create the following handler definition for Sensu (server) ### Disable Service Management -If you'd prefer to use an external service management tool such as DaemonTools or SupervisorD, -you can disable the modules internal service management functions like so: +If you'd prefer to use an external service management tool such as +DaemonTools or SupervisorD, you can disable the module's internal +service management functions like so: sensu::manage_services: false @@ -280,7 +289,7 @@ monitoring platforms, you could do something like: apache/manifests/service.pp -$monitoring = hiera('monitoring', '') + $monitoring = hiera('monitoring', '') case $monitoring { 'sensu': { include apache::monitoring::sensu }