<commit_before># tues

Easily run commands on collections of hosts

## Install

 * Clone the repository
 * Run `python setup.py install` or `python setup.py develop` in a virtualenv

## Getting Started

Tues expects a command to execute, followed by the name of a hostname provider and its arguments.

Execute on all hosts in file hostnames.

```
echo "localhost" > hostnames
tues "ls" file hostnames
```

Execute on all hosts matching a certain foreman expression.

```
export FOREMAN_URL="https://user:password@foreman.domain/"
tues "ls" fm "class = my::class"
```

## Custom Providers

New providers may be added by putting a new executable with a name like "tues-provider-<name>"
on your PATH. A provider is expected to return a newline seperated list of hosts.

If the provider returns with an error, the output is considered to be an error message and/or
it help output. If '--help' is passed through to the provider the output is displayed no matter
what exit code is used.
<commit_msg>docs: Add nagios provider docs<commit_after># tues

Easily run commands on collections of hosts

## Install

 * Clone the repository
 * Run `python setup.py install` or `python setup.py develop` in a virtualenv

## Getting Started

Tues expects a command to execute, followed by the name of a hostname provider and its arguments.

Execute on all hosts in file hostnames.

```
echo "localhost" > hostnames
tues "ls" file hostnames
```

## Providers

### Foreman

Execute on all hosts matching a certain foreman expression.

```
export FOREMAN_URL="https://user:password@foreman.domain/"
tues "ls" fm "class = my::class"
```

### Nagios (via livestatus)

Execute on all hosts with a given service pattern not in state OK

```
export NAGIOS_HOST="nagios"
export NAGIOS_LIVESTATUS_SOCKET="/var/lib/nagios3/rw/livestatus"
tues -u root "puppet agent run --test" nagios puppet_status
```

The values of the environment variables above are the defaults, you do not need to specify them if they match your setup.

### Custom Providers

New providers may be added by putting a new executable with a name like "tues-provider-<name>"
on your PATH. A provider is expected to return a newline seperated list of hosts.

If the provider returns with an error, the output is considered to be an error message and/or
it help output. If '--help' is passed through to the provider the output is displayed no matter
what exit code is used.

{'fraction_non_alphanumeric': 0.07462686567164178, 'fraction_numerical': 0.00041459369817578774, 'mean_word_length': 4.338495575221239, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4679416', 'n_tokens_mistral': 698, 'n_tokens_neox': 679, 'n_words': 345}