Skip to content

Commit

Permalink
ncm-openstack: gather metrics from os services
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosimon committed Jul 8, 2019
1 parent cb24be2 commit 4a49bfc
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ncm-openstack/src/main/pan/components/openstack/common.pan
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ type openstack_oslo_concurrency = {
'lock_path' : absolute_file_path
};

@documentation{
The configuration options in 'oslo_messaging_notifications' Section.
}
type openstack_oslo_messaging_notifications = {
@{The drivers to handle sending notifications}
'driver' : choice('messaging', 'messagingv2', 'routing', 'log', 'test', 'noop') = 'messagingv2'
};

@documentation{
The configuration options in the DEFAULTS Section
}
Expand Down
21 changes: 21 additions & 0 deletions ncm-openstack/src/main/pan/components/openstack/compute/nova.pan
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,26 @@ type openstack_nova_DEFAULTS = {
NOTE: As of the 16.0.0 Pike release, this configuration option is ignored
for the ironic.IronicDriver compute driver and is hardcoded to 1.0}
"ram_allocation_ratio" ? double(0..)
@{This option enables periodic compute.instance.exists notifications. Each
compute node must be configured to generate system usage data. These
notifications are consumed by OpenStack Telemetry service}
"instance_usage_audit" ? boolean
@{Time period to generate instance usages for}
"instance_usage_audit_period" ? choice('hour', 'day', 'month', 'year')
@{If set, send compute.instance.update notifications on
instance state changes.
Please refer to:
https://docs.openstack.org/nova/latest/reference/notifications.html for
additional information on notifications.
* None - no notifications
* "vm_state" - notifications are sent with VM state transition information in
the ``old_state`` and ``state`` fields. The ``old_task_state`` and
``new_task_state`` fields will be set to the current task_state of the
instance.
* "vm_and_task_state" - notifications are sent with VM and task state
transition information}
"notify_on_state_change" ? choice('None', 'vm_state', 'vm_and_task_state')

};

@documentation{
Expand All @@ -288,6 +308,7 @@ type openstack_nova_common = {
'placement' : openstack_nova_placement
'cinder' ? openstack_nova_cinder
'neutron' ? openstack_nova_neutron
'oslo_messaging_notifications' ? openstack_oslo_messaging_notifications
};

type openstack_quattor_nova = openstack_quattor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ type openstack_glance_service_config = {
'paste_deploy' : openstack_keystone_paste_deploy
'glance_store' ? openstack_glance_store
'cors' ? openstack_cors
'oslo_messaging_notifications' ? openstack_oslo_messaging_notifications
};

type openstack_quattor_glance = openstack_quattor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ type openstack_neutron_service_config = {
'database' ? openstack_database
@{nova section has the same options than "keystone_authtoken" but with the nova user and passwod}
'nova' ? openstack_neutron_nova
'oslo_messaging_notifications' ? openstack_oslo_messaging_notifications
};

type openstack_quattor_neutron = openstack_quattor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ type openstack_heat_config = {
'trustee' : openstack_domains_common
'clients_keystone' : openstack_heat_clients_keystone
'clients' : openstack_heat_clients
'oslo_messaging_notifications' ? openstack_oslo_messaging_notifications
'quattor' : openstack_quattor_heat
};
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type openstack_cinder_config = {
'database' : openstack_database
'keystone_authtoken' : openstack_keystone_authtoken
'oslo_concurrency' : openstack_oslo_concurrency
'oslo_messaging_notifications' ? openstack_oslo_messaging_notifications
'lvm' ? openstack_cinder_lvm
'ceph' ? openstack_cinder_ceph
# default empty dict for pure hypervisor
Expand Down
6 changes: 6 additions & 0 deletions ncm-openstack/src/test/resources/common_resources.pan
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ prefix "/software/components/openstack/compute/nova";
"transport_url", format("rabbit://openstack:rabbit_pass@%s", OPENSTACK_HOST_SERVER),
"my_ip", MY_IP,
"rootwrap_config", "/etc/nova/rootwrap.conf",
"instance_usage_audit", true,
"instance_usage_audit_period", "hour",
"notify_on_state_change", "vm_and_task_state",
);
"keystone_authtoken" = dict(
"auth_uri", format('http://%s:5000', OPENSTACK_HOST_SERVER),
Expand All @@ -46,6 +49,9 @@ prefix "/software/components/openstack/compute/nova";
"oslo_concurrency" = dict(
"lock_path", "/var/lib/nova/tmp",
);
"oslo_messaging_notifications" = dict(
"driver", "messagingv2",
);
"placement" = dict(
"auth_url", format('http://%s:35357/v3', OPENSTACK_HOST_SERVER),
"username", "placement",
Expand Down

0 comments on commit 4a49bfc

Please sign in to comment.