[APM] Fix agent status check (#28254)

This commit is contained in:
Søren Louv-Jansen 2019-01-10 16:56:54 +01:00 committed by GitHub
parent 2b593f1217
commit cbe3a45083
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 10 deletions

View file

@ -158,11 +158,12 @@ export function onPremInstructions(apmIndexPattern) {
index: apmIndexPattern,
query: {
bool: {
filter: {
exists: {
field: 'processor.name',
},
},
should: [
{ term: { 'processor.name': 'error' } },
{ term: { 'processor.name': 'transaction' } },
{ term: { 'processor.name': 'metric' } },
{ term: { 'processor.name': 'sourcemap' } },
],
},
},
},

View file

@ -6,6 +6,7 @@
import { PROCESSOR_NAME } from '../../../common/constants';
// Note: this logic is duplicated in tutorials/apm/envs/on_prem
export async function getAgentStatus({ setup }) {
const { client, config } = setup;
@ -18,11 +19,12 @@ export async function getAgentStatus({ setup }) {
size: 0,
query: {
bool: {
filter: {
exists: {
field: PROCESSOR_NAME
}
}
should: [
{ term: { [PROCESSOR_NAME]: 'error' } },
{ term: { [PROCESSOR_NAME]: 'transaction' } },
{ term: { [PROCESSOR_NAME]: 'metric' } },
{ term: { [PROCESSOR_NAME]: 'sourcemap' } }
]
}
}
}

View file

@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
// Note: this logic is duplicated in tutorials/apm/envs/on_prem
export async function getServerStatus({ setup }) {
const { client, config } = setup;