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.
- Loading branch information
1 parent
030fa9e
commit a319b1d
Showing
8 changed files
with
173 additions
and
2 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
12 changes: 12 additions & 0 deletions
12
...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,12 @@ | ||
/* | ||
* 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 } from '../metric_charts/nginx'; | ||
import type { XYConfig } from '../metric_charts/types'; | ||
|
||
export const nginxStubstatusMetrics: XYConfig[] = [nginxActiveConnections, nginxRequestRate]; | ||
|
||
export const nginxAccessMetrics: XYConfig[] = []; // TODO |
47 changes: 47 additions & 0 deletions
47
...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,47 @@ | ||
/* | ||
* 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', | ||
overrides: { | ||
axisLeft: XY_OVERRIDES.axisLeft, | ||
}, | ||
}; | ||
|
||
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', | ||
overrides: { | ||
axisLeft: XY_OVERRIDES.axisLeft, | ||
}, | ||
}; |
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, | ||
}, | ||
}, | ||
}; |
19 changes: 19 additions & 0 deletions
19
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,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 nginxRequestRate: FormulaValueConfig = { | ||
label: 'Request Rate', | ||
value: 'max(nginx.stubstatus.requests)', // TODO | ||
format: { | ||
id: 'number', | ||
params: { | ||
decimals: 0, | ||
}, | ||
}, | ||
}; |
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