Ceilometer + Gnocchi +aodh

Source: Internet
Author: User
Tags statsd

Deployment environment

System version: CentOS7

OpenStack Version: Mitaka

1. Create a Gnocchi database

1 CREATE DATABASE gnocchi;2GRANT all privileges the glance.* to'$USERNAME'@'localhost'Identified by'$PASSOWRD';3GRANT all privileges the glance.* to'$USERNAME'@'%'Identified by'$PASSOWRD';

2. Control node Installation Gnocchi

1 sudo Yum Install openstack-gnocchi-api openstack-gnocchi-carbonara openstack-gnocchi-2                  Openstack-gnocchi-doc openstack-gnocchi-indexer-sqlalchemy openstack-gnocchi-3                  Openstack-gnocchi-statsd

3. Create username and service

1OpenStack user Create--domain default--password-Prompt Gnocchi2OpenStack role Add--project service--User Gnocchi Admin3  4OpenStack Service Create--name gnocchi--description"OpenStack Metric"Metric5OpenStack Endpoint Create--region regionone metric public http://$CONTROLLER _ip:80416OpenStack Endpoint Create--region regionone metric Admin http://$CONTROLLER _ip:80417OpenStack Endpoint Create--region regionone metric internal http://$CONTROLLER _ip:8041

4. Configure Gnocchi

1vim/etc/gnocchi/gnocchi.conf2  3 [Database]4Backend =SQLAlchemy #配置存储index的数据库类型5  6  7 [Indexer]8url = mysql+pymysql://$USERNAME: [email protected] $CONTROLLER _ip/gnocchi9  Ten   One [Keystone_authtoken] #配置gnocchi服务的权限信息 AAuth_uri = http://$CONTROLLER _ip:5000/v2.0 -Identity_uri = http://$CONTROLLER _ip:35357/ -Admin_user =$USERNAME theAdmin_password =$PASSWORD -Admin_tenant_name =Service -Signing_dir =/var/cache/Gnocchi -   +   - [STATSD] #配置gnocchi服务的标识信息 (ignoring gnocchi sampled data), gnocchi service-related information +resource_id = AUSER_ID = atproject_id = -Archive_policy_name = Low -   -   - [storage] #配置storage的后端driver, default is file -Coordination_url =file:///Var/lib/gnocchi/locks inDriver =file -File_basepath =/var/lib/Gnocchi to   +--------------------------------------------------------------------------------------------------- -vim/etc/gnocchi/api-Paste.ini the   * [Pipeline:main] #鉴权请求, otherwise the operation policy.conf the specified admin cannot be performed $Pipeline = Gnocchi+auth

5. Initialize the database for the Gnocchi service (Mitaka version initializes the database and creates the default Archive-policy https://review.openstack.org/#/c/290626/)

1gnocchi-Upgrade2Gnocchi Archive-policy create-d granularity:5m,points: A-D granularity:1h,points: --D granularity:1d,points: - Low3Gnocchi Archive-policy create-d granularity:60s,points: --D granularity:1h,points:168-D granularity:1d,points:365Medium4Gnocchi Archive-policy create-d granularity:1s,points:86400-D granularity:1m,points:43200-D granularity:1h,points:8760 High5Gnocchi Archive-policy-rule create-a low-m"*"Default

6. Start the Gnocchi service

1 systemctl enable openstack-gnocchi-api.service2 systemctl enable openstack-gnocchi-  Metricd.service3 systemctl enable openstack-gnocchi-statsd.service4  5 systemctl start openstack-gnocchi-api.service6 systemctl start openstack-gnocchi-  Metricd.service7 systemctl start Openstack-gnocchi-statsd.service

7. Modify the Ceilometer configuration file

1vim/etc/ceilometer/ceilometer.conf2  3 [DEFAULT]4Meter_dispatchers =Gnocchi5  6 [API]7gnocchi_is_enabled =true8  9 [Dispatcher_gnocchi]TenFilter_project =Service #忽略service monitoring item for project OneFilter_service_activity =True Aurl = http://$CONTROLLER _ip:8041

8. Restart the Ceilometer service

1 systemctl restart openstack-ceilometer-api.service2 systemctl restart openstack-ceilometer-collector.service3 systemctl restart Openstack-ceilometer-notification.service

9. Example

Creating Ceilometer Alarms

1 Gnocchi Metric list2 Gnocchi Resource list3  4  5Ceilometer alarm-gnocchi-resources-threshold-create--name gnocchi_test_network--description'storage.objects.containers'--alarm-action'log://'--evaluation-periods2 6--aggregation-method Max--comparison-operator GT--threshold5871354.0-M Network.incoming.bytes--resource-type Instance_network_interface7--resource-IDAddbb3ba-5b1e-543f-ba8a-1010e5d36dbc--repeat-actionstrue

10. Reference documentation

Http://www.cnblogs.com/knitmesh/p/5464709.html

https://www.ustack.com/blog/telemetry/

Http://docs.openstack.org/developer/gnocchi/rest.html#archive-policy

Https://julien.danjou.info/blog/2014/openstack-ceilometer-the-gnocchi-experiment

Ceilometer + Gnocchi +aodh

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.