-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 165812-infra-ui-rename-disk-usage-charts
- Loading branch information
Showing
40 changed files
with
1,129 additions
and
220 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
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
21 changes: 21 additions & 0 deletions
21
...ins/infra/public/common/visualizations/lens/dashboards/asset_details/host/nginx_charts.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,21 @@ | ||
/* | ||
* 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 { | ||
nginxActiveConnections, | ||
nginxRequestRate, | ||
nginxRequestsPerConnection, | ||
nginxResponseStatusCodes, | ||
} from '../metric_charts/nginx'; | ||
import type { XYConfig } from '../metric_charts/types'; | ||
|
||
export const nginxStubstatusCharts: XYConfig[] = [ | ||
nginxActiveConnections, | ||
nginxRequestRate, | ||
nginxRequestsPerConnection, | ||
]; | ||
|
||
export const nginxAccessCharts: XYConfig[] = [nginxResponseStatusCodes]; |
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
82 changes: 82 additions & 0 deletions
82
...s/infra/public/common/visualizations/lens/dashboards/asset_details/metric_charts/nginx.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,82 @@ | ||
/* | ||
* 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 { i18n } from '@kbn/i18n'; | ||
import { hostLensFormulas } from '../../../../constants'; | ||
import { XY_OVERRIDES } from '../../constants'; | ||
import type { XYConfig } from './types'; | ||
|
||
export const nginxRequestRate: XYConfig = { | ||
id: 'RequestRate', | ||
title: i18n.translate('xpack.infra.assetDetails.metricsCharts.nginx.requestRate', { | ||
defaultMessage: 'Request Rate', | ||
}), | ||
|
||
layers: [ | ||
{ | ||
data: [hostLensFormulas.nginxRequestRate], | ||
type: 'visualization', | ||
}, | ||
], | ||
dataViewOrigin: 'metrics', | ||
}; | ||
|
||
export const nginxActiveConnections: XYConfig = { | ||
id: 'ActiveConnections', | ||
title: i18n.translate('xpack.infra.assetDetails.metricsCharts.nginx.activeConnections', { | ||
defaultMessage: 'Active Connections', | ||
}), | ||
|
||
layers: [ | ||
{ | ||
data: [hostLensFormulas.nginxActiveConnections], | ||
type: 'visualization', | ||
}, | ||
], | ||
dataViewOrigin: 'metrics', | ||
}; | ||
|
||
export const nginxRequestsPerConnection: XYConfig = { | ||
id: 'RequestsPerConnection', | ||
title: i18n.translate('xpack.infra.assetDetails.metricsCharts.nginx.requestsPerConnection', { | ||
defaultMessage: 'Requests Per Connection', | ||
}), | ||
|
||
layers: [ | ||
{ | ||
data: [hostLensFormulas.nginxRequestsPerConnection], | ||
type: 'visualization', | ||
}, | ||
], | ||
dataViewOrigin: 'metrics', | ||
}; | ||
|
||
export const nginxResponseStatusCodes: XYConfig = { | ||
id: 'ResponseStatusCodes', | ||
title: i18n.translate('xpack.infra.assetDetails.metricsCharts.nginx.responseStatusCodes', { | ||
defaultMessage: 'Response Status Codes', | ||
}), | ||
|
||
layers: [ | ||
{ | ||
data: [ | ||
hostLensFormulas.nginxSuccessStatusCodes, | ||
hostLensFormulas.nginxRedirectStatusCodes, | ||
hostLensFormulas.nginxClientErrorStatusCodes, | ||
hostLensFormulas.nginxServerErrorStatusCodes, | ||
], | ||
options: { | ||
seriesType: 'area', | ||
}, | ||
type: 'visualization', | ||
}, | ||
], | ||
overrides: { | ||
settings: XY_OVERRIDES.settings, | ||
}, | ||
dataViewOrigin: 'metrics', | ||
}; |
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
19 changes: 19 additions & 0 deletions
19
...plugins/infra/public/common/visualizations/lens/formulas/host/nginx_active_connections.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,19 @@ | ||
/* | ||
* 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 type { FormulaValueConfig } from '@kbn/lens-embeddable-utils'; | ||
|
||
export const nginxActiveConnections: FormulaValueConfig = { | ||
label: 'Active Connections', | ||
value: 'average(nginx.stubstatus.active)', | ||
format: { | ||
id: 'number', | ||
params: { | ||
decimals: 0, | ||
}, | ||
}, | ||
}; |
21 changes: 21 additions & 0 deletions
21
.../infra/public/common/visualizations/lens/formulas/host/nginx_client_error_status_codes.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,21 @@ | ||
/* | ||
* 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 type { FormulaValueConfig } from '@kbn/lens-embeddable-utils'; | ||
import { defaultPalette, Color } from '../../../../../../common/color_palette'; | ||
|
||
export const nginxClientErrorStatusCodes: FormulaValueConfig = { | ||
label: '400-499', | ||
value: `count(kql='http.response.status_code >= 400 and http.response.status_code <= 499')`, | ||
format: { | ||
id: 'number', | ||
params: { | ||
decimals: 0, | ||
}, | ||
}, | ||
color: defaultPalette[Color.color5], | ||
}; |
21 changes: 21 additions & 0 deletions
21
...gins/infra/public/common/visualizations/lens/formulas/host/nginx_redirect_status_codes.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,21 @@ | ||
/* | ||
* 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 type { FormulaValueConfig } from '@kbn/lens-embeddable-utils'; | ||
import { defaultPalette, Color } from '../../../../../../common/color_palette'; | ||
|
||
export const nginxRedirectStatusCodes: FormulaValueConfig = { | ||
label: '300-399', | ||
value: `count(kql='http.response.status_code >= 300 and http.response.status_code <= 399')`, | ||
format: { | ||
id: 'number', | ||
params: { | ||
decimals: 0, | ||
}, | ||
}, | ||
color: defaultPalette[Color.color0], | ||
}; |
20 changes: 20 additions & 0 deletions
20
x-pack/plugins/infra/public/common/visualizations/lens/formulas/host/nginx_request_rate.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,20 @@ | ||
/* | ||
* 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 type { FormulaValueConfig } from '@kbn/lens-embeddable-utils'; | ||
|
||
export const nginxRequestRate: FormulaValueConfig = { | ||
label: 'Request Rate', | ||
value: 'differences(max(nginx.stubstatus.requests))', | ||
format: { | ||
id: 'number', | ||
params: { | ||
decimals: 0, | ||
}, | ||
}, | ||
timeScale: 's', | ||
}; |
19 changes: 19 additions & 0 deletions
19
...ns/infra/public/common/visualizations/lens/formulas/host/nginx_requests_per_connection.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,19 @@ | ||
/* | ||
* 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 type { FormulaValueConfig } from '@kbn/lens-embeddable-utils'; | ||
|
||
export const nginxRequestsPerConnection: FormulaValueConfig = { | ||
label: 'Requests Per Connection', | ||
value: 'max(nginx.stubstatus.requests) / max(nginx.stubstatus.handled)', | ||
format: { | ||
id: 'number', | ||
params: { | ||
decimals: 0, | ||
}, | ||
}, | ||
}; |
21 changes: 21 additions & 0 deletions
21
.../infra/public/common/visualizations/lens/formulas/host/nginx_server_error_status_codes.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,21 @@ | ||
/* | ||
* 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 type { FormulaValueConfig } from '@kbn/lens-embeddable-utils'; | ||
import { defaultPalette, Color } from '../../../../../../common/color_palette'; | ||
|
||
export const nginxServerErrorStatusCodes: FormulaValueConfig = { | ||
label: '500-599', | ||
value: `count(kql='http.response.status_code >= 500 and http.response.status_code <= 599')`, | ||
format: { | ||
id: 'number', | ||
params: { | ||
decimals: 0, | ||
}, | ||
}, | ||
color: defaultPalette[Color.color1], | ||
}; |
21 changes: 21 additions & 0 deletions
21
...ugins/infra/public/common/visualizations/lens/formulas/host/nginx_success_status_codes.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,21 @@ | ||
/* | ||
* 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 type { FormulaValueConfig } from '@kbn/lens-embeddable-utils'; | ||
import { defaultPalette, Color } from '../../../../../../common/color_palette'; | ||
|
||
export const nginxSuccessStatusCodes: FormulaValueConfig = { | ||
label: '200-299', | ||
value: `count(kql='http.response.status_code >= 200 and http.response.status_code <= 299')`, | ||
format: { | ||
id: 'number', | ||
params: { | ||
decimals: 0, | ||
}, | ||
}, | ||
color: defaultPalette[Color.color2], | ||
}; |
Oops, something went wrong.