<commit_before>Boundary Plugin Shell
=====================

Boundary Plugin Shell is generic plugin that allows the use of any program or scripting language to produce metrics for the Boundary Premium product.

The Boundary Plugin Shell includes:

1. Boundary Plugin Shell
2. Sample Dashboard _Plugin Shell_
3. Example scripts that collect metrics

## Adding the Shell Plugin to Premium Boundary

Installation Plugin

![foo](src/main/resources/plugin_install.png)

## Removing the Shell Plugin from Premium Boundary

![foo](src/main/resources/plugin_uninstall.png)

## Configuration

Once the Shell Plugin is installed a metric to be collected requires configuration. Configuration of a Shell Plugin collected metric requires that a _relay_ is installed. Instructions on how to install a relay for



## Plugin Shell Protocol

Collection of your own defined metric requires a program or script to:

1. Collect, by any means the desired metric
2. Write the collected metric value, along with the metric name, and source to [standard output](http://en.wikipedia.org/wiki/Standard_output) with an accompanying new line.



## Examples
Boundary Shell Plugin bundles several examples that illustrate how to create your metrics using a program or script:

- File System Usage
- Process Count
- Port Scan
- Random
- Windows Power Shell

### File Space Capacity

Collects spaced used of a specified file system as a percentage
#### Metrics
- `BOUNDARY_FILE_SPACE_CAPACITY`

#### Requirements
1. Bash shell
2. Posix utilities: `awk`, `tail`
3. python 2.6.6 or later

#### Configuration

### Process Count

#### Requirements

#### Configuration


### Port Scan

Checks the availability of TCP/IP _port_ on a specified _host_

#### Requirements

#### Configuration

### Random

#### Configuration

### Windows Power Shell

#### Configuration



<commit_msg>Add instructions on installing the Plugin<commit_after>Boundary Plugin Shell
=====================

Boundary Plugin Shell is generic plugin that allows the use of any program or scripting language to produce metrics for the Boundary Premium product.

The Boundary Plugin Shell includes:

1. Boundary Plugin Shell
2. Sample Dashboard _Plugin Shell_
3. Example scripts that collect metrics

## Adding the Shell Plugin to Premium Boundary

1. Login into Boundary Premimum
2. Display the settings dialog by clicking on the _settings icon_: ![](src/main/resources/settings_icon.png)
3. Click on the _Plugins_ in the settings dialog: ![](src/main/resources/settings_plugins_dialog.png)

4. Local the _boundary-plugin-shell_ and click on the _Install_ button.
![foo](src/main/resources/plugins_available.png)

5. A confirmation dialog is displayed indicating the plugin was installed sucessfull along with the metrics and the dashboards that were configure:
![foo](src/main/resources/plugin_install.png)

6. Click on the _OK_ button to dismiss the dialog.

## Removing the Shell Plugin from Premium Boundary

![foo](src/main/resources/plugin_uninstall.png)

## Configuration

Once the Shell Plugin is installed a metric to be collected requires configuration. Configuration of a Shell Plugin collected metric requires that a _relay_ is installed. Instructions on how to install a relay for



## Plugin Shell Protocol

Collection of your own defined metric requires a program or script to:

1. Collect, by any means the desired metric
2. Write the collected metric value, along with the metric name, and source to [standard output](http://en.wikipedia.org/wiki/Standard_output) with an accompanying new line.

Here Bash shell code snipet that illustrates

```bash
### Collect the metric

# List the directory, count the lines, and remove white space
file_count=$(ls -1 $directory_path | wc -l | tr -d ' ')

### Write the metric standard out

echo "FILE_COUNT $file_count $(hostname)"
```

Here is yet another snipet that gets the collects and outputs the processor load:

```bash
echo $(uptime) $(hostname) | awk '{printf("LOAD_1_MINUTE %s %s\nLOAD_5_MINUTE %s %s\nLOAD_15_MINUTE %s %s\n",$8,$11,$9,$11,$10,$11)}'
```
## Examples
Boundary Shell Plugin bundles several examples that illustrate how to create your metrics using a program or script:

- File System Usage
- Process Count
- Port Scan
- Random
- Windows Power Shell

### File Space Capacity

Collects spaced used of a specified file system as a percentage
#### Metrics
- `BOUNDARY_FILE_SPACE_CAPACITY`

#### Requirements
1. Bash shell
2. Posix utilities: `awk`, `tail`
3. python 2.6.6 or later

#### Configuration

### Process Count

#### Requirements

#### Configuration


### Port Scan

Checks the availability of TCP/IP _port_ on a specified _host_

#### Requirements

#### Configuration

### Random

#### Configuration

### Windows Power Shell

#### Configuration




{'fraction_non_alphanumeric': 0.08677426116118214, 'fraction_numerical': 0.009012785579543072, 'mean_word_length': 4.70131421744325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3239611', 'n_tokens_mistral': 1334, 'n_tokens_neox': 1234, 'n_words': 594}