https://github.com/sovereigncloudstack/metering
Metering for the purpose of billing
https://github.com/sovereigncloudstack/metering
Last synced: 7 months ago
JSON representation
Metering for the purpose of billing
- Host: GitHub
- URL: https://github.com/sovereigncloudstack/metering
- Owner: SovereignCloudStack
- License: agpl-3.0
- Created: 2023-07-19T09:48:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T09:09:26.000Z (over 1 year ago)
- Last Synced: 2025-03-02T21:16:06.258Z (12 months ago)
- Language: Python
- Homepage: https://scs.community/
- Size: 94.7 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
# Metering Sink
This tool is a proof-of-concept for directly using Ceilometer HTTP/JSON
publisher data to implement metering for the purposes of billing customers for
resource usage.
The motivation is that many cloud service providers these days go beyond just
IaaS (or IaaS may even just be a means to an end, e.g. for PaaS offerings on
top). This generally implies that built-in end-to-end mechanisms in OpenStack
for billing may not be adequate or there already exist platforms which handle
the billing process which must be integrated into OpenStack.
The OpenStack Ceilometer project collects resource usage information from event
and polled data throughout OpenStack. It provides this usage data to a
"web hook" (HTTP publisher) in realtime.
The tool in this repository uses this data to decompose and process it and
write it into any of the pluggable backends.
**Note:** This tool is in a proof-of-concept stage.
Currently, two plugins exist:
* The odoo plugin which writes to an Odoo sales-order
* A simple textfile output for debugging purposes.
## Usage
To use the api just start it with
```shell
$ python -m metersink
```
For usage please consult:
```shell
$ python -m metersink -h
usage: __main__.py [-h] [--config CONFIG_FILE] [-v]
options:
-h, --help show this help message and exit
--config CONFIG_FILE, -c CONFIG_FILE
The config file to use
-v, --verbose increase output verbosity
```
## Configuration
Refer to `settings_template.conf` for additional documentation on the
configuration. Copy the template and pass the path to the copy via the `-c`
command line flag to use it.