File tree Expand file tree Collapse file tree
x-pack/plugins/monitoring Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,12 +163,12 @@ export class MonitoringViewBaseController {
163163 if ( isSetupModeFeatureEnabled ( SetupModeFeature . MetricbeatMigration ) ) {
164164 promises . push ( updateSetupModeData ( ) ) ;
165165 }
166- this . updateDataPromise = new PromiseWithCancel ( Promise . all ( promises ) ) ;
166+ this . updateDataPromise = new PromiseWithCancel ( Promise . allSettled ( promises ) ) ;
167167 return this . updateDataPromise . promise ( ) . then ( ( [ pageData , alerts ] ) => {
168168 $scope . $apply ( ( ) => {
169169 this . _isDataInitialized = true ; // render will replace loading screen with the react component
170- $scope . pageData = this . data = pageData ; // update the view's data with the fetch result
171- $scope . alerts = this . alerts = alerts ;
170+ $scope . pageData = this . data = pageData . value ; // update the view's data with the fetch result
171+ $scope . alerts = this . alerts = alerts . value || { } ;
172172 } ) ;
173173 } ) ;
174174 } ;
Original file line number Diff line number Diff line change @@ -151,20 +151,32 @@ export async function getClustersFromRequest(
151151 'production'
152152 ) ;
153153 if ( prodLicenseInfo . clusterAlerts . enabled ) {
154- cluster . alerts = {
155- list : await fetchStatus (
156- alertsClient ,
157- req . server . plugins . monitoring . info ,
158- undefined ,
159- cluster . cluster_uuid ,
160- start ,
161- end ,
162- [ ]
163- ) ,
164- alertsMeta : {
165- enabled : true ,
166- } ,
167- } ;
154+ try {
155+ cluster . alerts = {
156+ list : await fetchStatus (
157+ alertsClient ,
158+ req . server . plugins . monitoring . info ,
159+ undefined ,
160+ cluster . cluster_uuid ,
161+ start ,
162+ end ,
163+ [ ]
164+ ) ,
165+ alertsMeta : {
166+ enabled : true ,
167+ } ,
168+ } ;
169+ } catch ( err ) {
170+ req . logger . warn (
171+ `Unable to fetch alert status because '${ err . message } '. Alerts may not properly show up in the UI.`
172+ ) ;
173+ cluster . alerts = {
174+ list : { } ,
175+ alertsMeta : {
176+ enabled : true ,
177+ } ,
178+ } ;
179+ }
168180 continue ;
169181 }
170182
You can’t perform that action at this time.
0 commit comments