diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_overview.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_overview.tsx
index fb80611e5295..9567fc3f372c 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_overview.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_overview.tsx
@@ -133,33 +133,37 @@ export const AgentDetailsOverviewSection: React.FunctionComponent<{
title: i18n.translate('xpack.fleet.agentDetails.monitorLogsLabel', {
defaultMessage: 'Monitor logs',
}),
- description: agentPolicy?.monitoring_enabled?.includes('logs') ? (
-
- ) : (
-
- ),
+ description: Array.isArray(agentPolicy?.monitoring_enabled) ? (
+ agentPolicy?.monitoring_enabled?.includes('logs') ? (
+
+ ) : (
+
+ )
+ ) : null,
},
{
title: i18n.translate('xpack.fleet.agentDetails.monitorMetricsLabel', {
defaultMessage: 'Monitor metrics',
}),
- description: agentPolicy?.monitoring_enabled?.includes('metrics') ? (
-
- ) : (
-
- ),
+ description: Array.isArray(agentPolicy?.monitoring_enabled) ? (
+ agentPolicy?.monitoring_enabled?.includes('metrics') ? (
+
+ ) : (
+
+ )
+ ) : null,
},
].map(({ title, description }) => {
return (