Difference between revisions of "Ceilometer/blueprints/pollster-swift"
m (Text replace - "__NOTOC__" to "") |
|||
(6 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | ||
== pollster-swift blueprint == | == pollster-swift blueprint == | ||
Line 17: | Line 17: | ||
| '''Resource ID''' | | '''Resource ID''' | ||
| '''Volume unit''' | | '''Volume unit''' | ||
− | | ''' | + | | '''Metadata''' |
| '''Type''' | | '''Type''' | ||
|- | |- | ||
Line 24: | Line 24: | ||
| must | | must | ||
| swift account id | | swift account id | ||
− | | | + | | number of objects |
| | | | ||
| Gauge | | Gauge | ||
Line 41: | Line 41: | ||
| swift account id | | swift account id | ||
| number of containers | | number of containers | ||
− | | | + | | |
| Gauge | | Gauge | ||
|- | |- | ||
| o4 | | o4 | ||
− | | storage.objects | + | | storage.containers.objects |
| may | | may | ||
| container name | | container name | ||
+ | | number of objects | ||
| | | | ||
− | |||
| Gauge | | Gauge | ||
|- | |- | ||
| o5 | | o5 | ||
− | | storage.objects.size | + | | storage.containers.objects.size |
| may | | may | ||
| container name | | container name | ||
+ | | bytes | ||
| | | | ||
− | |||
| Gauge | | Gauge | ||
|- | |- | ||
Line 63: | Line 63: | ||
| storage.objects.upload.internal | | storage.objects.upload.internal | ||
| may | | may | ||
− | | | + | | container name |
| number of req | | number of req | ||
| | | | ||
Line 71: | Line 71: | ||
| storage.objects.download.internal | | storage.objects.download.internal | ||
| may | | may | ||
− | | | + | | container name |
| number of req | | number of req | ||
| | | | ||
Line 79: | Line 79: | ||
| storage.objects.update.internal | | storage.objects.update.internal | ||
| may | | may | ||
− | | | + | | container name |
| number of req | | number of req | ||
| | | | ||
Line 87: | Line 87: | ||
| storage.objects.delete.internal | | storage.objects.delete.internal | ||
| may | | may | ||
− | | | + | | container name |
| number of req | | number of req | ||
| | | | ||
Line 95: | Line 95: | ||
| storage.objects.upload.size.internal | | storage.objects.upload.size.internal | ||
| may | | may | ||
− | | | + | | container name |
| bytes | | bytes | ||
| | | | ||
Line 103: | Line 103: | ||
| storage.objects.download.size.internal | | storage.objects.download.size.internal | ||
| may | | may | ||
− | | | + | | container name |
| bytes | | bytes | ||
| | | | ||
Line 111: | Line 111: | ||
| storage.objects.update.size.internal | | storage.objects.update.size.internal | ||
| may | | may | ||
− | | | + | | container name |
| bytes | | bytes | ||
| | | | ||
Line 119: | Line 119: | ||
| storage.objects.delete.size.internal | | storage.objects.delete.size.internal | ||
| may | | may | ||
− | | | + | | container name |
| bytes | | bytes | ||
| | | | ||
Line 127: | Line 127: | ||
| storage.objects.upload.external | | storage.objects.upload.external | ||
| may | | may | ||
− | | | + | | container name |
| number of req | | number of req | ||
| | | | ||
Line 135: | Line 135: | ||
| storage.objects.download.external | | storage.objects.download.external | ||
| may | | may | ||
− | | | + | | container name |
| number of req | | number of req | ||
| | | | ||
Line 143: | Line 143: | ||
| storage.objects.update.external | | storage.objects.update.external | ||
| may | | may | ||
− | | | + | | container name |
| number of req | | number of req | ||
| | | | ||
Line 151: | Line 151: | ||
| storage.objects.delete.external | | storage.objects.delete.external | ||
| may | | may | ||
− | | | + | | container name |
| number of req | | number of req | ||
| | | | ||
Line 159: | Line 159: | ||
| storage.objects.upload.size.external | | storage.objects.upload.size.external | ||
| may | | may | ||
− | | | + | | container name |
| bytes | | bytes | ||
| | | | ||
Line 167: | Line 167: | ||
| storage.objects.download.size.external | | storage.objects.download.size.external | ||
| may | | may | ||
− | | | + | | container name |
| bytes | | bytes | ||
| | | | ||
Line 175: | Line 175: | ||
| storage.objects.update.size.external | | storage.objects.update.size.external | ||
| may | | may | ||
− | | | + | | container name |
| bytes | | bytes | ||
| | | | ||
Line 183: | Line 183: | ||
| storage.objects.delete.size.external | | storage.objects.delete.size.external | ||
| may | | may | ||
+ | | container name | ||
+ | | bytes | ||
+ | | | ||
+ | | Delta | ||
+ | |- | ||
+ | | o22 | ||
+ | | storage.objects.incoming.bytes | ||
+ | | must | ||
+ | | swift account id | ||
+ | | bytes | ||
+ | | | ||
+ | | Delta | ||
+ | |- | ||
+ | | o23 | ||
+ | | storage.objects.outgoing.bytes | ||
+ | | must | ||
| swift account id | | swift account id | ||
| bytes | | bytes | ||
Line 190: | Line 206: | ||
The counters o1 to o5 must be implemented through polling of Swift. | The counters o1 to o5 must be implemented through polling of Swift. | ||
+ | |||
+ | For polling Swift, there exists 2 way: | ||
+ | |||
+ | 1. Go through swift-proxy as an user with [[ResellerAdmin]] role on one of this tenant, using this tenant to get a token | ||
+ | |||
+ | 2. Use the ring to determine the right swift-<type>-server and request information from it directly. The swift-account-server can provides number and size of objects stored in all containers, and the number of containers, and the list of container. The swift-container-server can provides number number of objects and size of each container. | ||
+ | |||
+ | Option 1 should be simpler and cleaner in a first time, but puts more load on Keystone. Option 2 could be preferred, if implemented, via an option. | ||
The counters o6 to o21 should be implemented via a Swift middleware counting requests and their size and publishing counters regularly. | The counters o6 to o21 should be implemented via a Swift middleware counting requests and their size and publishing counters regularly. | ||
To distinguish network, it is suggested that we start this implementation by using a configuration file listing internal networks, which by default should list A, B and C private network class (RFC 1918). | To distinguish network, it is suggested that we start this implementation by using a configuration file listing internal networks, which by default should list A, B and C private network class (RFC 1918). |
Latest revision as of 23:29, 17 February 2013
pollster-swift blueprint
Use Cases
- Provider wants to retrieve data about swift usage to bill his customers
- Customer wants to monitor his usage of swift
Proposed implementation
The following is a first list of meters that needs to be collected in order to allow billing systems to perform their tasks on swift. This list must be expandable over time and each administrator must have the possibility to enable or disable each meter based on his local needs
Meter name | Priority | Resource ID | Volume unit | Metadata | Type | |
o1 | storage.objects | must | swift account id | number of objects | Gauge | |
o2 | storage.objects.size | must | swift account id | bytes | Gauge | |
o3 | storage.objects.containers | must | swift account id | number of containers | Gauge | |
o4 | storage.containers.objects | may | container name | number of objects | Gauge | |
o5 | storage.containers.objects.size | may | container name | bytes | Gauge | |
o6 | storage.objects.upload.internal | may | container name | number of req | Delta | |
o7 | storage.objects.download.internal | may | container name | number of req | Delta | |
o8 | storage.objects.update.internal | may | container name | number of req | Delta | |
o9 | storage.objects.delete.internal | may | container name | number of req | Delta | |
o10 | storage.objects.upload.size.internal | may | container name | bytes | Delta | |
o11 | storage.objects.download.size.internal | may | container name | bytes | Delta | |
o12 | storage.objects.update.size.internal | may | container name | bytes | Delta | |
o13 | storage.objects.delete.size.internal | may | container name | bytes | Delta | |
o14 | storage.objects.upload.external | may | container name | number of req | Delta | |
o15 | storage.objects.download.external | may | container name | number of req | Delta | |
o16 | storage.objects.update.external | may | container name | number of req | Delta | |
o17 | storage.objects.delete.external | may | container name | number of req | Delta | |
o18 | storage.objects.upload.size.external | may | container name | bytes | Delta | |
o19 | storage.objects.download.size.external | may | container name | bytes | Delta | |
o20 | storage.objects.update.size.external | may | container name | bytes | Delta | |
o21 | storage.objects.delete.size.external | may | container name | bytes | Delta | |
o22 | storage.objects.incoming.bytes | must | swift account id | bytes | Delta | |
o23 | storage.objects.outgoing.bytes | must | swift account id | bytes | Delta |
The counters o1 to o5 must be implemented through polling of Swift.
For polling Swift, there exists 2 way:
1. Go through swift-proxy as an user with ResellerAdmin role on one of this tenant, using this tenant to get a token
2. Use the ring to determine the right swift-<type>-server and request information from it directly. The swift-account-server can provides number and size of objects stored in all containers, and the number of containers, and the list of container. The swift-container-server can provides number number of objects and size of each container.
Option 1 should be simpler and cleaner in a first time, but puts more load on Keystone. Option 2 could be preferred, if implemented, via an option.
The counters o6 to o21 should be implemented via a Swift middleware counting requests and their size and publishing counters regularly.
To distinguish network, it is suggested that we start this implementation by using a configuration file listing internal networks, which by default should list A, B and C private network class (RFC 1918).