Skip to content
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

Prometheus Alerts Endpoint: add detection #2663

Merged
merged 3 commits into from Nov 10, 2017

Conversation

moolitayer
Copy link

Currently for OpenShift we have detection for both metrics implementations (Hawkular, Prometheus)
but not for alerts (Prometheus).

out

@moolitayer
Copy link
Author

@miq-bot add_label gaprindashvili/yes, bug

@moolitayer
Copy link
Author

@yaacov @AparnaKarve please review.
I added a commit removing the default route, we don't need it.

$scope.updateAlertsHostname(data.hostname);
} else {
$scope.updateMetricsHostname(data.hostname);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these 2 functions be consolidated into 1?

$scope.updateHostname(data.hostname);
$scope.updateHostname = function(value) {
  if ($scope.currentTab === "alerts") {
    $scope.emsCommonModel.prometheus_alerts_hostname = value;
  } else {
    $scope.emsCommonModel.metrics_hostname = value;
  }
};

@@ -84,7 +84,8 @@
"checkchange" => "",
"required" => "",
"selectpicker-for-select-tag" => "")

%input{:type => 'text', :id => "current_tab", :name => "current_tab", "ng-model" => "currentTab",
"ng-hide" => "true"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change this to the standard way of writing a hash - which is 1 key/value per line?

or include everything in 1 line.

@AparnaKarve
Copy link
Contributor

@moolitayer Looks good for the most part, with just a few minor things above.

"hawkular" => %w(hawkular-metrics openshift-infra),
"prometheus" => %w(prometheus prometheus)
"hawkular" => %w(hawkular-metrics openshift-infra),
"prometheus" => %w(prometheus prometheus),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's just got changed to: prometheus openshift-metrics :-)

see:
openshift/openshift-ansible#6060

@yaacov
Copy link
Member

yaacov commented Nov 9, 2017

I'm also fine with that except for @AparnaKarve things

about the new project name for the prometheus route, we can do it in a new PR or here ...

@moolitayer
Copy link
Author

@AparnaKarve @yaacov addressed comments PTAL

Applied the Prometheus project name change to the metrics as well.
cc @zgalor

@@ -611,12 +611,16 @@ ManageIQ.angular.app.controller('emsCommonFormController', ['$http', '$scope', '
});
};

$scope.updateAuthStatus = function(updatedValue) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need the $scope.updateAuthStatus function any more ?
It is removed in a PR that does not deal with authStatus, what am I missing ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moolitayer I think you removed the wrong function.
You probably meant to remove updateAlertsHostname.

@yaacov Thanks.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, thanks

@moolitayer
Copy link
Author

Updated tests for the new hostname
@AparnaKarve @yaacov please take a look.

@miq-bot
Copy link
Member

miq-bot commented Nov 9, 2017

Checked commits moolitayer/manageiq-ui-classic@772cfa6~...e2dc118 with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0
3 files checked, 0 offenses detected
Everything looks fine. 👍

Copy link
Member

@yaacov yaacov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@AparnaKarve
Copy link
Contributor

LGTM as well.
Thanks @moolitayer and @yaacov

@mzazrivec mzazrivec self-assigned this Nov 10, 2017
@mzazrivec mzazrivec added this to the Sprint 73 Ending Nov 13, 2017 milestone Nov 10, 2017
@mzazrivec mzazrivec merged commit a458f49 into ManageIQ:master Nov 10, 2017
@moolitayer
Copy link
Author

Thanks for helping out @AparnaKarve 🎉

simaishi pushed a commit that referenced this pull request Nov 15, 2017
Prometheus Alerts Endpoint: add detection
(cherry picked from commit a458f49)
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit a11a25a33658195fe063a32cdbc0150f122a49a7
Author: Milan Zázrivec <mzazrivec@redhat.com>
Date:   Fri Nov 10 09:23:33 2017 +0100

    Merge pull request #2663 from moolitayer/alerts_detection
    
    Prometheus Alerts Endpoint: add detection
    (cherry picked from commit a458f4955fc41390b5c0f3a4c933dc74e7c4c5b8)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants