<commit_before>cyanite-utils
=============

Tools for administering a Cyanite cluster

* cyanite-list
* cyanite-delete
<commit_msg>documentation<commit_after>cyanite-utils
=============

Tools for administering a [Cyanite](https://github.com/pyr/cyanite) cluster

* cyanite-list
* cyanite-delete
* cyanite-prune

# Install

Cyanite-utils is available from PyPi and can be installed via pip:

```
pip install cyanite-utils
```

# Config

Cyanite-utils expects /etc/cyanite.yaml or another configuration file that
defines:

* store.cluster (default 'localhost')
* store.keyspace (default 'metric')
* http.port (default 8080)
* carbon.rollups (no default)

## cyanite-list

```
usage: cyanite-list [-h] [-f CONFIG_FILE] [-k KEYSPACE] [-H CYANITE_HOST]
                    [-p HTTP_PORT] [-C CASSANDRA_HOST] [-v]
                    [METRIC [METRIC ...]]

List metrics

positional arguments:
  METRIC                metric name to search for (default: None)

optional arguments:
  -h, --help            show this help message and exit
  -f CONFIG_FILE, --config-file CONFIG_FILE
                        Config file to use (default: /etc/cyanite.yaml)
  -k KEYSPACE, --keyspace KEYSPACE
                        Keyspace name (default: metric)
  -H CYANITE_HOST, --cyanite-host CYANITE_HOST
                        Cyanite hostname (default: localhost)
  -p HTTP_PORT, --http-port HTTP_PORT
                        Cyanite http port (default: 8080)
  -C CASSANDRA_HOST, --cassandra-host CASSANDRA_HOST
                        Cassandra hostname (default: localhost)
  -v, --verbose         verbose (default: False)
```

## cyanite-delete

```
usage: cyanite-delete [-h] [-f CONFIG_FILE] [-k KEYSPACE] [-H CYANITE_HOST]
                      [-p HTTP_PORT] [-C CASSANDRA_HOST] [-v]
                      [METRIC [METRIC ...]]

Delete metrics

positional arguments:
  METRIC                metric name to delete (default: None)

optional arguments:
  -h, --help            show this help message and exit
  -f CONFIG_FILE, --config-file CONFIG_FILE
                        Config file to use (default: /etc/cyanite.yaml)
  -k KEYSPACE, --keyspace KEYSPACE
                        Keyspace name (default: metric)
  -H CYANITE_HOST, --cyanite-host CYANITE_HOST
                        Cyanite hostname (default: localhost)
  -p HTTP_PORT, --http-port HTTP_PORT
                        Cyanite http port (default: 8080)
  -C CASSANDRA_HOST, --cassandra-host CASSANDRA_HOST
                        Cassandra hostname (default: localhost)
  -v, --verbose         verbose (default: False)
```

## cyanite-prune

```
usage: cyanite-prune [-h] [-f CONFIG_FILE] [-k KEYSPACE] [-H CYANITE_HOST]
                     [-p HTTP_PORT] [-C CASSANDRA_HOST] [-v]
                     [METRIC [METRIC ...]]

Prune metrics

positional arguments:
  METRIC                metric name to prune (default: None)

optional arguments:
  -h, --help            show this help message and exit
  -f CONFIG_FILE, --config-file CONFIG_FILE
                        Config file to use (default: /etc/cyanite.yaml)
  -k KEYSPACE, --keyspace KEYSPACE
                        Keyspace name (default: metric)
  -H CYANITE_HOST, --cyanite-host CYANITE_HOST
                        Cyanite hostname (default: localhost)
  -p HTTP_PORT, --http-port HTTP_PORT
                        Cyanite http port (default: 8080)
  -C CASSANDRA_HOST, --cassandra-host CASSANDRA_HOST
                        Cassandra hostname (default: localhost)
  -v, --verbose         verbose (default: False)
```

{'fraction_non_alphanumeric': 0.10765753037581238, 'fraction_numerical': 0.004521051144391071, 'mean_word_length': 2.089005235602094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '2667293', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1072, 'n_words': 315}