-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Openstack metric service to Settings #13918
Add Openstack metric service to Settings #13918
Conversation
end | ||
|
||
def available_metric_services | ||
{"gnocchi" => "metric", "ceilometer" => "metering"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do 'metric' and 'metering' need to be capitalized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, but capitalized, thanks for comment.
f501f09
to
84af0e6
Compare
@miq-bot add_label euwe/yes,bug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally it looks fine. Couple of nitpick points that might help.
@@ -1306,6 +1306,7 @@ | |||
:ems_metrics_collector_worker_openstack_network: {} | |||
:ems_metrics_collector_worker_redhat: {} | |||
:ems_metrics_collector_worker_vmware: {} | |||
:ems_metrics_openstack_default_service: "auto" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, "auto"
simply means skip over the return
statement and default to gnocchi
?
I think that just having "gnocchi"
be the default here might be clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite - auto defaults to the current code path, where CF will attempt to connect to Gnocchi; if it can't, it'll then try Ceilometer. That means the default behavior is the same as the current behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, gotcha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"auto" (or any other string except "gnocchi" or "ceilometer") means use gnocchi with ceilometer fallback, what might have different behavior in Openstack than without fallback.
@@ -26,6 +26,8 @@ def perf_init_openstack | |||
raise "No EMS defined" if target.ext_management_system.nil? | |||
|
|||
metering_service, = Benchmark.realtime_block(:connect) do | |||
return target.ext_management_system.connect(:service => available_metric_services[metric_service_from_settings]) if \ | |||
available_metric_services.keys.include? metric_service_from_settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I were looking in the logs trying to figure out why I wasn't seeing metrics, I would want to see that which service was selected, I think.
It's probably worth selecting the service, log (even at debug level) which service was selected, then try to connect to that service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, updated.
Openstack Metrics capture service can be specified in settings.yml file. Valid values are "gnocchi", "ceilometer". All other values means autodetection. Related BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1421729
84af0e6
to
926623f
Compare
Checked commit aufi@926623f with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
I've tested with the config setting set to 'auto', 'ceilometer', and 'gnocchi' and everything seems to work as expected. Thanks! |
…ettings_master Add Openstack metric service to Settings (cherry picked from commit 05f1669) https://bugzilla.redhat.com/show_bug.cgi?id=1422241
Euwe backport details:
|
Openstack Metrics capture service can be specified in settings.yml file. Needed for OSP9 which contains both Gnocchi and Ceilometer (but Gnocchi does not have data there).
Possible values:
Links