-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Monitoring] Metricbeat migration flyout and instructions #35228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
chrisronline
merged 43 commits into
elastic:master
from
chrisronline:monitoring/mb_setup_step2
Jun 14, 2019
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
08a7de1
Initial attempt at a reactor of how this works
chrisronline 22fb160
Enter and exiting setup mode with migration buttons working
chrisronline 964d9da
Merge remote-tracking branch 'elastic/master' into monitoring/mb_setu…
chrisronline fc78ee8
Adding monitoring url step back in and some small cleanup
chrisronline 1a887ab
Elasticsearch steps
chrisronline 79d1845
Add missing file
chrisronline f7881f5
Better organization here
chrisronline 2c74202
Remove this debug logic
chrisronline caa889e
Clean up
chrisronline a9138f3
PR feedback
chrisronline b53a3af
Merge remote-tracking branch 'elastic/master' into monitoring/mb_setu…
chrisronline ca78377
Merge remote-tracking branch 'elastic/master' into monitoring/mb_setu…
chrisronline 07de62b
Add in monospacing
chrisronline bdab86c
Persist monitoring url in local storage
chrisronline cfedbae
Merge remote-tracking branch 'elastic/master' into monitoring/mb_setu…
chrisronline b65a578
Rework the steps
chrisronline a0cd832
Merge in master
chrisronline 10011ed
Change node to server, and add missing files
chrisronline 6ff890d
Fix linting issues
chrisronline 069863a
Fix api integration tests
chrisronline d297173
Merge remote-tracking branch 'elastic/master' into monitoring/mb_setu…
chrisronline 2cd7a0e
PR feedback
chrisronline 330d0af
Pass down if the product is the "primary" or not, then use that to sh…
chrisronline 1e1e6c3
Elasticsearch migration will work slightly differently in that all no…
chrisronline d900540
More PR feedback
chrisronline acc712c
PR feedback
chrisronline 3d30d20
Better links
chrisronline 8c92c97
Fix tests
chrisronline 08d421a
This should open in a new tab
chrisronline 7c8ffea
PR feedback
chrisronline 2aa97f9
Merge in master
chrisronline d130e24
Design and PR feedback
chrisronline 1998046
Merge remote-tracking branch 'elastic/master' into monitoring/mb_setu…
chrisronline af2c7b9
Fix these tests
chrisronline 7d476f7
Merge in master
chrisronline 1c77d96
PR feedback
chrisronline 4bfae10
Remove debug
chrisronline e2bf711
PR feedback
chrisronline 9118cd0
Merge in master
chrisronline 7d6cea1
Update the import path
chrisronline f45c64d
Update this import path too
chrisronline 3218a7c
PR feedback
chrisronline ee15ead
Fix i18n
chrisronline File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
7 changes: 7 additions & 0 deletions
7
x-pack/plugins/monitoring/public/components/kibana/instances/index.js
This file contains hidden or 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,7 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| export { KibanaInstances } from './instances'; |
171 changes: 171 additions & 0 deletions
171
x-pack/plugins/monitoring/public/components/kibana/instances/instances.js
This file contains hidden or 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,171 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| import React, { PureComponent } from 'react'; | ||
| import { EuiPage, EuiPageBody, EuiPageContent, EuiPanel, EuiSpacer, EuiLink } from '@elastic/eui'; | ||
| import { capitalize } from 'lodash'; | ||
| import { ClusterStatus } from '../cluster_status'; | ||
| import { EuiMonitoringTable } from '../../table'; | ||
| import { KibanaStatusIcon } from '../status_icon'; | ||
| import { formatMetric, formatNumber } from '../../../lib/format_number'; | ||
| import { i18n } from '@kbn/i18n'; | ||
| import { FormattedMessage } from '@kbn/i18n/react'; | ||
|
|
||
| const getColumns = (kbnUrl, scope) => { | ||
| const columns = [ | ||
| { | ||
| name: i18n.translate('xpack.monitoring.kibana.listing.nameColumnTitle', { | ||
| defaultMessage: 'Name' | ||
| }), | ||
| field: 'name', | ||
| render: (name, kibana) => ( | ||
| <EuiLink | ||
| onClick={() => { | ||
| scope.$evalAsync(() => { | ||
| kbnUrl.changePath(`/kibana/instances/${kibana.kibana.uuid}`); | ||
| }); | ||
| }} | ||
| data-test-subj={`kibanaLink-${name}`} | ||
| > | ||
| { name } | ||
| </EuiLink> | ||
| ) | ||
| }, | ||
| { | ||
| name: i18n.translate('xpack.monitoring.kibana.listing.statusColumnTitle', { | ||
| defaultMessage: 'Status' | ||
| }), | ||
| field: 'status', | ||
| render: (status, kibana) => ( | ||
| <div | ||
| title={`Instance status: ${status}`} | ||
| className="monTableCell__status" | ||
| > | ||
| <KibanaStatusIcon status={status} availability={kibana.availability} /> | ||
| { !kibana.availability ? ( | ||
| <FormattedMessage | ||
| id="xpack.monitoring.kibana.listing.instanceStatus.offlineLabel" | ||
| defaultMessage="Offline" | ||
| /> | ||
| ) : capitalize(status) } | ||
| </div> | ||
| ) | ||
| }, | ||
| { | ||
| name: i18n.translate('xpack.monitoring.kibana.listing.loadAverageColumnTitle', { | ||
| defaultMessage: 'Load Average' | ||
| }), | ||
| field: 'os.load.1m', | ||
| render: value => ( | ||
| <span> | ||
| {formatMetric(value, '0.00')} | ||
| </span> | ||
| ) | ||
| }, | ||
| { | ||
| name: i18n.translate('xpack.monitoring.kibana.listing.memorySizeColumnTitle', { | ||
| defaultMessage: 'Memory Size' | ||
| }), | ||
| field: 'process.memory.resident_set_size_in_bytes', | ||
| render: value => ( | ||
| <span> | ||
| {formatNumber(value, 'byte')} | ||
| </span> | ||
| ) | ||
| }, | ||
| { | ||
| name: i18n.translate('xpack.monitoring.kibana.listing.requestsColumnTitle', { | ||
| defaultMessage: 'Requests' | ||
| }), | ||
| field: 'requests.total', | ||
| render: value => ( | ||
| <span> | ||
| {formatNumber(value, 'int_commas')} | ||
| </span> | ||
| ) | ||
| }, | ||
| { | ||
| name: i18n.translate('xpack.monitoring.kibana.listing.responseTimeColumnTitle', { | ||
| defaultMessage: 'Response Times' | ||
| }), | ||
| // It is possible this does not exist through MB collection | ||
| field: 'response_times.average', | ||
| render: (value, kibana) => { | ||
| if (!value) { | ||
| return null; | ||
| } | ||
|
|
||
| return ( | ||
| <div> | ||
| <div className="monTableCell__splitNumber"> | ||
| { (formatNumber(value, 'int_commas') + ' ms avg') } | ||
| </div> | ||
| <div className="monTableCell__splitNumber"> | ||
| { formatNumber(kibana.response_times.max, 'int_commas') } ms max | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
| } | ||
| ]; | ||
|
|
||
| return columns; | ||
| }; | ||
|
|
||
| export class KibanaInstances extends PureComponent { | ||
| render() { | ||
| const { | ||
| instances, | ||
| clusterStatus, | ||
| angular, | ||
| setupMode, | ||
| sorting, | ||
| pagination, | ||
| onTableChange | ||
| } = this.props; | ||
|
|
||
| const dataFlattened = instances.map(item => ({ | ||
| ...item, | ||
| name: item.kibana.name, | ||
| status: item.kibana.status, | ||
| })); | ||
|
|
||
| return ( | ||
| <EuiPage> | ||
| <EuiPageBody> | ||
| <EuiPanel> | ||
| <ClusterStatus stats={clusterStatus} /> | ||
| </EuiPanel> | ||
| <EuiSpacer size="m" /> | ||
| <EuiPageContent> | ||
| <EuiMonitoringTable | ||
| className="kibanaInstancesTable" | ||
| rows={dataFlattened} | ||
| columns={getColumns(angular.kbnUrl, angular.$scope)} | ||
| sorting={sorting} | ||
| pagination={pagination} | ||
| setupMode={setupMode} | ||
| uuidField="kibana.uuid" | ||
| nameField="name" | ||
| search={{ | ||
| box: { | ||
| incremental: true, | ||
| placeholder: i18n.translate('xpack.monitoring.kibana.listing.filterInstancesPlaceholder', { | ||
| defaultMessage: 'Filter Instances…' | ||
| }) | ||
| }, | ||
| }} | ||
| onTableChange={onTableChange} | ||
| executeQueryOptions={{ | ||
| defaultFields: ['name'] | ||
| }} | ||
| /> | ||
| </EuiPageContent> | ||
| </EuiPageBody> | ||
| </EuiPage> | ||
| ); | ||
| } | ||
| } | ||
9 changes: 9 additions & 0 deletions
9
x-pack/plugins/monitoring/public/components/metricbeat_migration/constants.js
This file contains hidden or 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,9 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| export const INSTRUCTION_STEP_SET_MONITORING_URL = 'setMonitoringUrl'; | ||
| export const INSTRUCTION_STEP_ENABLE_METRICBEAT = 'enableMetricbeat'; | ||
| export const INSTRUCTION_STEP_DISABLE_INTERNAL = 'disableInternal'; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed none of these columns have
sortablewhich will be set totrueautomagically byEuiMonitoringTable, but in some cases it might require a handler:sortable: (row) => row.sortOnThisPropInsteadto sort on a different property.This is just something to account for, but might not require any changes here