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