forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix kibana metricsets property paths (elastic#122034)
* fix kibana metricsets property paths * return inner kibana object * fix functional test * rename * adapt tests to datastream * rebuild archived data * extract buildKibanaInfo for reuse * add license * lint Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
81513dc
commit 9aaf9a5
Showing
12 changed files
with
80 additions
and
23,413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
x-pack/plugins/monitoring/server/lib/kibana/build_kibana_info.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { ElasticsearchResponseHit } from '../../../common/types/es'; | ||
|
||
export interface KibanaInfo { | ||
transport_address?: string; | ||
name?: string; | ||
index?: string; | ||
host?: string; | ||
uuid?: string; | ||
status?: string; | ||
snapshot?: boolean; | ||
version?: string; | ||
} | ||
|
||
export const buildKibanaInfo = (hit: ElasticsearchResponseHit): KibanaInfo => { | ||
const source = hit._source; | ||
if (source.kibana_stats) return source.kibana_stats.kibana as KibanaInfo; | ||
|
||
return { | ||
name: source.kibana?.stats?.name, | ||
host: source.kibana?.stats?.host?.name, | ||
status: source.kibana?.stats?.status, | ||
transport_address: source.kibana?.stats?.transport_address, | ||
uuid: source.service?.id, | ||
snapshot: source.kibana?.stats?.snapshot, | ||
index: source.kibana?.stats?.index, | ||
version: source.service?.version, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+2.79 KB
(110%)
x-pack/test/functional/es_archives/monitoring/singlecluster_yellow_platinum_mb/data.json.gz
Binary file not shown.
Oops, something went wrong.