Skip to content

Commit

Permalink
[Ingest Manager] Support DEGRADED state in fleet agent event (elastic…
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Jul 24, 2020
1 parent 42b3a79 commit 6d5f7c5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4203,6 +4203,7 @@
"FAILED",
"STOPPING",
"STOPPED",
"DEGRADED",
"DATA_DUMP",
"ACKNOWLEDGED",
"UNKNOWN"
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/ingest_manager/common/types/models/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export interface NewAgentEvent {
| 'FAILED'
| 'STOPPING'
| 'STOPPED'
| 'DEGRADED'
// Action results
| 'DATA_DUMP'
// Actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ export const SUBTYPE_LABEL: { [key in AgentEvent['subtype']]: JSX.Element } = {
/>
</EuiBadge>
),
DEGRADED: (
<EuiBadge color="hollow">
<FormattedMessage
id="xpack.ingestManager.agentEventSubtype.degradedLabel"
defaultMessage="Degraded"
/>
</EuiBadge>
),
DATA_DUMP: (
<EuiBadge color="hollow">
<FormattedMessage
Expand Down
17 changes: 10 additions & 7 deletions x-pack/plugins/ingest_manager/server/types/models/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ const AgentEventBase = {
]),
subtype: schema.oneOf([
// State
schema.literal('RUNNING'),
schema.literal('STARTING'),
schema.literal('IN_PROGRESS'),
schema.literal('CONFIG'),
schema.literal('FAILED'),
schema.literal('STOPPING'),
schema.literal('STOPPED'),
schema.oneOf([
schema.literal('RUNNING'),
schema.literal('STARTING'),
schema.literal('IN_PROGRESS'),
schema.literal('CONFIG'),
schema.literal('FAILED'),
schema.literal('STOPPING'),
schema.literal('STOPPED'),
schema.literal('DEGRADED'),
]),
// Action results
schema.literal('DATA_DUMP'),
// Actions
Expand Down

0 comments on commit 6d5f7c5

Please sign in to comment.