Skip to content

Commit 343e058

Browse files
committed
Add running the tool manually
1 parent 3340796 commit 343e058

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

README.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
os-capacity
22
===========
33

4-
This is a prototype tool to extract prototype information.
4+
This is a prototype tool to extract capacity information.
55

66
.. note::
77

@@ -25,6 +25,17 @@ Now lets get that installed inside a virtual environment:
2525
source .venv-test/bin/activate
2626
pip install -U .
2727
28+
Prometheus Exporter
29+
-------------------
30+
31+
Assuming you have clouds.yaml in the right place and OS_CLOUD set:
32+
33+
.. code::
34+
35+
./os_capacity/prometheus.py
36+
openstack_total_capacity_per_flavor{flavor="small"} 1
37+
openstack_capacity_by_hostname{hypervisor="aio",flavor="small"} 1
38+
2839
Configuration
2940
-------------
3041

os_capacity/commands/commands.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@
1818
from cliff.lister import Lister
1919

2020
from os_capacity.data import metrics
21+
from os_capacity import prometheus
2122
from os_capacity import utils
22-
from os_capacity.data import candidates
23+
2324

2425

2526
class PrometheusAll(Lister):
2627
"""To be run as node exporter textfile collector."""
2728
def take_action(self, parsed_args):
28-
candidates.print_exporter_data(self.app)
29+
prometheus.print_exporter_data(self.app)
2930
# TODO(johngarbutt) a total hack!
3031
return (('fake'), [])
3132

File renamed without changes.

0 commit comments

Comments
 (0)