2. Hello!
I am Gordon Chung
Engineer at Huawei Technologies Canada
You can find me at gord[at]live.ca and @gordchung
3. What we’ll talk about today
◎ What is Gnocchi?
(history, reasons, features)
◎ How does Gnocchi work?
(technology, principles)
◎ How to use Gnocchi?
(install, config, SDK)
5. Perfect solution
Scalable
Targeting cloud
platforms where
thousands of
instances and
resources pop up
every day.
Storing and
retrieving data
should be fast.
Easy to use
Provide an API
that makes it easy
to program
against the
solution. Build
any kind of
solution easily
(billing, capacity
planning,
statistical
analysis…)
Easy to operate
Installation and
operation should
be easy for
administrators
used to standard
UNIX tools.
7. Existing solutions
◎ Graphite
◉ Not scalable
◉ Poor code base
◉ Not modulable
◎ InfluxDB
◉ Does not work
◉ Does not scale
◎ OpenTSDB
◉ Need to set up Hadoop
…
8. Gnocchi – started in May 2014
Started in OpenStack
Telemetry
Designed to solve
Ceilometer storage issue
back then.
But work stand-alone
since the beginning!
Easy to install
pip install gnocchi
Written in Python
With some standard
used libraries
(SQLAlchemy,
Pandas/Numpy...)
Free Software
Apache Licensed.
Documented
Everything is
documented.
“No doc: no merge”
policy.
Distributed & resilient
Design to run on cloud
platforms. Native
high-availability and
workload distribution
support.
9. Awesome features!
Search by metric value,
compute aggregations
Look into metrics value
and search for outliers.
Compute aggregation
across several metrics.
Compression
Using LZ4 compression
to compress data on the
fly. Fast, reduce storage
usage between x2-5.
Multi-tenant
ACL that guarantees
your different tenants
can’t see each other
resources. But the admin
can see everything.
Customizable. Batching
Send batch of measures
in one single HTTP call.
Collectd, Nagios &
statsd support
If you’re already a
Graphite user or you’re
polling tool support
statsd, it’s drop-in
compatible.
Same for Nagios.
HTTP REST API
That’s what’s used by
the `gnocchi’ CLI. Add
--debug to discover the
HTTP requests, or read
the API specs!
Trigger alarms
Using Aodh, Hawkular to
evaluate your alarms.
Aggregation as first
class
Aggregate measures on
ingestion rather than on
request.
14. Index
Any RDBMS
supported by
SQLAlchemy.
Best choice:
PostgreSQL.
Though MySQL is
also supported, sigh.
Backends
Storage
Simple deployment?
Plain files (with NFS if
you want).
Scalable and robust?
Go for Ceph.
Less durable but fast?
Try Redis.
Got OpenStack?
Leverage Swift.
On AWS, use S3.
24. Manipulating time-series (sneak peak)
Aggregation across multiple metrics
➔ curl -X POST http://gnocchi-url/v1/aggregates/fetch
-d ‘{“operations”:
“(aggregate mean (metric (metric-idA mean) (metric-idB mean)))”}’
Compute rolling mean
➔ curl -X POST http://gnocchi-url/v1/aggregates/fetch
-d ‘{“operations”: “(rolling mean 5 (metric stockA-id mean))”}’
Compute cpu utilisation from cputime
➔ curl -X POST http://gnocchi-url/v1/aggregates/fetch
-d ‘{“operations”:
“(- 100 (/ (metric metric-id-cputime-delta last) 10000000000))”}’
* disclaimer: still work in progress so syntax might change
28. Write throughput
Hardware:
24 core Xeon
20 OSD
256 GB RAM
Capacity:
Incoming: ~1.35 million
measures/s
Full report: https://medium.com/@gord.chung/gnocchi-4-introspective-a83055e99776
29. Aggregation performance
Hardware:
24 core Xeon
20 OSD
256 GB RAM
Test Case:
Send 10K metrics with
720 measures each
every 10 minutes
Full report: https://medium.com/@gord.chung/gnocchi-4-introspective-a83055e99776
30. Thanks!
Any questions?
You can find me at gord@live.ca or
Julien Danjou, @juldanjou and julien@danjou.info
http://gnocchi.xyz
#gnocchi @ Freenode
31. Credits
Special thanks to all the people
who made and released these
awesome resources for free:
◎ Presentation template by
SlidesCarnival
◎ Photographs by Unsplash