<commit_before># usage
A simple approach on getting usage/billing information from ceilometer

### Still a work in progress and not meant to be used in production.
- Works for gauge meters where resource metadata includes created_at and deleted_at
- Works for cumulative meters
- Delta meters maybe added in the future
- A console script/cli tool is planned.
- Some work may have to be done to configure cinder notifications and audits.

### Sample configuration
```yaml
auth_kwargs:
  auth_url: your_auth_url
  username: your_user_name
  password: <PASSWORD>
  project_name: your_project_name
  user_domain_name: your_user_domain_name
  project_domain_name: your_project_domain_name
```

### Requirements
- python-ceilometerclient

### Installation
```shell

# Clone this repo
git clone https://github.com/absalon-james/usage.git

# Setup the configuration file with credentials
mkdir -p /etc/usage
cp usage/sample-usage.yaml /etc/usage/usage.yaml

# Run setup.py develop

cd usage
python setup.py develop
```<commit_msg>Updated readme.<commit_after># usage
A simple approach on getting usage/billing information from ceilometer

### Still a work in progress and not meant to be used in production.
- Works for gauge meters where resource metadata includes created_at and deleted_at
- Works for cumulative meters
- Delta meters maybe added in the future
- A console script/cli tool is planned.
- Some work may have to be done to configure cinder notifications and audits.

### Sample configuration
```yaml
auth_kwargs:
  auth_url: your_auth_url
  username: your_user_name
  password: <PASSWORD>
  project_name: your_project_name
  user_domain_name: your_user_domain_name
  project_domain_name: your_project_domain_name
```

### Requirements

- apt-get install python-dev
- pip install python-ceilometerclient
- pip install positional
- pip install babel

### Installation
```shell

# Clone this repo
git clone https://github.com/absalon-james/usage.git

# Setup the configuration file with credentials
mkdir -p /etc/usage
cp usage/sample-usage.yaml /etc/usage/usage.yaml

# Run setup.py develop

cd usage
python setup.py develop
```
{'fraction_non_alphanumeric': 0.07032348804500703, 'fraction_numerical': 0.0, 'mean_word_length': 4.690666666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '6377956', 'n_tokens_mistral': 617, 'n_tokens_neox': 597, 'n_words': 234}