From 9a5bd65a65f3f287fcc2e0619aa271fa58b60b86 Mon Sep 17 00:00:00 2001 From: Francisco Redondo Marchena Date: Thu, 21 May 2015 17:03:05 +0000 Subject: Openstack: Add back the custom configuration for ceilometer Add configuration to get VM information using libvirt. Change-Id: I3f1f272600b89abe64d7361acedfd6447a90d0b9 --- openstack-ceilometer.configure | 2 + .../usr/share/openstack/ceilometer/ceilometer.conf | 85 +++++++++++----------- 2 files changed, 46 insertions(+), 41 deletions(-) diff --git a/openstack-ceilometer.configure b/openstack-ceilometer.configure index 9c0b7b6d..a98c4d73 100644 --- a/openstack-ceilometer.configure +++ b/openstack-ceilometer.configure @@ -66,6 +66,7 @@ if [ -z "$KEYSTONE_TEMPORARY_ADMIN_TOKEN" -o \ -z "$RABBITMQ_USER" -o \ -z "$RABBITMQ_PASSWORD" -o \ -z "$MANAGEMENT_INTERFACE_IP_ADDRESS" -o \ + -z "$NOVA_VIRT_TYPE" -o \ -z "$CONTROLLER_HOST_ADDRESS" ]; then echo Some options required for Ceilometer were defined, but not all. exit 1 @@ -114,6 +115,7 @@ ceilometer_configuration={ 'RABBITMQ_PASSWORD': os.environ['RABBITMQ_PASSWORD'], 'MANAGEMENT_INTERFACE_IP_ADDRESS': os.environ['MANAGEMENT_INTERFACE_IP_ADDRESS'], 'CONTROLLER_HOST_ADDRESS': os.environ['CONTROLLER_HOST_ADDRESS'], + 'NOVA_VIRT_TYPE': os.environ['NOVA_VIRT_TYPE'], } yaml.dump(ceilometer_configuration, sys.stdout, default_flow_style=False) diff --git a/openstack/usr/share/openstack/ceilometer/ceilometer.conf b/openstack/usr/share/openstack/ceilometer/ceilometer.conf index 66a1db14..b1ad2f47 100644 --- a/openstack/usr/share/openstack/ceilometer/ceilometer.conf +++ b/openstack/usr/share/openstack/ceilometer/ceilometer.conf @@ -4,13 +4,15 @@ # From ceilometer # +auth_strategy = keystone + # To reduce large requests at same time to Nova or other components # from different compute agents, shuffle start time of polling task. # (integer value) #shuffle_time_before_polling_task = 0 # Configuration file for WSGI definition of API. (string value) -#api_paste_config = api_paste.ini +api_paste_config = api_paste.ini # Number of workers for Ceilometer API server. (integer value) #api_workers = 1 @@ -24,10 +26,10 @@ #pollster_list = [] # Exchange name for Nova notifications. (string value) -#nova_control_exchange = nova +nova_control_exchange = nova # List of metadata prefixes reserved for metering use. (list value) -#reserved_metadata_namespace = metering. +reserved_metadata_namespace = metering. # Limit on length of reserved metadata values. (integer value) #reserved_metadata_length = 256 @@ -37,11 +39,11 @@ #reserved_metadata_keys = # Inspector to use for inspecting the hypervisor layer. (string value) -#hypervisor_inspector = libvirt +hypervisor_inspector = libvirt # Libvirt domain type. (string value) # Allowed values: kvm, lxc, qemu, uml, xen -#libvirt_type = kvm +libvirt_type = {{ NOVA_VIRT_TYPE }} # Override the default libvirt URI (which is dependent on # libvirt_type). (string value) @@ -55,7 +57,7 @@ #dispatcher = database # Exchange name for Keystone notifications. (string value) -#keystone_control_exchange = keystone +keystone_control_exchange = keystone # Number of items to request in each paginated Glance API request # (parameter used by glancecelient). If this is less than or equal to @@ -64,10 +66,10 @@ #glance_page_size = 0 # Exchange name for Glance notifications. (string value) -#glance_control_exchange = glance +glance_control_exchange = glance # Exchange name for Ironic notifications. (string value) -#ironic_exchange = ironic +ironic_exchange = ironic # Exchanges name to listen for notifications. (multi valued) #http_control_exchanges = nova @@ -77,7 +79,7 @@ # Exchange name for Neutron notifications. (string value) # Deprecated group/name - [DEFAULT]/quantum_control_exchange -#neutron_control_exchange = neutron +neutron_control_exchange = neutron # Allow novaclient's debug log output. (boolean value) #nova_http_log_debug = false @@ -135,7 +137,7 @@ # Use syslog for logging. Existing syslog format is DEPRECATED during # I, and will change in J to honor RFC5424. (boolean value) -#use_syslog = false +use_syslog = True # (Optional) Enables or disables syslog rfc5424 format for logging. If # enabled, prefixes the MSG part of the syslog message with APP-NAME @@ -181,10 +183,10 @@ #heat_control_exchange = heat # Configuration file for pipeline definition. (string value) -#pipeline_cfg_file = pipeline.yaml +pipeline_cfg_file = pipeline.yaml # Configuration file for event pipeline definition. (string value) -#event_pipeline_cfg_file = event_pipeline.yaml +event_pipeline_cfg_file = event_pipeline.yaml # Exchange name for DBaaS notifications. (string value) #trove_control_exchange = trove @@ -218,10 +220,10 @@ # Path to the rootwrap configuration file touse for running commands # as root (string value) -#rootwrap_config = /etc/ceilometer/rootwrap.conf +rootwrap_config = /etc/ceilometer/rootwrap.conf # Exchange name for Cinder notifications. (string value) -#cinder_control_exchange = cinder +cinder_control_exchange = cinder # # From oslo.messaging @@ -282,7 +284,7 @@ # The messaging driver to use, defaults to rabbit. Other drivers # include qpid and zmq. (string value) -#rpc_backend = rabbit +rpc_backend = rabbit # The default exchange under which topics are scoped. May be # overridden by an exchange name specified in the transport_url @@ -316,7 +318,7 @@ # The topic that ceilometer uses for alarm notifier messages. (string # value) -#notifier_rpc_topic = alarm_notifier +notifier_rpc_topic = alarm_notifier # The topic that ceilometer uses for alarm partition coordination # messages. DEPRECATED: RPC-based partitionedalarm evaluation service @@ -351,10 +353,10 @@ # The port for the ceilometer API server. (integer value) # Deprecated group/name - [DEFAULT]/metering_api_port -#port = 8777 +port = 8777 # The listen IP for the ceilometer API server. (string value) -#host = 0.0.0.0 +host = {{ MANAGEMENT_INTERFACE_IP_ADDRESS }} # Toggle Pecan Debug Middleware. (boolean value) #pecan_debug = false @@ -488,6 +490,7 @@ # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = +connection=postgresql://{{ CEILOMETER_DB_USER }}:{{ CEILOMETER_DB_PASSWORD }}@{{ CONTROLLER_HOST_ADDRESS }}/ceilometer # The SQLAlchemy connection string to use to connect to the slave # database. (string value) @@ -593,7 +596,7 @@ # # Configuration file for event definitions. (string value) -#definitions_cfg_file = event_definitions.yaml +definitions_cfg_file = event_definitions.yaml # Drop notifications if no event definition matches. (Otherwise, we # convert them with just the default traits) (boolean value) @@ -642,7 +645,7 @@ # # Complete public Identity API endpoint. (string value) -#auth_uri = +auth_uri = http://{{ CONTROLLER_HOST_ADDRESS }}:5000/v2.0 # API version of the admin Identity API endpoint. (string value) #auth_version = @@ -785,7 +788,7 @@ # Complete admin Identity API endpoint. This should specify the # unversioned root endpoint e.g. https://localhost:35357/ (string # value) -#identity_uri = +identity_uri = http://{{ CONTROLLER_HOST_ADDRESS }}:35357 # This option is deprecated and may be removed in a future release. # Single shared secret with the Keystone configuration used for @@ -795,13 +798,13 @@ #admin_token = # Service username. (string value) -#admin_user = +admin_user = {{ CEILOMETER_SERVICE_USER }} # Service user password. (string value) -#admin_password = +admin_password = {{ CEILOMETER_SERVICE_PASSWORD }} # Service tenant name. (string value) -#admin_tenant_name = admin +admin_tenant_name = service [matchmaker_redis] @@ -1047,12 +1050,12 @@ # The RabbitMQ broker address where a single node is used. (string # value) # Deprecated group/name - [DEFAULT]/rabbit_host -#rabbit_host = localhost +rabbit_host = {{ RABBITMQ_HOST }} # The RabbitMQ broker port where a single node is used. (integer # value) # Deprecated group/name - [DEFAULT]/rabbit_port -#rabbit_port = 5672 +rabbit_port = {{ RABBITMQ_PORT }} # RabbitMQ HA cluster host:port pairs. (list value) # Deprecated group/name - [DEFAULT]/rabbit_hosts @@ -1060,15 +1063,15 @@ # Connect over SSL for RabbitMQ. (boolean value) # Deprecated group/name - [DEFAULT]/rabbit_use_ssl -#rabbit_use_ssl = false +rabbit_use_ssl = false # The RabbitMQ userid. (string value) # Deprecated group/name - [DEFAULT]/rabbit_userid -#rabbit_userid = guest +rabbit_userid = {{ RABBITMQ_USER }} # The RabbitMQ password. (string value) # Deprecated group/name - [DEFAULT]/rabbit_password -#rabbit_password = guest +rabbit_password = {{ RABBITMQ_PASSWORD }} # The RabbitMQ login method. (string value) # Deprecated group/name - [DEFAULT]/rabbit_login_method @@ -1076,7 +1079,7 @@ # The RabbitMQ virtual host. (string value) # Deprecated group/name - [DEFAULT]/rabbit_virtual_host -#rabbit_virtual_host = / +rabbit_virtual_host = / # How frequently to retry connecting with RabbitMQ. (integer value) #rabbit_retry_interval = 1 @@ -1120,12 +1123,12 @@ # The JSON file that defines policies. (string value) # Deprecated group/name - [DEFAULT]/policy_file -#policy_file = policy.json +policy_file = policy.json # Default rule. Enforced when a requested rule is not found. (string # value) # Deprecated group/name - [DEFAULT]/policy_default_rule -#policy_default_rule = default +policy_default_rule = default # Directories where policy configuration files are stored. They can be # relative to any directory in the search path defined by the @@ -1216,11 +1219,11 @@ # User name to use for OpenStack service access. (string value) # Deprecated group/name - [DEFAULT]/os_username -#os_username = ceilometer +os_username = {{ CEILOMETER_SERVICE_USER }} # Password to use for OpenStack service access. (string value) # Deprecated group/name - [DEFAULT]/os_password -#os_password = admin +os_password = {{ CEILOMETER_SERVICE_PASSWORD }} # Tenant ID to use for OpenStack service access. (string value) # Deprecated group/name - [DEFAULT]/os_tenant_id @@ -1228,22 +1231,22 @@ # Tenant name to use for OpenStack service access. (string value) # Deprecated group/name - [DEFAULT]/os_tenant_name -#os_tenant_name = admin +os_tenant_name = service # Certificate chain for SSL validation. (string value) #os_cacert = # Auth URL to use for OpenStack service access. (string value) # Deprecated group/name - [DEFAULT]/os_auth_url -#os_auth_url = http://localhost:5000/v2.0 +os_auth_url = http://{{ CONTROLLER_HOST_ADDRESS }}:5000/v2.0 # Region name to use for OpenStack service endpoints. (string value) # Deprecated group/name - [DEFAULT]/os_region_name -#os_region_name = +os_region_name = regionOne # Type of endpoint in Identity service catalog to use for # communication with OpenStack services. (string value) -#os_endpoint_type = publicURL +os_endpoint_type = internalURL # Disables X.509 certificate validation when an SSL connection to # Identity Service is established. (boolean value) @@ -1260,13 +1263,13 @@ #kwapi = energy # Glance service type. (string value) -#glance = image +glance = image # Neutron service type. (string value) -#neutron = network +neutron = network # Nova service type. (string value) -#nova = compute +nova = compute # Radosgw service type. (string value) #radosgw = object-store -- cgit v1.2.1