DEPRECATED, Event storage and REST API for Ceilometer
Go to file
Chris Dent 2511cfb6e4 A dogpile cache of gnocchi resources
What this does is store a key value pair in oslo_cache where the key
is the resource id and the value is a hash of the frozenset of
the attributes of the resource less the defined metrics[1]. When it
is time to create or update a resource we ask the cache:

  Are the resource attributes I'm about to store the same as the
  last ones stored for this id?

If the answer is yes we don't need to store the resource. That's all
it does and that is all it needs to do because if the cache fails
to have the correct information that's the same as the cache not
existing in the first place.

To get this to work in the face of eventlet's eager beavering we
need to lock around create_resource and update_resource so that
we have a chance to write the cache before another *_resource is
called in this process. Superficial investigation shows that this
works out pretty well because when, for example, you start a new
instance the collector will all of sudden try several
_create_resources, only one of which actually needs to happen.
The lock makes sure only that one happens when there is just
one collector. Where there are several collectors that won't be
the case but _some_ of them will be stopped. And that's the point
here: better not perfect.

The cache is implemented using oslo_cache which can be configured
via oslo_config with an entry such as:

    [cache]
    backend = dogpile.cache.redis
    backend_argument = url:redis://localhost:6379
    backend_argument = db:0
    backend_argument = distributed_lock:True
    backend_argument = redis_expiration_time:600

The cache is exercised most for resource updates (as you might
expect) but does still sometimes get engaged for resource creates
(as described above).

A cache_key_mangler is used to ensure that keys generated by the
gnocchi dispatcher are in their own namespace.

[1] Metrics are not included because they are represented as
sub-dicts which are not hashable and thus cannot go in the
frozenset. Since the metrics are fairly static (coming from a yaml
file near you, soon) this shouldn't be a problem. If it is then we
can come up with a way to create a hash that can deal with
sub-dicts.

Closes-Bug: #1483634
Change-Id: I1f2da145ca87712cd2ff5b8afecf1bca0ba53788
2015-11-17 13:40:24 +00:00
ceilometer A dogpile cache of gnocchi resources 2015-11-17 13:40:24 +00:00
devstack install database when collector is enabled. 2015-11-13 19:40:14 -07:00
doc Merge "Remove dependency on sphinxcontrib-docbookrestapi" 2015-10-16 04:00:48 +00:00
etc Mv gabbi_pipeline.yaml into test directories 2015-11-03 16:30:01 +00:00
rally-jobs Fix links in README.rst 2015-09-04 11:18:33 +05:30
releasenotes add reno for release notes management 2015-11-11 10:35:22 -05:00
tools Merge "Correct the timestamp type when make test samples data" 2015-10-22 10:33:54 +00:00
.coveragerc Change ignore-errors to ignore_errors 2015-09-21 14:24:58 +00:00
.gitignore add reno for release notes management 2015-11-11 10:35:22 -05:00
.gitreview Update .gitreview for openstack. 2012-11-11 19:13:08 +00:00
.mailmap add mailmap to avoid dup of authors 2014-10-09 10:31:23 +03:00
.testr.conf Make ceilometer work correctly when hosted with a SCRIPT_NAME 2015-07-08 12:41:08 +00:00
CONTRIBUTING.rst Workflow documentation is now in infra-manual 2014-12-05 03:30:35 +00:00
HACKING.rst enable oslo namespace check for ceilometer project 2015-02-11 16:09:19 +08:00
LICENSE include a copy of the ASL 2.0 2013-03-15 14:25:48 +00:00
MAINTAINERS add rohit_ to MAINTAINERS 2015-11-05 08:42:40 -05:00
README.rst Rename README.md to README.rst 2013-07-14 21:09:38 +02:00
ReleaseNotes Update documentation URL 2012-12-05 10:22:43 +01:00
babel.cfg Ground work for transifex-ify ceilometer. 2012-12-18 10:14:03 +08:00
functions.sh Stop the tests if backend hasn't started 2015-07-15 21:22:00 +03:00
pylintrc Typo in pylintrc 2015-03-25 11:18:56 +01:00
requirements.txt Updated from global requirements 2015-11-13 17:09:30 +00:00
run-functional-tests.sh Add running functional scripts for defined backend 2015-06-04 16:29:02 +03:00
setup-test-env-es.sh Add running functional scripts for defined backend 2015-06-04 16:29:02 +03:00
setup-test-env-mongodb.sh Be explicit about using /tmp for temporary datafiles 2015-02-19 17:02:20 +00:00
setup-test-env-mysql.sh Switch from MySQL-python to PyMySQL 2015-05-20 01:03:58 +00:00
setup-test-env-postgresql.sh Close and dispose test database setup connections 2015-07-23 16:14:57 +00:00
setup.cfg Configure collector to only record meter or event 2015-09-30 09:58:45 +08:00
setup.py Updated from global requirements 2015-09-17 16:37:39 +00:00
test-requirements.txt A dogpile cache of gnocchi resources 2015-11-17 13:40:24 +00:00
tox.ini add reno for release notes management 2015-11-11 10:35:22 -05:00

README.rst

ceilometer

See the ReleaseNotes document and the project home for more info.

http://launchpad.net/ceilometer