diff --git a/x-pack/plugins/monitoring/server/rules/nodes_changed_rule.test.ts b/x-pack/plugins/monitoring/server/rules/nodes_changed_rule.test.ts index 3abd163343e9e..206e9f2dc042e 100644 --- a/x-pack/plugins/monitoring/server/rules/nodes_changed_rule.test.ts +++ b/x-pack/plugins/monitoring/server/rules/nodes_changed_rule.test.ts @@ -202,11 +202,11 @@ describe('NodesChangedAlert', () => { action: '[View nodes](elasticsearch/nodes)', actionPlain: 'Verify that you added, removed, or restarted nodes.', internalFullMessage: - 'Nodes changed alert is firing for testCluster. The following Elasticsearch nodes have been added: removed: restarted:test. [View nodes](elasticsearch/nodes)', + 'Nodes changed alert is firing for testCluster. The following Elasticsearch nodes have been added: none / removed: none / restarted: test. [View nodes](elasticsearch/nodes)', internalShortMessage: 'Nodes changed alert is firing for testCluster. Verify that you added, removed, or restarted nodes.', - added: '', - removed: '', + added: 'none', + removed: 'none', restarted: 'test', clusterName, state: 'firing', @@ -287,7 +287,7 @@ describe('NodesChangedAlert', () => { action: '[View nodes](elasticsearch/nodes)', actionPlain: 'Verify that you added, removed, or restarted nodes.', internalFullMessage: - 'Nodes changed alert is firing for testCluster. The following Elasticsearch nodes have been added:newNodeName removed:removedNodeName restarted:test. [View nodes](elasticsearch/nodes)', + 'Nodes changed alert is firing for testCluster. The following Elasticsearch nodes have been added: newNodeName / removed: removedNodeName / restarted: test. [View nodes](elasticsearch/nodes)', internalShortMessage: 'Nodes changed alert is firing for testCluster. Verify that you added, removed, or restarted nodes.', added: 'newNodeName', diff --git a/x-pack/plugins/monitoring/server/rules/nodes_changed_rule.ts b/x-pack/plugins/monitoring/server/rules/nodes_changed_rule.ts index 54edc90e16b7b..dc7a133f0d2ad 100644 --- a/x-pack/plugins/monitoring/server/rules/nodes_changed_rule.ts +++ b/x-pack/plugins/monitoring/server/rules/nodes_changed_rule.ts @@ -203,9 +203,9 @@ export class NodesChangedRule extends BaseRule { }); const action = `[${fullActionText}](elasticsearch/nodes)`; const states = getNodeStates(nodes); - const added = states.added.map((node) => node.nodeName).join(','); - const removed = states.removed.map((node) => node.nodeName).join(','); - const restarted = states.restarted.map((node) => node.nodeName).join(','); + const added = states.added.map((node) => node.nodeName).join(',') || 'none'; + const removed = states.removed.map((node) => node.nodeName).join(',') || 'none'; + const restarted = states.restarted.map((node) => node.nodeName).join(',') || 'none'; const internalShortMessage = i18n.translate( 'xpack.monitoring.alerts.nodesChanged.firing.internalShortMessage', { @@ -223,7 +223,7 @@ export class NodesChangedRule extends BaseRule { internalFullMessage: i18n.translate( 'xpack.monitoring.alerts.nodesChanged.firing.internalFullMessage', { - defaultMessage: `Nodes changed alert is firing for {clusterName}. The following Elasticsearch nodes have been added:{added} removed:{removed} restarted:{restarted}. {action}`, + defaultMessage: `Nodes changed alert is firing for {clusterName}. The following Elasticsearch nodes have been added: {added} / removed: {removed} / restarted: {restarted}. {action}`, values: { clusterName: cluster.clusterName, added,