-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds docs and includes fixes found by adding docs :)
- Loading branch information
1 parent
9766ec7
commit 32d2173
Showing
11 changed files
with
270 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { schema, TypeOf } from '@kbn/config-schema'; | ||
|
||
export const INDEX_DEFAULTS = { | ||
metrics: 'metricbeat-*,metrics-*', | ||
logs: 'filebeat-*,logs-*', | ||
}; | ||
|
||
export const configSchema = schema.object({ | ||
alphaEnabled: schema.maybe(schema.boolean()), | ||
// Designate where various types of data live. | ||
// NOTE: this should be handled in a centralized way for observability, so | ||
// that when a user configures these differently from the known defaults, | ||
// that value is propagated everywhere. For now, we duplicate the value here. | ||
sourceIndices: schema.object( | ||
{ | ||
metrics: schema.string({ defaultValue: INDEX_DEFAULTS.metrics }), | ||
logs: schema.string({ defaultValue: INDEX_DEFAULTS.logs }), | ||
}, | ||
{ defaultValue: INDEX_DEFAULTS } | ||
), | ||
// Choose an explicit source for asset queries. | ||
// NOTE: This will eventually need to be able to cleverly switch | ||
// between these values based on the availability of data in the | ||
// indices, and possibly for each asset kind/type value. | ||
// For now, we set this explicitly. | ||
lockedSource: schema.oneOf([schema.literal('assets'), schema.literal('signals')], { | ||
defaultValue: 'signals', | ||
}), | ||
}); | ||
|
||
export type AssetManagerConfig = TypeOf<typeof configSchema>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.