mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
parent
8acada3ad1
commit
6c50113be0
2 changed files with 5 additions and 2 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
import { APICaller, CoreSetup, Logger } from 'kibana/server';
|
||||
import { Observable } from 'rxjs';
|
||||
import { first } from 'rxjs/operators';
|
||||
import moment from 'moment';
|
||||
import {
|
||||
RunContext,
|
||||
|
@ -188,7 +189,7 @@ export function telemetryTaskRunner(
|
|||
|
||||
return {
|
||||
async run() {
|
||||
const kibanaIndex = (await config.toPromise()).kibana.index;
|
||||
const kibanaIndex = (await config.pipe(first()).toPromise()).kibana.index;
|
||||
|
||||
return Promise.all([
|
||||
getDailyEvents(kibanaIndex, callCluster),
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
import { Observable } from 'rxjs';
|
||||
import _, { countBy, groupBy, mapValues } from 'lodash';
|
||||
import { APICaller, CoreSetup } from 'kibana/server';
|
||||
import { first } from 'rxjs/operators';
|
||||
|
||||
import { getNextMidnight } from '../../get_next_midnight';
|
||||
import { TaskInstance } from '../../../../../task_manager/server';
|
||||
import { ESSearchHit } from '../../../../../apm/typings/elasticsearch';
|
||||
|
@ -82,7 +84,7 @@ export function visualizationsTaskRunner(
|
|||
let error;
|
||||
|
||||
try {
|
||||
const index = (await config.toPromise()).kibana.index;
|
||||
const index = (await config.pipe(first()).toPromise()).kibana.index;
|
||||
stats = await getStats(callCluster, index);
|
||||
} catch (err) {
|
||||
if (err.constructor === Error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue