Skip to content

Commit

Permalink
note v2 API changes + full parameter list in README
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Oct 3, 2013
1 parent 66c4157 commit afd6759
Showing 1 changed file with 139 additions and 4 deletions.
143 changes: 139 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Puppet smartd Module
1. [Overview](#overview)
2. [Description](#description)
3. [Usage](#usage)
* [Version `2.x.x` _incompatilbe_ API change](#version-2xx-incompatilbe-api-change)
* [Simple Usage](#simple-usage)
* [Parameters](#parameters)
* [Pedantic Example](#pedantic-example)
* [Hiera Data Bindings](#hiera-data-bindings)
4. [Limitations](#limitations)
* [Tested Platforms](#tested-platforms)
5. [Support](#support)
Expand Down Expand Up @@ -47,16 +52,51 @@ migrated into the

This is a fork of
[`csail/smartd`](http://tig.csail.mit.edu/wiki/TIG/PuppetAtCSAIL) that was
intially made primarily to fix support of probing `SATA` drives behind a LSI
initially made primarily to fix support of probing `SATA` drives behind a LSI
Megaraid controllers. The author has been aware of the fork and it's hoped
that the two module can be merged. Since the initial fork, a number of small
that the two modules can be merged. Since the initial fork, a number of small
API changes have been made to improve usage.


Usage
-----

### Basic Usage
### Version `2.x.x` _incompatible_ API change

The `v2` API merges the `v1` API's `devices` and `device_options` parameters
into a single parameter named `devices`, but with incompatible semantics to the
`v1` API.

`devices` now accepts an `Array` of `Hash`. This is to allow multiple
`smartd.conf` entries for the same blockdev as is typically required for probing
through to individual disks behind a block device presented by a RAID
controller.

#### Old `v1` API

Note that `devices` used to accept a flat `Array`.

```puppet
class{ 'smartd':
devices => [ '/dev/sg1', '/dev/sg2' ],
device_options => { '/dev/sg1' => '-o on -S on -a', '/dev/sg2' => '-o on -S on -a' },
}
```

#### New `v2` API

`devices` now accepts an `Array` of `Hash`.

```puppet
class{ 'smartd':
devices => [
{ device => '/dev/sg1', options => '-o on -S on -a' },
{ device => '/dev/sg2', options => '-o on -S on -a' },
],
}
```

### Simple Usage

```puppet
include smartd
Expand All @@ -66,7 +106,102 @@ Usage
class{ 'smartd': }
```

### All Parameters
### Parameters

All parameters are optional.

#### `ensure`

`String`

Standard Puppet ensure semantics (and supports `purged` state if your
package provider does). Valid values are:
`present`,`latest`,`absent`,`purged`

defaults to: `present`

#### `package_name`

`String`

Name of the smartmontools package.

defaults to: `smartmontools`

#### `service_name`

`String`

Name of the smartmontools monitoring daemon.

defaults to: `smartd`

#### `service_ensure`

`String`

State of the smartmontools monitoring daemon. Valid values are:
`running`,`stopped`

defaults to: `running`

#### `config_file`

`String`

Path to the configuration file for the monitoring daemon.

defaults to: (OS-specific)

#### `devicescan`

`Bool`

Sets the `DEVICESCAN` directive in the smart daemon config file. Tells the
smart daemon to automatically detect all of the SMART-capable drives in the
system.

defaults to: `true`

#### `devicescan_options`

`String`

Passes options to the `DEVICESCAN` directive. `devicescan` must equal `true`
for this to have any effect.

defaults to: `undef`

#### `devices`

`Array` of `Hash`

Explicit list of raw block devices to check. Eg.

```puppet
[{ device => '/dev/sda', options => '-I 194' }]
```

defaults to: `[]`

#### `mail_to`

`String`

Smart daemon notifcation email address.

defaults to: `root`

#### `warning_schedule`

`String`

Smart daemon problem mail notification frequency. Valid values are:
`daily`,`once`,`diminishing`

defaults to: `daily`

### Pedantic Example

```puppet
class{ 'smartd':
Expand Down

0 comments on commit afd6759

Please sign in to comment.