<commit_before># SMF Emailer

A stupid script that runs 'svcs' for you at some interval and checks to see whether your services are happy.  If they aren't it emails you.  I wrote this because, unfortunately, SmartOS' set-notify functionality is incomplete.

## Installation

### ruby
Install ruby your preferred way.  If you don't have a preferred way this works:

```
pkgin install ruby200
```

### gems
You can either run the "gem" command:

```
gem install eventmachine mail
```

or if you prefer pkgin:

```
pkgin install ruby200-eventmachine ruby200-mail
```

### SMF
Included is a sample xml file for running SMF Emailer via SMF

### Config
Also included is a sample YAML file.  The mail settings stanza is passed to the mail gem.  So any valid mail gem configurations should work.<commit_msg>note about directories for installation<commit_after># SMF Emailer

A stupid script that runs 'svcs' for you at some interval and checks to see whether your services are happy.  If they aren't it emails you.  I wrote this because, unfortunately, SmartOS' set-notify functionality is incomplete.

## Installation

I put smf_emailer in /opt/local/bin and smf_emailer.yml in /opt/local/etc

### ruby
Install ruby your preferred way.  If you don't have a preferred way this works:

```
pkgin install ruby200
```

### gems
You can either run the "gem" command:

```
gem install eventmachine mail
```

or if you prefer pkgin:

```
pkgin install ruby200-eventmachine ruby200-mail
```

### SMF
Included is a sample xml file for running SMF Emailer via SMF

### Config
Also included is a sample YAML file.  The mail settings stanza is passed to the mail gem.  So any valid mail gem configurations should work.
{'fraction_non_alphanumeric': 0.07239552678045909, 'fraction_numerical': 0.01059446733372572, 'mean_word_length': 4.182926829268292, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6085506', 'n_tokens_mistral': 519, 'n_tokens_neox': 468, 'n_words': 248}