mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
* Adding placeholder for functionbeat telemetry in test fixture * Adding placeholder for functionbeat telemetry expectation * Adding placeholder for aggregating functionbeat telemetry per cluster * Update test + fixture * Updating code
This commit is contained in:
parent
8dd1413715
commit
5d5e5b8575
3 changed files with 52 additions and 0 deletions
|
@ -2,6 +2,36 @@
|
||||||
{
|
{
|
||||||
"hits": {
|
"hits": {
|
||||||
"hits": [
|
"hits": [
|
||||||
|
{
|
||||||
|
"_source" : {
|
||||||
|
"cluster_uuid": "W7hppdX7R229Oy3KQbZrTw",
|
||||||
|
"type": "beats_state",
|
||||||
|
"beats_state" : {
|
||||||
|
"state" : {
|
||||||
|
"functionbeat" : {
|
||||||
|
"functions": {
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_source" : {
|
||||||
|
"cluster_uuid": "W7hppdX7R229Oy3KQbZrTw",
|
||||||
|
"type": "beats_state",
|
||||||
|
"beats_state" : {
|
||||||
|
"state" : {
|
||||||
|
"functionbeat" : {
|
||||||
|
"functions": {
|
||||||
|
"count": 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"_source" : {
|
"_source" : {
|
||||||
"cluster_uuid": "W7hppdX7R229Oy3KQbZrTw",
|
"cluster_uuid": "W7hppdX7R229Oy3KQbZrTw",
|
||||||
|
|
|
@ -168,6 +168,11 @@ describe('Get Beats Stats', () => {
|
||||||
},
|
},
|
||||||
monitors: 3,
|
monitors: 3,
|
||||||
},
|
},
|
||||||
|
functionbeat: {
|
||||||
|
functions: {
|
||||||
|
count: 4,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
FlV4ckTxQ0a78hmBkzzc9A: {
|
FlV4ckTxQ0a78hmBkzzc9A: {
|
||||||
count: 405,
|
count: 405,
|
||||||
|
|
|
@ -138,6 +138,23 @@ export function processResults(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const functionbeatState = get(hit, '_source.beats_state.state.functionbeat');
|
||||||
|
if (functionbeatState !== undefined) {
|
||||||
|
if (!clusters[clusterUuid].hasOwnProperty('functionbeat')) {
|
||||||
|
clusters[clusterUuid].functionbeat = {
|
||||||
|
functions: {
|
||||||
|
count: 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
clusters[clusterUuid].functionbeat.functions.count += get(
|
||||||
|
functionbeatState,
|
||||||
|
'functions.count',
|
||||||
|
0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const stateHost = get(hit, '_source.beats_state.state.host');
|
const stateHost = get(hit, '_source.beats_state.state.host');
|
||||||
if (stateHost !== undefined) {
|
if (stateHost !== undefined) {
|
||||||
const hostMap = clusterArchitectureMaps[clusterUuid];
|
const hostMap = clusterArchitectureMaps[clusterUuid];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue