mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* Revert "Revert "[Monitoring] Change all configs to `monitoring.*`" (#56214)"
This reverts commit bd08eb7efc
.
* Fix missing config changes
* More fixes
* Doc changes
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
103095a07f
commit
a519fa216f
59 changed files with 213 additions and 171 deletions
|
@ -14,7 +14,7 @@ built-in `elastic` user has this role.
|
|||
|
||||
You can adjust how monitoring data is
|
||||
collected from {kib} and displayed in {kib} by configuring settings in the
|
||||
`kibana.yml` file. There are also `xpack.monitoring.elasticsearch.*` settings,
|
||||
`kibana.yml` file. There are also `monitoring.ui.elasticsearch.*` settings,
|
||||
which support the same values as <<settings,{kib} configuration settings>>.
|
||||
|
||||
To control how data is collected from your {es} nodes, you configure
|
||||
|
@ -31,20 +31,20 @@ For more information, see
|
|||
[[monitoring-general-settings]]
|
||||
==== General monitoring settings
|
||||
|
||||
`xpack.monitoring.enabled`::
|
||||
`monitoring.enabled`::
|
||||
Set to `true` (default) to enable the {monitor-features} in {kib}. Unlike the
|
||||
`xpack.monitoring.ui.enabled` setting, when this setting is `false`, the
|
||||
`monitoring.ui.enabled` setting, when this setting is `false`, the
|
||||
monitoring back-end does not run and {kib} stats are not sent to the monitoring
|
||||
cluster.
|
||||
|
||||
`xpack.monitoring.elasticsearch.hosts`::
|
||||
`monitoring.ui.elasticsearch.hosts`::
|
||||
Specifies the location of the {es} cluster where your monitoring data is stored.
|
||||
By default, this is the same as `elasticsearch.hosts`. This setting enables
|
||||
you to use a single {kib} instance to search and visualize data in your
|
||||
production cluster as well as monitor data sent to a dedicated monitoring
|
||||
cluster.
|
||||
|
||||
`xpack.monitoring.elasticsearch.username`::
|
||||
`monitoring.ui.elasticsearch.username`::
|
||||
Specifies the username used by {kib} monitoring to establish a persistent connection
|
||||
in {kib} to the {es} monitoring cluster and to verify licensing status on the {es}
|
||||
monitoring cluster.
|
||||
|
@ -55,7 +55,7 @@ both the {es} monitoring cluster and the {es} production cluster.
|
|||
|
||||
If not set, {kib} uses the value of the `elasticsearch.username` setting.
|
||||
|
||||
`xpack.monitoring.elasticsearch.password`::
|
||||
`monitoring.ui.elasticsearch.password`::
|
||||
Specifies the password used by {kib} monitoring to establish a persistent connection
|
||||
in {kib} to the {es} monitoring cluster and to verify licensing status on the {es}
|
||||
monitoring cluster.
|
||||
|
@ -66,7 +66,7 @@ both the {es} monitoring cluster and the {es} production cluster.
|
|||
|
||||
If not set, {kib} uses the value of the `elasticsearch.password` setting.
|
||||
|
||||
`xpack.monitoring.elasticsearch.pingTimeout`::
|
||||
`monitoring.ui.elasticsearch.pingTimeout`::
|
||||
Specifies the time in milliseconds to wait for {es} to respond to internal
|
||||
health checks. By default, it matches the `elasticsearch.pingTimeout` setting,
|
||||
which has a default value of `30000`.
|
||||
|
@ -77,11 +77,11 @@ which has a default value of `30000`.
|
|||
|
||||
These settings control how data is collected from {kib}.
|
||||
|
||||
`xpack.monitoring.kibana.collection.enabled`::
|
||||
`monitoring.kibana.collection.enabled`::
|
||||
Set to `true` (default) to enable data collection from the {kib} NodeJS server
|
||||
for {kib} Dashboards to be featured in the Monitoring.
|
||||
|
||||
`xpack.monitoring.kibana.collection.interval`::
|
||||
`monitoring.kibana.collection.interval`::
|
||||
Specifies the number of milliseconds to wait in between data sampling on the
|
||||
{kib} NodeJS server for the metrics that are displayed in the {kib} dashboards.
|
||||
Defaults to `10000` (10 seconds).
|
||||
|
@ -96,24 +96,24 @@ However, the defaults work best in most circumstances. For more information
|
|||
about configuring {kib}, see
|
||||
{kibana-ref}/settings.html[Setting Kibana Server Properties].
|
||||
|
||||
`xpack.monitoring.elasticsearch.logFetchCount`::
|
||||
`monitoring.ui.elasticsearch.logFetchCount`::
|
||||
Specifies the number of log entries to display in the Monitoring UI. Defaults to
|
||||
`10`. The maximum value is `50`.
|
||||
|
||||
`xpack.monitoring.max_bucket_size`::
|
||||
`monitoring.ui.max_bucket_size`::
|
||||
Specifies the number of term buckets to return out of the overall terms list when
|
||||
performing terms aggregations to retrieve index and node metrics. For more
|
||||
information about the `size` parameter, see
|
||||
{ref}/search-aggregations-bucket-terms-aggregation.html#search-aggregations-bucket-terms-aggregation-size[Terms Aggregation].
|
||||
Defaults to `10000`.
|
||||
|
||||
`xpack.monitoring.min_interval_seconds`::
|
||||
`monitoring.ui.min_interval_seconds`::
|
||||
Specifies the minimum number of seconds that a time bucket in a chart can
|
||||
represent. Defaults to 10. If you modify the
|
||||
`xpack.monitoring.collection.interval` in `elasticsearch.yml`, use the same
|
||||
`monitoring.ui.collection.interval` in `elasticsearch.yml`, use the same
|
||||
value in this setting.
|
||||
|
||||
`xpack.monitoring.ui.enabled`::
|
||||
`monitoring.ui.enabled`::
|
||||
Set to `false` to hide the Monitoring UI in {kib}. The monitoring back-end
|
||||
continues to run as an agent for sending {kib} stats to the monitoring
|
||||
cluster. Defaults to `true`.
|
||||
|
@ -127,7 +127,7 @@ better decisions about your container performance, rather than guessing based on
|
|||
the overall machine performance. If you are not running your applications in a
|
||||
container, then Cgroup statistics are not useful.
|
||||
|
||||
`xpack.monitoring.ui.container.elasticsearch.enabled`::
|
||||
`monitoring.ui.container.elasticsearch.enabled`::
|
||||
|
||||
For {es} clusters that are running in containers, this setting changes the
|
||||
*Node Listing* to display the CPU utilization based on the reported Cgroup
|
||||
|
@ -135,7 +135,7 @@ statistics. It also adds the calculated Cgroup CPU utilization to the
|
|||
*Node Overview* page instead of the overall operating system's CPU
|
||||
utilization. Defaults to `false`.
|
||||
|
||||
`xpack.monitoring.ui.container.logstash.enabled`::
|
||||
`monitoring.ui.container.logstash.enabled`::
|
||||
|
||||
For {ls} nodes that are running in containers, this setting
|
||||
changes the {ls} *Node Listing* to display the CPU utilization
|
||||
|
|
|
@ -119,6 +119,56 @@ export const coreDeprecationProvider: ConfigDeprecationProvider = ({
|
|||
renameFromRoot('xpack.telemetry.config', 'telemetry.config'),
|
||||
renameFromRoot('xpack.telemetry.banner', 'telemetry.banner'),
|
||||
renameFromRoot('xpack.telemetry.url', 'telemetry.url'),
|
||||
// Monitoring renames
|
||||
// TODO: Remove these from here once the monitoring plugin is migrated to NP
|
||||
renameFromRoot('xpack.monitoring.enabled', 'monitoring.enabled'),
|
||||
renameFromRoot('xpack.monitoring.ui.enabled', 'monitoring.ui.enabled'),
|
||||
renameFromRoot(
|
||||
'xpack.monitoring.kibana.collection.enabled',
|
||||
'monitoring.kibana.collection.enabled'
|
||||
),
|
||||
renameFromRoot('xpack.monitoring.max_bucket_size', 'monitoring.ui.max_bucket_size'),
|
||||
renameFromRoot('xpack.monitoring.min_interval_seconds', 'monitoring.ui.min_interval_seconds'),
|
||||
renameFromRoot(
|
||||
'xpack.monitoring.show_license_expiration',
|
||||
'monitoring.ui.show_license_expiration'
|
||||
),
|
||||
renameFromRoot(
|
||||
'xpack.monitoring.ui.container.elasticsearch.enabled',
|
||||
'monitoring.ui.container.elasticsearch.enabled'
|
||||
),
|
||||
renameFromRoot(
|
||||
'xpack.monitoring.ui.container.logstash.enabled',
|
||||
'monitoring.ui.container.logstash.enabled'
|
||||
),
|
||||
renameFromRoot(
|
||||
'xpack.monitoring.tests.cloud_detector.enabled',
|
||||
'monitoring.tests.cloud_detector.enabled'
|
||||
),
|
||||
renameFromRoot(
|
||||
'xpack.monitoring.kibana.collection.interval',
|
||||
'monitoring.kibana.collection.interval'
|
||||
),
|
||||
renameFromRoot('xpack.monitoring.elasticsearch.hosts', 'monitoring.ui.elasticsearch.hosts'),
|
||||
renameFromRoot('xpack.monitoring.elasticsearch.username', 'monitoring.ui.elasticsearch.username'),
|
||||
renameFromRoot('xpack.monitoring.elasticsearch.password', 'monitoring.ui.elasticsearch.password'),
|
||||
renameFromRoot(
|
||||
'xpack.monitoring.xpack_api_polling_frequency_millis',
|
||||
'monitoring.xpack_api_polling_frequency_millis'
|
||||
),
|
||||
renameFromRoot(
|
||||
'xpack.monitoring.cluster_alerts.email_notifications.enabled',
|
||||
'monitoring.cluster_alerts.email_notifications.enabled'
|
||||
),
|
||||
renameFromRoot(
|
||||
'xpack.monitoring.cluster_alerts.email_notifications.email_address',
|
||||
'monitoring.cluster_alerts.email_notifications.email_address'
|
||||
),
|
||||
renameFromRoot('xpack.monitoring.ccs.enabled', 'monitoring.ui.ccs.enabled'),
|
||||
renameFromRoot(
|
||||
'xpack.monitoring.elasticsearch.logFetchCount',
|
||||
'monitoring.ui.elasticsearch.logFetchCount'
|
||||
),
|
||||
configPathDeprecation,
|
||||
dataPathDeprecation,
|
||||
rewriteBasePathDeprecation,
|
||||
|
|
|
@ -15,12 +15,12 @@ export const config = Joi => {
|
|||
const DEFAULT_REQUEST_HEADERS = ['authorization'];
|
||||
|
||||
return Joi.object({
|
||||
ccs: Joi.object({
|
||||
enabled: Joi.boolean().default(true),
|
||||
}).default(),
|
||||
enabled: Joi.boolean().default(true),
|
||||
ui: Joi.object({
|
||||
enabled: Joi.boolean().default(true),
|
||||
ccs: Joi.object({
|
||||
enabled: Joi.boolean().default(true),
|
||||
}).default(),
|
||||
container: Joi.object({
|
||||
elasticsearch: Joi.object({
|
||||
enabled: Joi.boolean().default(false),
|
||||
|
@ -29,6 +29,51 @@ export const config = Joi => {
|
|||
enabled: Joi.boolean().default(false),
|
||||
}).default(),
|
||||
}).default(),
|
||||
max_bucket_size: Joi.number().default(10000),
|
||||
min_interval_seconds: Joi.number().default(10),
|
||||
show_license_expiration: Joi.boolean().default(true),
|
||||
elasticsearch: Joi.object({
|
||||
customHeaders: Joi.object().default({}),
|
||||
logQueries: Joi.boolean().default(false),
|
||||
requestHeadersWhitelist: Joi.array()
|
||||
.items()
|
||||
.single()
|
||||
.default(DEFAULT_REQUEST_HEADERS),
|
||||
sniffOnStart: Joi.boolean().default(false),
|
||||
sniffInterval: Joi.number()
|
||||
.allow(false)
|
||||
.default(false),
|
||||
sniffOnConnectionFault: Joi.boolean().default(false),
|
||||
hosts: Joi.array()
|
||||
.items(Joi.string().uri({ scheme: ['http', 'https'] }))
|
||||
.single(), // if empty, use Kibana's connection config
|
||||
username: Joi.string(),
|
||||
password: Joi.string(),
|
||||
requestTimeout: Joi.number().default(30000),
|
||||
pingTimeout: Joi.number().default(30000),
|
||||
ssl: Joi.object({
|
||||
verificationMode: Joi.string()
|
||||
.valid('none', 'certificate', 'full')
|
||||
.default('full'),
|
||||
certificateAuthorities: Joi.array()
|
||||
.single()
|
||||
.items(Joi.string()),
|
||||
certificate: Joi.string(),
|
||||
key: Joi.string(),
|
||||
keyPassphrase: Joi.string(),
|
||||
keystore: Joi.object({
|
||||
path: Joi.string(),
|
||||
password: Joi.string(),
|
||||
}).default(),
|
||||
truststore: Joi.object({
|
||||
path: Joi.string(),
|
||||
password: Joi.string(),
|
||||
}).default(),
|
||||
alwaysPresentCertificate: Joi.boolean().default(false),
|
||||
}).default(),
|
||||
apiVersion: Joi.string().default('master'),
|
||||
logFetchCount: Joi.number().default(10),
|
||||
}).default(),
|
||||
}).default(),
|
||||
kibana: Joi.object({
|
||||
collection: Joi.object({
|
||||
|
@ -46,56 +91,11 @@ export const config = Joi => {
|
|||
xpack_api_polling_frequency_millis: Joi.number().default(
|
||||
XPACK_INFO_API_DEFAULT_POLL_FREQUENCY_IN_MILLIS
|
||||
),
|
||||
max_bucket_size: Joi.number().default(10000),
|
||||
min_interval_seconds: Joi.number().default(10),
|
||||
show_license_expiration: Joi.boolean().default(true),
|
||||
agent: Joi.object({
|
||||
interval: Joi.string()
|
||||
.regex(/[\d\.]+[yMwdhms]/)
|
||||
.default('10s'),
|
||||
}).default(),
|
||||
elasticsearch: Joi.object({
|
||||
customHeaders: Joi.object().default({}),
|
||||
logQueries: Joi.boolean().default(false),
|
||||
requestHeadersWhitelist: Joi.array()
|
||||
.items()
|
||||
.single()
|
||||
.default(DEFAULT_REQUEST_HEADERS),
|
||||
sniffOnStart: Joi.boolean().default(false),
|
||||
sniffInterval: Joi.number()
|
||||
.allow(false)
|
||||
.default(false),
|
||||
sniffOnConnectionFault: Joi.boolean().default(false),
|
||||
hosts: Joi.array()
|
||||
.items(Joi.string().uri({ scheme: ['http', 'https'] }))
|
||||
.single(), // if empty, use Kibana's connection config
|
||||
username: Joi.string(),
|
||||
password: Joi.string(),
|
||||
requestTimeout: Joi.number().default(30000),
|
||||
pingTimeout: Joi.number().default(30000),
|
||||
ssl: Joi.object({
|
||||
verificationMode: Joi.string()
|
||||
.valid('none', 'certificate', 'full')
|
||||
.default('full'),
|
||||
certificateAuthorities: Joi.array()
|
||||
.single()
|
||||
.items(Joi.string()),
|
||||
certificate: Joi.string(),
|
||||
key: Joi.string(),
|
||||
keyPassphrase: Joi.string(),
|
||||
keystore: Joi.object({
|
||||
path: Joi.string(),
|
||||
password: Joi.string(),
|
||||
}).default(),
|
||||
truststore: Joi.object({
|
||||
path: Joi.string(),
|
||||
password: Joi.string(),
|
||||
}).default(),
|
||||
alwaysPresentCertificate: Joi.boolean().default(false),
|
||||
}).default(),
|
||||
apiVersion: Joi.string().default('master'),
|
||||
logFetchCount: Joi.number().default(10),
|
||||
}).default(),
|
||||
tests: Joi.object({
|
||||
cloud_detector: Joi.object({
|
||||
enabled: Joi.boolean().default(true),
|
||||
|
|
|
@ -28,7 +28,7 @@ export const deprecations = () => {
|
|||
}
|
||||
},
|
||||
(settings, log) => {
|
||||
const fromPath = 'xpack.monitoring.elasticsearch';
|
||||
const fromPath = 'monitoring.elasticsearch';
|
||||
const es = get(settings, 'elasticsearch');
|
||||
if (es) {
|
||||
if (es.username === 'elastic') {
|
||||
|
@ -39,7 +39,7 @@ export const deprecations = () => {
|
|||
}
|
||||
},
|
||||
(settings, log) => {
|
||||
const fromPath = 'xpack.monitoring.elasticsearch.ssl';
|
||||
const fromPath = 'monitoring.elasticsearch.ssl';
|
||||
const ssl = get(settings, 'elasticsearch.ssl');
|
||||
if (ssl) {
|
||||
if (ssl.key !== undefined && ssl.certificate === undefined) {
|
||||
|
|
|
@ -20,32 +20,32 @@ export const monitoring = kibana =>
|
|||
new kibana.Plugin({
|
||||
require: ['kibana', 'elasticsearch', 'xpack_main'],
|
||||
id: 'monitoring',
|
||||
configPrefix: 'xpack.monitoring',
|
||||
configPrefix: 'monitoring',
|
||||
publicDir: resolve(__dirname, 'public'),
|
||||
init(server) {
|
||||
const configs = [
|
||||
'xpack.monitoring.ui.enabled',
|
||||
'xpack.monitoring.kibana.collection.enabled',
|
||||
'xpack.monitoring.max_bucket_size',
|
||||
'xpack.monitoring.min_interval_seconds',
|
||||
'monitoring.ui.enabled',
|
||||
'monitoring.kibana.collection.enabled',
|
||||
'monitoring.ui.max_bucket_size',
|
||||
'monitoring.ui.min_interval_seconds',
|
||||
'kibana.index',
|
||||
'pkg.version',
|
||||
'xpack.monitoring.show_license_expiration',
|
||||
'xpack.monitoring.ui.container.elasticsearch.enabled',
|
||||
'xpack.monitoring.ui.container.logstash.enabled',
|
||||
'xpack.monitoring.tests.cloud_detector.enabled',
|
||||
'xpack.monitoring.kibana.collection.interval',
|
||||
'xpack.monitoring.elasticsearch.hosts',
|
||||
'xpack.monitoring.elasticsearch',
|
||||
'xpack.monitoring.xpack_api_polling_frequency_millis',
|
||||
'monitoring.ui.show_license_expiration',
|
||||
'monitoring.ui.container.elasticsearch.enabled',
|
||||
'monitoring.ui.container.logstash.enabled',
|
||||
'monitoring.tests.cloud_detector.enabled',
|
||||
'monitoring.kibana.collection.interval',
|
||||
'monitoring.ui.elasticsearch.hosts',
|
||||
'monitoring.ui.elasticsearch',
|
||||
'monitoring.xpack_api_polling_frequency_millis',
|
||||
'server.uuid',
|
||||
'server.name',
|
||||
'server.host',
|
||||
'server.port',
|
||||
'xpack.monitoring.cluster_alerts.email_notifications.enabled',
|
||||
'xpack.monitoring.cluster_alerts.email_notifications.email_address',
|
||||
'xpack.monitoring.ccs.enabled',
|
||||
'xpack.monitoring.elasticsearch.logFetchCount',
|
||||
'monitoring.cluster_alerts.email_notifications.enabled',
|
||||
'monitoring.cluster_alerts.email_notifications.email_address',
|
||||
'monitoring.ui.ccs.enabled',
|
||||
'monitoring.ui.elasticsearch.logFetchCount',
|
||||
];
|
||||
|
||||
const serverConfig = server.config();
|
||||
|
|
|
@ -1174,7 +1174,7 @@ exports[`Flyout kibana part two should show instructions to disable internal col
|
|||
isCopyable={true}
|
||||
language="bash"
|
||||
>
|
||||
xpack.monitoring.kibana.collection.enabled: false
|
||||
monitoring.kibana.collection.enabled: false
|
||||
</EuiCodeBlock>
|
||||
<EuiSpacer
|
||||
size="s"
|
||||
|
@ -1187,7 +1187,7 @@ exports[`Flyout kibana part two should show instructions to disable internal col
|
|||
values={
|
||||
Object {
|
||||
"config": <Monospace>
|
||||
xpack.monitoring.enabled
|
||||
monitoring.enabled
|
||||
</Monospace>,
|
||||
"defaultValue": <Monospace>
|
||||
true
|
||||
|
@ -2091,7 +2091,7 @@ exports[`Flyout should show a restart warning for restarting the primary Kibana
|
|||
isCopyable={true}
|
||||
language="bash"
|
||||
>
|
||||
xpack.monitoring.kibana.collection.enabled: false
|
||||
monitoring.kibana.collection.enabled: false
|
||||
</EuiCodeBlock>
|
||||
<EuiSpacer
|
||||
size="s"
|
||||
|
@ -2104,7 +2104,7 @@ exports[`Flyout should show a restart warning for restarting the primary Kibana
|
|||
values={
|
||||
Object {
|
||||
"config": <Monospace>
|
||||
xpack.monitoring.enabled
|
||||
monitoring.enabled
|
||||
</Monospace>,
|
||||
"defaultValue": <Monospace>
|
||||
true
|
||||
|
|
|
@ -61,7 +61,7 @@ export function getKibanaInstructionsForDisablingInternalCollection(product, met
|
|||
</EuiText>
|
||||
<EuiSpacer size="s" />
|
||||
<EuiCodeBlock isCopyable language="bash">
|
||||
xpack.monitoring.kibana.collection.enabled: false
|
||||
monitoring.kibana.collection.enabled: false
|
||||
</EuiCodeBlock>
|
||||
<EuiSpacer size="s" />
|
||||
<EuiText>
|
||||
|
@ -70,7 +70,7 @@ export function getKibanaInstructionsForDisablingInternalCollection(product, met
|
|||
id="xpack.monitoring.metricbeatMigration.kibanaInstructions.disableInternalCollection.note"
|
||||
defaultMessage="For {config}, leave the default value of ({defaultValue})."
|
||||
values={{
|
||||
config: <Monospace>xpack.monitoring.enabled</Monospace>,
|
||||
config: <Monospace>monitoring.enabled</Monospace>,
|
||||
defaultValue: <Monospace>true</Monospace>,
|
||||
}}
|
||||
/>
|
||||
|
|
|
@ -157,7 +157,7 @@ export function alertsClusterSearch(req, alertsIndex, cluster, checkLicense, opt
|
|||
|
||||
if (prodLicenseInfo.clusterAlerts.enabled) {
|
||||
const config = req.server.config();
|
||||
const size = options.size || config.get('xpack.monitoring.max_bucket_size');
|
||||
const size = options.size || config.get('monitoring.ui.max_bucket_size');
|
||||
|
||||
const params = {
|
||||
index: alertsIndex,
|
||||
|
|
|
@ -19,7 +19,7 @@ export function verifyMonitoringLicense(server) {
|
|||
const config = server.config();
|
||||
|
||||
// if cluster alerts are enabled, then ensure that we can use it according to the license
|
||||
if (config.get('xpack.monitoring.cluster_alerts.enabled')) {
|
||||
if (config.get('monitoring.cluster_alerts.enabled')) {
|
||||
const xpackInfo = get(server.plugins.monitoring, 'info');
|
||||
if (xpackInfo) {
|
||||
const monitoringCluster = xpackInfo.feature('monitoring').getLicenseCheckResults();
|
||||
|
|
|
@ -11,8 +11,8 @@ import { exposeClient, hasMonitoringCluster } from '../instantiate_client';
|
|||
|
||||
function getMockServerFromConnectionUrl(monitoringClusterUrl) {
|
||||
const server = {
|
||||
xpack: {
|
||||
monitoring: {
|
||||
monitoring: {
|
||||
ui: {
|
||||
elasticsearch: {
|
||||
hosts: monitoringClusterUrl ? [monitoringClusterUrl] : [],
|
||||
username: 'monitoring-user-internal-test',
|
||||
|
@ -27,7 +27,7 @@ function getMockServerFromConnectionUrl(monitoringClusterUrl) {
|
|||
};
|
||||
|
||||
return {
|
||||
elasticsearchConfig: server.xpack.monitoring.elasticsearch,
|
||||
elasticsearchConfig: server.monitoring.ui.elasticsearch,
|
||||
elasticsearchPlugin: {
|
||||
getCluster: sinon
|
||||
.stub()
|
||||
|
|
|
@ -168,14 +168,14 @@ describe('throws when config is invalid', () => {
|
|||
it('throws if key and keystore.path are both specified', () => {
|
||||
const value = { ssl: { key: 'foo', keystore: { path: 'bar' } } };
|
||||
expect(() => parse(value)).toThrowErrorMatchingInlineSnapshot(
|
||||
`"[config validation of [xpack.monitoring.elasticsearch].ssl]: cannot use [key] when [keystore.path] is specified"`
|
||||
`"[config validation of [monitoring.ui.elasticsearch].ssl]: cannot use [key] when [keystore.path] is specified"`
|
||||
);
|
||||
});
|
||||
|
||||
it('throws if certificate and keystore.path are both specified', () => {
|
||||
const value = { ssl: { certificate: 'foo', keystore: { path: 'bar' } } };
|
||||
expect(() => parse(value)).toThrowErrorMatchingInlineSnapshot(
|
||||
`"[config validation of [xpack.monitoring.elasticsearch].ssl]: cannot use [certificate] when [keystore.path] is specified"`
|
||||
`"[config validation of [monitoring.ui.elasticsearch].ssl]: cannot use [certificate] when [keystore.path] is specified"`
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
import { readFileSync } from 'fs';
|
||||
import { readPkcs12Truststore, readPkcs12Keystore } from '../../../../../../src/core/utils';
|
||||
|
||||
const KEY = 'xpack.monitoring.elasticsearch';
|
||||
const KEY = 'monitoring.ui.elasticsearch';
|
||||
|
||||
/*
|
||||
* Parse a config object's Elasticsearch configuration, reading any
|
||||
|
|
|
@ -15,7 +15,7 @@ export const initMonitoringXpackInfo = async ({ config, xpackMainPlugin, expose,
|
|||
const xpackInfo = hasMonitoringCluster(config)
|
||||
? xpackMainPlugin.createXPackInfo({
|
||||
clusterSource: 'monitoring',
|
||||
pollFrequencyInMillis: config.get('xpack.monitoring.xpack_api_polling_frequency_millis'),
|
||||
pollFrequencyInMillis: config.get('monitoring.xpack_api_polling_frequency_millis'),
|
||||
})
|
||||
: xpackMainPlugin.info;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ const LOGGING_TAGS = [LOGGING_TAG, KIBANA_MONITORING_LOGGING_TAG];
|
|||
* NOTE: internal collection will be removed in 7.0
|
||||
*
|
||||
* Depends on
|
||||
* - 'xpack.monitoring.kibana.collection.enabled' config
|
||||
* - 'monitoring.kibana.collection.enabled' config
|
||||
* - monitoring enabled in ES (checked against xpack_main.info license info change)
|
||||
* The dependencies are handled upstream
|
||||
* - Ops Events - essentially Kibana's /api/status
|
||||
|
|
|
@ -21,14 +21,10 @@ describe('getSettingsCollector / getDefaultAdminEmail', () => {
|
|||
}) {
|
||||
const config = { get: sinon.stub() };
|
||||
|
||||
config.get
|
||||
.withArgs('xpack.monitoring.cluster_alerts.email_notifications.enabled')
|
||||
.returns(enabled);
|
||||
config.get.withArgs('monitoring.cluster_alerts.email_notifications.enabled').returns(enabled);
|
||||
|
||||
if (adminEmail) {
|
||||
config.get
|
||||
.withArgs(`xpack.monitoring.${CLUSTER_ALERTS_ADDRESS_CONFIG_KEY}`)
|
||||
.returns(adminEmail);
|
||||
config.get.withArgs(`monitoring.${CLUSTER_ALERTS_ADDRESS_CONFIG_KEY}`).returns(adminEmail);
|
||||
}
|
||||
|
||||
config.get.withArgs('kibana.index').returns('.kibana');
|
||||
|
@ -74,7 +70,7 @@ describe('getSettingsCollector / getDefaultAdminEmail', () => {
|
|||
resetDeprecationWarning();
|
||||
});
|
||||
|
||||
describe('xpack.monitoring.cluster_alerts.email_notifications.enabled = false', () => {
|
||||
describe('monitoring.cluster_alerts.email_notifications.enabled = false', () => {
|
||||
it('returns null', async () => {
|
||||
const { config, callCluster, log } = setup({ enabled: false });
|
||||
expect(await getDefaultAdminEmail(config, callCluster, log)).to.be(null);
|
||||
|
@ -131,12 +127,12 @@ describe('getSettingsCollector / getDefaultAdminEmail', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('using xpack.monitoring.cluster_alerts.email_notifications.email_address', () => {
|
||||
describe('using monitoring.cluster_alerts.email_notifications.email_address', () => {
|
||||
beforeEach(() => {
|
||||
resetDeprecationWarning();
|
||||
});
|
||||
|
||||
describe('xpack.monitoring.cluster_alerts.email_notifications.enabled = false', () => {
|
||||
describe('monitoring.cluster_alerts.email_notifications.enabled = false', () => {
|
||||
it('returns null', async () => {
|
||||
const { config, callCluster, log } = setup({ enabled: false });
|
||||
expect(await getDefaultAdminEmail(config, callCluster, log)).to.be(null);
|
||||
|
|
|
@ -19,11 +19,11 @@ export function resetDeprecationWarning() {
|
|||
* If so, use uiSettings API to fetch the X-Pack default admin email
|
||||
*/
|
||||
export async function getDefaultAdminEmail(config, callCluster, log) {
|
||||
if (!config.get('xpack.monitoring.cluster_alerts.email_notifications.enabled')) {
|
||||
if (!config.get('monitoring.cluster_alerts.email_notifications.enabled')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const emailAddressConfigKey = `xpack.monitoring.${CLUSTER_ALERTS_ADDRESS_CONFIG_KEY}`;
|
||||
const emailAddressConfigKey = `monitoring.${CLUSTER_ALERTS_ADDRESS_CONFIG_KEY}`;
|
||||
const configuredEmailAddress = config.get(emailAddressConfigKey);
|
||||
|
||||
if (configuredEmailAddress) {
|
||||
|
|
|
@ -17,7 +17,7 @@ export function opsBuffer({ config, log, getOSInfo }) {
|
|||
// determine the cloud service in the background
|
||||
const cloudDetector = new CloudDetector();
|
||||
|
||||
if (config.get('xpack.monitoring.tests.cloud_detector.enabled')) {
|
||||
if (config.get('monitoring.tests.cloud_detector.enabled')) {
|
||||
cloudDetector.detectCloudService();
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import { BulkUploader } from './bulk_uploader';
|
|||
* @param {Object} server HapiJS server instance
|
||||
*/
|
||||
export function initBulkUploader({ config, ...params }) {
|
||||
const interval = config.get('xpack.monitoring.kibana.collection.interval');
|
||||
const interval = config.get('monitoring.kibana.collection.interval');
|
||||
return new BulkUploader({
|
||||
interval,
|
||||
config,
|
||||
|
|
|
@ -17,7 +17,7 @@ describe('ccs_utils', () => {
|
|||
const get = sinon.stub();
|
||||
const config = { get };
|
||||
|
||||
get.withArgs('xpack.monitoring.ccs.enabled').returns(false);
|
||||
get.withArgs('monitoring.ui.ccs.enabled').returns(false);
|
||||
|
||||
// falsy string values should be ignored
|
||||
const allPattern = prefixIndexPattern(config, indexPattern, '*');
|
||||
|
@ -32,7 +32,7 @@ describe('ccs_utils', () => {
|
|||
const get = sinon.stub();
|
||||
const config = { get };
|
||||
|
||||
get.withArgs('xpack.monitoring.ccs.enabled').returns(true);
|
||||
get.withArgs('monitoring.ui.ccs.enabled').returns(true);
|
||||
|
||||
// falsy string values should be ignored
|
||||
const undefinedPattern = prefixIndexPattern(config, indexPattern);
|
||||
|
@ -49,7 +49,7 @@ describe('ccs_utils', () => {
|
|||
const get = sinon.stub();
|
||||
const config = { get };
|
||||
|
||||
get.withArgs('xpack.monitoring.ccs.enabled').returns(true);
|
||||
get.withArgs('monitoring.ui.ccs.enabled').returns(true);
|
||||
|
||||
const abcPattern = prefixIndexPattern(config, indexPattern, 'aBc');
|
||||
const underscorePattern = prefixIndexPattern(config, indexPattern, 'cluster_one');
|
||||
|
@ -67,7 +67,7 @@ describe('ccs_utils', () => {
|
|||
const get = sinon.stub();
|
||||
const config = { get };
|
||||
|
||||
get.withArgs('xpack.monitoring.ccs.enabled').returns(true);
|
||||
get.withArgs('monitoring.ui.ccs.enabled').returns(true);
|
||||
|
||||
const pattern = prefixIndexPattern(config, indexPattern, '*');
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ export async function getApms(req, apmIndexPattern, clusterUuid) {
|
|||
|
||||
const params = {
|
||||
index: apmIndexPattern,
|
||||
size: config.get('xpack.monitoring.max_bucket_size'), // FIXME
|
||||
size: config.get('monitoring.ui.max_bucket_size'), // FIXME
|
||||
ignoreUnavailable: true,
|
||||
filterPath: [
|
||||
// only filter path can filter for inner_hits
|
||||
|
|
|
@ -35,7 +35,7 @@ export function getApmsForClusters(req, apmIndexPattern, clusters) {
|
|||
const start = req.payload.timeRange.min;
|
||||
const end = req.payload.timeRange.max;
|
||||
const config = req.server.config();
|
||||
const maxBucketSize = config.get('xpack.monitoring.max_bucket_size');
|
||||
const maxBucketSize = config.get('monitoring.ui.max_bucket_size');
|
||||
|
||||
return Promise.all(
|
||||
clusters.map(async cluster => {
|
||||
|
|
|
@ -28,7 +28,7 @@ export async function getStats(req, apmIndexPattern, clusterUuid) {
|
|||
const config = req.server.config();
|
||||
const start = moment.utc(req.payload.timeRange.min).valueOf();
|
||||
const end = moment.utc(req.payload.timeRange.max).valueOf();
|
||||
const maxBucketSize = config.get('xpack.monitoring.max_bucket_size');
|
||||
const maxBucketSize = config.get('monitoring.ui.max_bucket_size');
|
||||
|
||||
const params = {
|
||||
index: apmIndexPattern,
|
||||
|
|
|
@ -83,7 +83,7 @@ export async function getBeats(req, beatsIndexPattern, clusterUuid) {
|
|||
|
||||
const params = {
|
||||
index: beatsIndexPattern,
|
||||
size: config.get('xpack.monitoring.max_bucket_size'), // FIXME
|
||||
size: config.get('monitoring.ui.max_bucket_size'), // FIXME
|
||||
ignoreUnavailable: true,
|
||||
filterPath: [
|
||||
// only filter path can filter for inner_hits
|
||||
|
|
|
@ -34,7 +34,7 @@ export function getBeatsForClusters(req, beatsIndexPattern, clusters) {
|
|||
const start = req.payload.timeRange.min;
|
||||
const end = req.payload.timeRange.max;
|
||||
const config = req.server.config();
|
||||
const maxBucketSize = config.get('xpack.monitoring.max_bucket_size');
|
||||
const maxBucketSize = config.get('monitoring.ui.max_bucket_size');
|
||||
|
||||
return Promise.all(
|
||||
clusters.map(async cluster => {
|
||||
|
|
|
@ -71,7 +71,7 @@ export function getLatestStats(req, beatsIndexPattern, clusterUuid) {
|
|||
uuids: {
|
||||
terms: {
|
||||
field: 'beats_stats.beat.uuid',
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -28,7 +28,7 @@ export async function getStats(req, beatsIndexPattern, clusterUuid) {
|
|||
const config = req.server.config();
|
||||
const start = moment.utc(req.payload.timeRange.min).valueOf();
|
||||
const end = moment.utc(req.payload.timeRange.max).valueOf();
|
||||
const maxBucketSize = config.get('xpack.monitoring.max_bucket_size');
|
||||
const maxBucketSize = config.get('monitoring.ui.max_bucket_size');
|
||||
|
||||
const params = {
|
||||
index: beatsIndexPattern,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* @return {String} The index pattern with the {@code cluster} prefix appropriately prepended.
|
||||
*/
|
||||
export function prefixIndexPattern(config, indexPattern, ccs) {
|
||||
const ccsEnabled = config.get('xpack.monitoring.ccs.enabled');
|
||||
const ccsEnabled = config.get('monitoring.ui.ccs.enabled');
|
||||
|
||||
if (!ccsEnabled || !ccs) {
|
||||
return indexPattern;
|
||||
|
|
|
@ -55,7 +55,7 @@ export async function getClustersFromRequest(
|
|||
} = indexPatterns;
|
||||
|
||||
const config = req.server.config();
|
||||
const size = config.get('xpack.monitoring.max_bucket_size');
|
||||
const size = config.get('monitoring.ui.max_bucket_size');
|
||||
const isStandaloneCluster = clusterUuid === STANDALONE_CLUSTER_CLUSTER_UUID;
|
||||
|
||||
let clusters = [];
|
||||
|
|
|
@ -46,7 +46,7 @@ function fetchClusterStats(req, esIndexPattern, clusterUuid) {
|
|||
const metric = ElasticsearchMetric.getMetricFields();
|
||||
const params = {
|
||||
index: esIndexPattern,
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
ignoreUnavailable: true,
|
||||
filterPath: [
|
||||
'hits.hits._index',
|
||||
|
|
|
@ -20,7 +20,7 @@ function getMockReq(metricsBuckets = []) {
|
|||
get: sinon.stub(),
|
||||
};
|
||||
|
||||
config.get.withArgs('xpack.monitoring.min_interval_seconds').returns(10);
|
||||
config.get.withArgs('monitoring.ui.min_interval_seconds').returns(10);
|
||||
|
||||
return {
|
||||
server: {
|
||||
|
|
|
@ -28,7 +28,7 @@ export async function getMetrics(
|
|||
// TODO: Pass in req parameters as explicit function parameters
|
||||
let min = moment.utc(req.payload.timeRange.min).valueOf();
|
||||
const max = moment.utc(req.payload.timeRange.max).valueOf();
|
||||
const minIntervalSeconds = config.get('xpack.monitoring.min_interval_seconds');
|
||||
const minIntervalSeconds = config.get('monitoring.ui.min_interval_seconds');
|
||||
const bucketSize = calculateTimeseriesInterval(min, max, minIntervalSeconds);
|
||||
const timezone = await getTimezone(req);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ export function getMlJobs(req, esIndexPattern) {
|
|||
checkParam(esIndexPattern, 'esIndexPattern in getMlJobs');
|
||||
|
||||
const config = req.server.config();
|
||||
const maxBucketSize = config.get('xpack.monitoring.max_bucket_size');
|
||||
const maxBucketSize = config.get('monitoring.ui.max_bucket_size');
|
||||
const start = req.payload.timeRange.min; // no wrapping in moment :)
|
||||
const end = req.payload.timeRange.max;
|
||||
const clusterUuid = req.params.clusterUuid;
|
||||
|
|
|
@ -97,7 +97,7 @@ export function getIndices(req, esIndexPattern, showSystemIndices = false, shard
|
|||
const params = {
|
||||
index: esIndexPattern,
|
||||
// TODO: composite aggregation
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
ignoreUnavailable: true,
|
||||
filterPath: [
|
||||
// only filter path can filter for inner_hits
|
||||
|
|
|
@ -44,7 +44,7 @@ export async function getNodes(req, esIndexPattern, pageOfNodes, clusterStats, n
|
|||
const min = start;
|
||||
|
||||
const bucketSize = Math.max(
|
||||
config.get('xpack.monitoring.min_interval_seconds'),
|
||||
config.get('monitoring.ui.min_interval_seconds'),
|
||||
calculateAuto(100, duration).asSeconds()
|
||||
);
|
||||
|
||||
|
@ -59,7 +59,7 @@ export async function getNodes(req, esIndexPattern, pageOfNodes, clusterStats, n
|
|||
|
||||
const params = {
|
||||
index: esIndexPattern,
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
ignoreUnavailable: true,
|
||||
body: {
|
||||
query: createQuery({
|
||||
|
@ -78,7 +78,7 @@ export async function getNodes(req, esIndexPattern, pageOfNodes, clusterStats, n
|
|||
terms: {
|
||||
field: `source_node.uuid`,
|
||||
include: uuidsToInclude,
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
},
|
||||
aggs: {
|
||||
by_date: {
|
||||
|
|
|
@ -38,7 +38,7 @@ export async function getPaginatedNodes(
|
|||
{ clusterStats, nodesShardCount }
|
||||
) {
|
||||
const config = req.server.config();
|
||||
const size = config.get('xpack.monitoring.max_bucket_size');
|
||||
const size = config.get('monitoring.ui.max_bucket_size');
|
||||
const nodes = await getNodeIds(req, esIndexPattern, { clusterUuid }, size);
|
||||
|
||||
// Add `isOnline` and shards from the cluster state and shard stats
|
||||
|
@ -63,7 +63,7 @@ export async function getPaginatedNodes(
|
|||
const groupBy = {
|
||||
field: `source_node.uuid`,
|
||||
include: nodes.map(node => node.uuid),
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
};
|
||||
const metricSeriesData = await getMetrics(
|
||||
req,
|
||||
|
|
|
@ -12,7 +12,7 @@ import { calculateIndicesTotals } from './calculate_shard_stat_indices_totals';
|
|||
|
||||
async function getUnassignedShardData(req, esIndexPattern, cluster) {
|
||||
const config = req.server.config();
|
||||
const maxBucketSize = config.get('xpack.monitoring.max_bucket_size');
|
||||
const maxBucketSize = config.get('monitoring.ui.max_bucket_size');
|
||||
const metric = ElasticsearchMetric.getMetricFields();
|
||||
|
||||
const params = {
|
||||
|
|
|
@ -11,7 +11,7 @@ import { ElasticsearchMetric } from '../../metrics';
|
|||
|
||||
async function getShardCountPerNode(req, esIndexPattern, cluster) {
|
||||
const config = req.server.config();
|
||||
const maxBucketSize = config.get('xpack.monitoring.max_bucket_size');
|
||||
const maxBucketSize = config.get('monitoring.ui.max_bucket_size');
|
||||
const metric = ElasticsearchMetric.getMetricFields();
|
||||
|
||||
const params = {
|
||||
|
|
|
@ -55,7 +55,7 @@ export function getShardAllocation(
|
|||
const metric = ElasticsearchMetric.getMetricFields();
|
||||
const params = {
|
||||
index: esIndexPattern,
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
ignoreUnavailable: true,
|
||||
body: {
|
||||
query: createQuery({ type: 'shards', clusterUuid, metric, filters }),
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* @param {Boolean} includeNodes - whether to add the aggs for node shards
|
||||
*/
|
||||
export function getShardAggs(config, includeNodes, includeIndices) {
|
||||
const maxBucketSize = config.get('xpack.monitoring.max_bucket_size');
|
||||
const maxBucketSize = config.get('monitoring.ui.max_bucket_size');
|
||||
const aggSize = 10;
|
||||
const indicesAgg = {
|
||||
terms: {
|
||||
|
|
|
@ -31,7 +31,7 @@ export function getKibanas(req, kbnIndexPattern, { clusterUuid }) {
|
|||
|
||||
const params = {
|
||||
index: kbnIndexPattern,
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
ignoreUnavailable: true,
|
||||
body: {
|
||||
query: createQuery({
|
||||
|
|
|
@ -49,7 +49,7 @@ export function getKibanasForClusters(req, kbnIndexPattern, clusters) {
|
|||
kibana_uuids: {
|
||||
terms: {
|
||||
field: 'kibana_stats.kibana.uuid',
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
},
|
||||
aggs: {
|
||||
latest_report: {
|
||||
|
|
|
@ -70,7 +70,7 @@ export async function getLogs(
|
|||
|
||||
const params = {
|
||||
index: filebeatIndexPattern,
|
||||
size: Math.min(50, config.get('xpack.monitoring.elasticsearch.logFetchCount')),
|
||||
size: Math.min(50, config.get('monitoring.ui.elasticsearch.logFetchCount')),
|
||||
filterPath: [
|
||||
'hits.hits._source.message',
|
||||
'hits.hits._source.log.level',
|
||||
|
|
|
@ -60,7 +60,7 @@ export function getLogstashForClusters(req, lsIndexPattern, clusters) {
|
|||
logstash_uuids: {
|
||||
terms: {
|
||||
field: 'logstash_stats.logstash.uuid',
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
},
|
||||
aggs: {
|
||||
latest_report: {
|
||||
|
@ -119,7 +119,7 @@ export function getLogstashForClusters(req, lsIndexPattern, clusters) {
|
|||
logstash_versions: {
|
||||
terms: {
|
||||
field: 'logstash_stats.logstash.version',
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
},
|
||||
},
|
||||
pipelines_nested: {
|
||||
|
@ -135,7 +135,7 @@ export function getLogstashForClusters(req, lsIndexPattern, clusters) {
|
|||
queue_types: {
|
||||
terms: {
|
||||
field: 'logstash_stats.pipelines.queue.type',
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
},
|
||||
aggs: {
|
||||
num_pipelines: {
|
||||
|
|
|
@ -31,7 +31,7 @@ export function getNodes(req, lsIndexPattern, { clusterUuid }) {
|
|||
|
||||
const params = {
|
||||
index: lsIndexPattern,
|
||||
size: config.get('xpack.monitoring.max_bucket_size'), // FIXME
|
||||
size: config.get('monitoring.ui.max_bucket_size'), // FIXME
|
||||
ignoreUnavailable: true,
|
||||
body: {
|
||||
query: createQuery({
|
||||
|
|
|
@ -37,7 +37,7 @@ export async function getPaginatedPipelines(
|
|||
queryText
|
||||
) {
|
||||
const config = req.server.config();
|
||||
const size = config.get('xpack.monitoring.max_bucket_size');
|
||||
const size = config.get('monitoring.ui.max_bucket_size');
|
||||
const pipelines = await getLogstashPipelineIds(
|
||||
req,
|
||||
lsIndexPattern,
|
||||
|
|
|
@ -111,7 +111,7 @@ export async function getPipeline(req, config, lsIndexPattern, clusterUuid, pipe
|
|||
};
|
||||
|
||||
// Determine metrics' timeseries interval based on version's timespan
|
||||
const minIntervalSeconds = config.get('xpack.monitoring.min_interval_seconds');
|
||||
const minIntervalSeconds = config.get('monitoring.ui.min_interval_seconds');
|
||||
const timeseriesInterval = calculateTimeseriesInterval(
|
||||
version.firstSeen,
|
||||
version.lastSeen,
|
||||
|
|
|
@ -171,7 +171,7 @@ export function getPipelineStatsAggregation(
|
|||
logstashIndexPattern,
|
||||
pipelineId,
|
||||
version,
|
||||
config.get('xpack.monitoring.max_bucket_size'),
|
||||
config.get('monitoring.ui.max_bucket_size'),
|
||||
callWithRequest,
|
||||
req
|
||||
);
|
||||
|
|
|
@ -37,7 +37,7 @@ function fetchPipelineVersions(...args) {
|
|||
by_pipeline_hash: {
|
||||
terms: {
|
||||
field: 'logstash_stats.pipelines.hash',
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
order: { 'path_to_root>first_seen': 'desc' },
|
||||
},
|
||||
aggs: {
|
||||
|
|
|
@ -130,7 +130,7 @@ export async function getPipelineVertex(
|
|||
};
|
||||
|
||||
// Determine metrics' timeseries interval based on version's timespan
|
||||
const minIntervalSeconds = config.get('xpack.monitoring.min_interval_seconds');
|
||||
const minIntervalSeconds = config.get('monitoring.ui.min_interval_seconds');
|
||||
const timeseriesInterval = calculateTimeseriesInterval(
|
||||
version.firstSeen,
|
||||
version.lastSeen,
|
||||
|
|
|
@ -216,7 +216,7 @@ export function getPipelineVertexStatsAggregation(
|
|||
version,
|
||||
vertexId,
|
||||
timeSeriesIntervalInSeconds,
|
||||
config.get('xpack.monitoring.max_bucket_size'),
|
||||
config.get('monitoring.ui.max_bucket_size'),
|
||||
callWithRequest,
|
||||
req
|
||||
);
|
||||
|
|
|
@ -48,7 +48,7 @@ export class Plugin {
|
|||
/*
|
||||
* End-user-facing services
|
||||
*/
|
||||
const uiEnabled = config.get('xpack.monitoring.ui.enabled');
|
||||
const uiEnabled = config.get('monitoring.ui.enabled');
|
||||
|
||||
if (uiEnabled) {
|
||||
await instantiateClient({
|
||||
|
@ -98,7 +98,7 @@ export class Plugin {
|
|||
kbnServerStatus: kbnServer.status,
|
||||
kbnServerVersion: kbnServer.version,
|
||||
});
|
||||
const kibanaCollectionEnabled = config.get('xpack.monitoring.kibana.collection.enabled');
|
||||
const kibanaCollectionEnabled = config.get('monitoring.kibana.collection.enabled');
|
||||
|
||||
if (kibanaCollectionEnabled) {
|
||||
/*
|
||||
|
@ -125,14 +125,12 @@ export class Plugin {
|
|||
core.injectUiAppVars('monitoring', () => {
|
||||
const config = core.config();
|
||||
return {
|
||||
maxBucketSize: config.get('xpack.monitoring.max_bucket_size'),
|
||||
minIntervalSeconds: config.get('xpack.monitoring.min_interval_seconds'),
|
||||
maxBucketSize: config.get('monitoring.ui.max_bucket_size'),
|
||||
minIntervalSeconds: config.get('monitoring.ui.min_interval_seconds'),
|
||||
kbnIndex: config.get('kibana.index'),
|
||||
showLicenseExpiration: config.get('xpack.monitoring.show_license_expiration'),
|
||||
showCgroupMetricsElasticsearch: config.get(
|
||||
'xpack.monitoring.ui.container.elasticsearch.enabled'
|
||||
),
|
||||
showCgroupMetricsLogstash: config.get('xpack.monitoring.ui.container.logstash.enabled'), // Note, not currently used, but see https://github.com/elastic/x-pack-kibana/issues/1559 part 2
|
||||
showLicenseExpiration: config.get('monitoring.ui.show_license_expiration'),
|
||||
showCgroupMetricsElasticsearch: config.get('monitoring.ui.container.elasticsearch.enabled'),
|
||||
showCgroupMetricsLogstash: config.get('monitoring.ui.container.logstash.enabled'), // Note, not currently used, but see https://github.com/elastic/x-pack-kibana/issues/1559 part 2
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ function getBucketScript(max, min) {
|
|||
function buildRequest(req, config, esIndexPattern) {
|
||||
const min = moment.utc(req.payload.timeRange.min).valueOf();
|
||||
const max = moment.utc(req.payload.timeRange.max).valueOf();
|
||||
const maxBucketSize = config.get('xpack.monitoring.max_bucket_size');
|
||||
const maxBucketSize = config.get('monitoring.ui.max_bucket_size');
|
||||
const aggs = {
|
||||
ops_synced_max: {
|
||||
max: {
|
||||
|
|
|
@ -61,7 +61,7 @@ export function esNodeRoute(server) {
|
|||
metricSet = metricSetOverview;
|
||||
// set the cgroup option if needed
|
||||
const showCgroupMetricsElasticsearch = config.get(
|
||||
'xpack.monitoring.ui.container.elasticsearch.enabled'
|
||||
'monitoring.ui.container.elasticsearch.enabled'
|
||||
);
|
||||
const metricCpu = metricSet.find(m => m.name === 'node_cpu_metric');
|
||||
if (showCgroupMetricsElasticsearch) {
|
||||
|
|
|
@ -60,9 +60,7 @@ export function logstashNodeRoute(server) {
|
|||
} else {
|
||||
metricSet = metricSetOverview;
|
||||
// set the cgroup option if needed
|
||||
const showCgroupMetricsLogstash = config.get(
|
||||
'xpack.monitoring.ui.container.logstash.enabled'
|
||||
);
|
||||
const showCgroupMetricsLogstash = config.get('monitoring.ui.container.logstash.enabled');
|
||||
const metricCpu = metricSet.find(m => m.name === 'logstash_node_cpu_metric');
|
||||
if (showCgroupMetricsLogstash) {
|
||||
metricCpu.keys = ['logstash_node_cgroup_quota_as_cpu_utilization'];
|
||||
|
|
|
@ -36,7 +36,7 @@ export function logstashClusterPipelineIdsRoute(server) {
|
|||
const { ccs } = req.payload;
|
||||
const clusterUuid = req.params.clusterUuid;
|
||||
const lsIndexPattern = prefixIndexPattern(config, INDEX_PATTERN_LOGSTASH, ccs);
|
||||
const size = config.get('xpack.monitoring.max_bucket_size');
|
||||
const size = config.get('monitoring.ui.max_bucket_size');
|
||||
|
||||
try {
|
||||
const pipelines = await getLogstashPipelineIds(req, lsIndexPattern, { clusterUuid }, size);
|
||||
|
|
|
@ -40,7 +40,7 @@ export function fetchClusterUuids({ server, callCluster, start, end }: StatsColl
|
|||
cluster_uuids: {
|
||||
terms: {
|
||||
field: 'cluster_uuid',
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -31,7 +31,7 @@ export function fetchElasticsearchStats(server, callCluster, clusterUuids) {
|
|||
const config = server.config();
|
||||
const params = {
|
||||
index: INDEX_PATTERN_ELASTICSEARCH,
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
ignoreUnavailable: true,
|
||||
filterPath: [
|
||||
'hits.hits._source.cluster_uuid',
|
||||
|
|
|
@ -217,7 +217,7 @@ export async function fetchHighLevelStats(server, callCluster, clusterUuids, sta
|
|||
|
||||
const params = {
|
||||
index: getIndexPatternForStackProduct(product),
|
||||
size: config.get('xpack.monitoring.max_bucket_size'),
|
||||
size: config.get('monitoring.ui.max_bucket_size'),
|
||||
headers: {
|
||||
'X-QUERY-SOURCE': TELEMETRY_QUERY_SOURCE,
|
||||
},
|
||||
|
|
|
@ -32,7 +32,7 @@ export const getUiExports = () => ({
|
|||
injectDefaultVars(server) {
|
||||
const config = server.config();
|
||||
return {
|
||||
monitoringUiEnabled: config.get('xpack.monitoring.ui.enabled'),
|
||||
monitoringUiEnabled: config.get('monitoring.ui.enabled'),
|
||||
};
|
||||
},
|
||||
hacks: ['plugins/monitoring/hacks/toggle_app_link_in_nav'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue